v0.14.0
Loading...
Searching...
No Matches
seepage.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <IntegrationRules.hpp>
#include <SeepageOps.hpp>

Go to the source code of this file.

Classes

struct  Seepage
 
struct  Seepage::BlockedParameters
 

Macros

#define EXECUTABLE_DIMENSION   2
 

Typedefs

using DomainEle = PipelineManager::ElementsAndOpsByDim<SPACE_DIM>::DomainEle
 
using BoundaryEle
 
using PostProcEle = PostProcBrokenMeshInMoab<DomainEle>
 
using AssemblyDomainEleOp
 
using OpKCauchy
 [Only used with Hooke equation (linear material model)]
 
using OpInternalForceCauchy
 
using OpMass
 [Only used with Hooke equation (linear material model)]
 
using OpInertiaForce
 
using OpKPiola
 [Only used for dynamics]
 
using OpInternalForcePiola
 
using OpBoundaryMass
 [Only used with Hencky/nonlinear material]
 
using OpBoundaryVec
 
using OpBoundaryInternal
 
using OpBaseDivU
 [Essential boundary conditions]
 
using OpHdivHdiv
 Integrate Lhs base of flux (1/k) base of flux (FLUX x FLUX)
 
using OpHdivQ
 Integrate Lhs div of base of flux time base of temperature (FLUX x T) and transpose of it, i.e. (T x FLAX)
 
using OpCapacity
 Integrate Lhs base of temperature times (heat capacity) times base of temperature (T x T)
 
using OpHdivFlux
 Integrating Rhs flux base (1/k) flux (FLUX)
 
using OpHDivH
 Integrate Rhs div flux base times temperature (T)
 
using OpBaseDotH
 Integrate Rhs base of temperature time heat capacity times heat rate (T)
 
using OpBaseDivFlux = OpBaseDotH
 Integrate Rhs base of temperature times divergent of flux (T)
 
using DomainNaturalBCRhs
 [Body and heat source]
 
using OpBodyForce
 
using OpHeatSource
 
using DomainNaturalBCLhs
 
using BoundaryNaturalBC
 [Body and heat source]
 
using OpForce = BoundaryNaturalBC::OpFlux<NaturalForceMeshsets, 1, SPACE_DIM>
 
using OpTemperatureBC
 
using OpEssentialFluxRhs
 [Natural boundary conditions]
 
using OpEssentialFluxLhs
 

Functions

int main (int argc, char *argv[])
 

Variables

constexpr int SPACE_DIM
 
double scale = 1.
 [Essential boundary conditions (Least square approach)]
 
double default_young_modulus = 1
 
double default_poisson_ratio = 0.25
 
double default_conductivity = 1
 
double fluid_density = 10
 
auto save_range
 
static char help [] = "...\n\n"
 [Solve]
 

Macro Definition Documentation

◆ EXECUTABLE_DIMENSION

#define EXECUTABLE_DIMENSION   2

Definition at line 24 of file seepage.cpp.

Typedef Documentation

◆ AssemblyDomainEleOp

◆ BoundaryEle

◆ BoundaryNaturalBC

Initial value:

[Body and heat source]

[Natural boundary conditions]

Definition at line 144 of file seepage.cpp.

◆ DomainEle

◆ DomainNaturalBCLhs

◆ DomainNaturalBCRhs

Initial value:

[Body and heat source]

Definition at line 133 of file seepage.cpp.

◆ OpBaseDivFlux

Integrate Rhs base of temperature times divergent of flux (T)

Examples
seepage.cpp.

Definition at line 130 of file seepage.cpp.

◆ OpBaseDivU

using OpBaseDivU
Initial value:
FormsIntegrators< DomainEleOp >::Assembly< A >::BiLinearForm< I >::OpMixScalarTimesDiv< SPACE_DIM, COORD_TYPE > OpMixScalarTimesDiv

[Essential boundary conditions]

Examples
seepage.cpp.

Definition at line 78 of file seepage.cpp.

◆ OpBaseDotH

using OpBaseDotH
Initial value:

Integrate Rhs base of temperature time heat capacity times heat rate (T)

Examples
seepage.cpp.

Definition at line 123 of file seepage.cpp.

◆ OpBodyForce

using OpBodyForce
Initial value:

Definition at line 135 of file seepage.cpp.

◆ OpBoundaryInternal

◆ OpBoundaryMass

Initial value:

[Only used with Hencky/nonlinear material]

[Essential boundary conditions]

Examples
helmholtz.cpp.

Definition at line 70 of file seepage.cpp.

◆ OpBoundaryVec

◆ OpCapacity

using OpCapacity
Initial value:
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM > OpMass
[Only used with Hooke equation (linear material model)]
Definition seepage.cpp:56

Integrate Lhs base of temperature times (heat capacity) times base of temperature (T x T)

Definition at line 102 of file seepage.cpp.

◆ OpEssentialFluxLhs

Initial value:
GAUSS>::OpEssentialLhs<HeatFluxCubitBcData, 3, SPACE_DIM>

Definition at line 155 of file seepage.cpp.

◆ OpEssentialFluxRhs

Initial value:
GAUSS>::OpEssentialRhs<HeatFluxCubitBcData, 3, SPACE_DIM>

[Natural boundary conditions]

[Essential boundary conditions (Least square approach)]

Definition at line 152 of file seepage.cpp.

◆ OpForce

◆ OpHdivFlux

using OpHdivFlux
Initial value:

Integrating Rhs flux base (1/k) flux (FLUX)

Examples
seepage.cpp.

Definition at line 108 of file seepage.cpp.

◆ OpHDivH

using OpHDivH
Initial value:

Integrate Rhs div flux base times temperature (T)

Examples
seepage.cpp, and test_broken_space.cpp.

Definition at line 115 of file seepage.cpp.

◆ OpHdivHdiv

using OpHdivHdiv
Initial value:

Integrate Lhs base of flux (1/k) base of flux (FLUX x FLUX)

Examples
seepage.cpp.

Definition at line 86 of file seepage.cpp.

◆ OpHdivQ

using OpHdivQ
Initial value:

Integrate Lhs div of base of flux time base of temperature (FLUX x T) and transpose of it, i.e. (T x FLAX)

Examples
seepage.cpp.

Definition at line 94 of file seepage.cpp.

◆ OpHeatSource

using OpHeatSource
Initial value:

Definition at line 137 of file seepage.cpp.

◆ OpInertiaForce

◆ OpInternalForceCauchy

◆ OpInternalForcePiola

◆ OpKCauchy

using OpKCauchy
Initial value:
GAUSS>::OpGradSymTensorGrad<1, SPACE_DIM, SPACE_DIM, 0>

[Only used with Hooke equation (linear material model)]

Examples
seepage.cpp.

Definition at line 49 of file seepage.cpp.

◆ OpKPiola

using OpKPiola
Initial value:
GAUSS>::OpGradTensorGrad<1, SPACE_DIM, SPACE_DIM, 1>

[Only used for dynamics]

[Only used with Hencky/nonlinear material]

Examples
HenckyOps.hpp, PlasticOps.hpp, and adolc_plasticity.cpp.

Definition at line 63 of file seepage.cpp.

◆ OpMass

using OpMass
Initial value:

[Only used with Hooke equation (linear material model)]

[Only used for dynamics]

Examples
eigen_elastic.cpp, heat_method.cpp, plastic.cpp, and scalar_check_approximation.cpp.

Definition at line 56 of file seepage.cpp.

◆ OpTemperatureBC

◆ PostProcEle

Definition at line 43 of file seepage.cpp.

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc

[Create MoAB]

< mesh database

< mesh database interface

[Create MoAB]

[Create MoFEM]

< finite element database

< finite element database insterface

[Create MoFEM]

[Load mesh]

[Load mesh]

[Seepage]

[Seepage]

Definition at line 1110 of file seepage.cpp.

1110 {
1111
1112 // Initialisation of MoFEM/PETSc and MOAB data structures
1113 const char param_file[] = "param_file.petsc";
1114 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
1115
1116 // Add logging channel for example
1117 auto core_log = logging::core::get();
1118 core_log->add_sink(
1120 LogManager::setLog("Seepage");
1121 MOFEM_LOG_TAG("Seepage", "seepage");
1122 core_log->add_sink(
1124 LogManager::setLog("SeepageSync");
1125 MOFEM_LOG_TAG("SeepageSync", "seepage");
1126
1127 try {
1128
1129 //! [Register MoFEM discrete manager in PETSc]
1130 DMType dm_name = "DMMOFEM";
1131 CHKERR DMRegister_MoFEM(dm_name);
1132 //! [Register MoFEM discrete manager in PETSc
1133
1134 //! [Create MoAB]
1135 moab::Core mb_instance; ///< mesh database
1136 moab::Interface &moab = mb_instance; ///< mesh database interface
1137 //! [Create MoAB]
1138
1139 //! [Create MoFEM]
1140 MoFEM::Core core(moab); ///< finite element database
1141 MoFEM::Interface &m_field = core; ///< finite element database insterface
1142 //! [Create MoFEM]
1143
1144 //! [Load mesh]
1145 Simple *simple = m_field.getInterface<Simple>();
1146 CHKERR simple->getOptions();
1147 CHKERR simple->loadFile();
1148 //! [Load mesh]
1149
1150 //! [Seepage]
1151 Seepage ex(m_field);
1152 CHKERR ex.runProblem();
1153 //! [Seepage]
1154 }
1156
1158}
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition acoustic.cpp:69
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
static char help[]
[Solve]
Definition seepage.cpp:1108
Core (interface) class.
Definition Core.hpp:82
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:72
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:112
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
static boost::shared_ptr< std::ostream > getStrmSync()
Get the strm sync object.
Simple interface for fast problem set-up.
Definition Simple.hpp:27
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

Variable Documentation

◆ default_conductivity

double default_conductivity = 1
Examples
seepage.cpp.

Definition at line 164 of file seepage.cpp.

◆ default_poisson_ratio

double default_poisson_ratio = 0.25
Examples
seepage.cpp.

Definition at line 163 of file seepage.cpp.

◆ default_young_modulus

double default_young_modulus = 1
Examples
seepage.cpp.

Definition at line 162 of file seepage.cpp.

◆ fluid_density

double fluid_density = 10
Examples
seepage.cpp.

Definition at line 165 of file seepage.cpp.

◆ help

char help[] = "...\n\n"
static

[Solve]

Definition at line 1108 of file seepage.cpp.

◆ save_range

auto save_range
Initial value:
= [](moab::Interface &moab, const std::string name,
const Range r) {
auto out_meshset = get_temp_meshset_ptr(moab);
CHKERR moab.add_entities(*out_meshset, r);
CHKERR moab.write_file(name.c_str(), "VTK", "", out_meshset->get_ptr(), 1);
}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.
Examples
seepage.cpp.

Definition at line 170 of file seepage.cpp.

171 {
173 auto out_meshset = get_temp_meshset_ptr(moab);
174 CHKERR moab.add_entities(*out_meshset, r);
175 CHKERR moab.write_file(name.c_str(), "VTK", "", out_meshset->get_ptr(), 1);
177};

◆ scale

double scale = 1.

[Essential boundary conditions (Least square approach)]

Definition at line 160 of file seepage.cpp.

◆ SPACE_DIM

int SPACE_DIM
constexpr
Initial value:
=
#define EXECUTABLE_DIMENSION
Definition seepage.cpp:24
Examples
seepage.cpp.

Definition at line 34 of file seepage.cpp.