v0.14.0
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
seepage.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <IntegrationRules.hpp>
#include <BasicFiniteElements.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 EntData = EntitiesFieldData::EntData
 
using DomainEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::BoundaryEle
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using AssemblyDomainEleOp = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::OpBase
 
using OpKCauchy = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 >
 [Only used with Hooke equation (linear material model)] More...
 
using OpInternalForceCauchy = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesSymTensor< 1, SPACE_DIM, SPACE_DIM >
 
using OpMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM >
 [Only used with Hooke equation (linear material model)] More...
 
using OpInertiaForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, 1 >
 
using OpKPiola = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradTensorGrad< 1, SPACE_DIM, SPACE_DIM, 1 >
 [Only used for dynamics] More...
 
using OpInternalForcePiola = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesTensor< 1, SPACE_DIM, SPACE_DIM >
 
using OpBoundaryMass = FormsIntegrators< BoundaryEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM >
 [Only used with Hencky/nonlinear material] More...
 
using OpBoundaryVec = FormsIntegrators< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, 0 >
 
using OpBoundaryInternal = FormsIntegrators< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, 1 >
 
using OpScaleL2 = MoFEM::OpScaleBaseBySpaceInverseOfMeasure< DomainEleOp >
 [Essential boundary conditions] More...
 
using OpBaseDivU = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMixScalarTimesDiv< SPACE_DIM >
 
using OpHdivHdiv = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 3, 3 >
 Integrate Lhs base of flux (1/k) base of flux (FLUX x FLUX) More...
 
using OpHdivQ = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMixDivTimesScalar< SPACE_DIM >
 Integrate Lhs div of base of flux time base of temperature (FLUX x T) and transpose of it, i.e. (T x FLAX) More...
 
using OpCapacity = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 1 >
 Integrate Lhs base of temerature times (heat capacity) times base of temperature (T x T) More...
 
using OpHdivFlux = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 3, 3, 1 >
 Integrating Rhs flux base (1/k) flux (FLUX) More...
 
using OpHDivH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpMixDivTimesU< 3, 1, 2 >
 Integrate Rhs div flux base times temperature (T) More...
 
using OpBaseDotH = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesScalarField< 1 >
 Integrate Rhs base of temerature time heat capacity times heat rate (T) More...
 
using OpBaseDivFlux = OpBaseDotH
 Integrate Rhs base of temerature times divergenc of flux (T) More...
 
using DomainNaturalBCRhs = NaturalBC< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 [Body and heat source] More...
 
using OpBodyForce = DomainNaturalBCRhs::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, SPACE_DIM >
 
using OpHeatSource = DomainNaturalBCRhs::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, 1 >
 
using DomainNaturalBCLhs = NaturalBC< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >
 
using BoundaryNaturalBC = NaturalBC< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 [Body and heat source] More...
 
using OpForce = BoundaryNaturalBC::OpFlux< NaturalForceMeshsets, 1, SPACE_DIM >
 
using OpTemperatureBC = BoundaryNaturalBC::OpFlux< NaturalTemperatureMeshsets, 3, SPACE_DIM >
 
using OpEssentialFluxRhs = EssentialBC< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpEssentialRhs< HeatFluxCubitBcData, 3, SPACE_DIM >
 [Natural boundary conditions] More...
 
using OpEssentialFluxLhs = EssentialBC< BoundaryEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpEssentialLhs< HeatFluxCubitBcData, 3, SPACE_DIM >
 

Functions

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

Variables

constexpr int SPACE_DIM
 
double scale = 1.
 [Essential boundary conditions (Least square approach)] More...
 
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] More...
 

Macro Definition Documentation

◆ EXECUTABLE_DIMENSION

#define EXECUTABLE_DIMENSION   2

Definition at line 24 of file seepage.cpp.

Typedef Documentation

◆ AssemblyDomainEleOp

Definition at line 45 of file seepage.cpp.

◆ BoundaryEle

Definition at line 40 of file seepage.cpp.

◆ BoundaryEleOp

Definition at line 42 of file seepage.cpp.

◆ BoundaryNaturalBC

using BoundaryNaturalBC = NaturalBC<BoundaryEleOp>::Assembly<PETSC>::LinearForm<GAUSS>

[Body and heat source]

[Natural boundary conditions]

Definition at line 145 of file seepage.cpp.

◆ DomainEle

Definition at line 38 of file seepage.cpp.

◆ DomainEleOp

Definition at line 39 of file seepage.cpp.

◆ DomainNaturalBCLhs

using DomainNaturalBCLhs = NaturalBC<DomainEleOp>::Assembly<PETSC>::BiLinearForm<GAUSS>

Definition at line 140 of file seepage.cpp.

◆ DomainNaturalBCRhs

using DomainNaturalBCRhs = NaturalBC<DomainEleOp>::Assembly<PETSC>::LinearForm<GAUSS>

[Body and heat source]

Definition at line 134 of file seepage.cpp.

◆ EntData

Definition at line 37 of file seepage.cpp.

◆ OpBaseDivFlux

Integrate Rhs base of temerature times divergenc of flux (T)

Examples
seepage.cpp.

Definition at line 131 of file seepage.cpp.

◆ OpBaseDivU

Examples
seepage.cpp.

Definition at line 79 of file seepage.cpp.

◆ OpBaseDotH

using OpBaseDotH = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpBaseTimesScalarField<1>

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

Examples
seepage.cpp.

Definition at line 124 of file seepage.cpp.

◆ OpBodyForce

Definition at line 136 of file seepage.cpp.

◆ OpBoundaryInternal

using OpBoundaryInternal = FormsIntegrators<BoundaryEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesVector<1, SPACE_DIM, 1>

Definition at line 74 of file seepage.cpp.

◆ OpBoundaryMass

[Only used with Hencky/nonlinear material]

[Essential boundary conditions]

Examples
helmholtz.cpp.

Definition at line 70 of file seepage.cpp.

◆ OpBoundaryVec

using OpBoundaryVec = FormsIntegrators<BoundaryEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesVector<1, SPACE_DIM, 0>

Definition at line 72 of file seepage.cpp.

◆ OpCapacity

using OpCapacity = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, 1>

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

Definition at line 103 of file seepage.cpp.

◆ OpEssentialFluxLhs

using OpEssentialFluxLhs = EssentialBC<BoundaryEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpEssentialLhs<HeatFluxCubitBcData, 3, SPACE_DIM>

Definition at line 156 of file seepage.cpp.

◆ OpEssentialFluxRhs

using OpEssentialFluxRhs = EssentialBC<BoundaryEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpEssentialRhs<HeatFluxCubitBcData, 3, SPACE_DIM>

[Natural boundary conditions]

[Essential boundary conditions (Least square approach)]

Definition at line 153 of file seepage.cpp.

◆ OpForce

Definition at line 147 of file seepage.cpp.

◆ OpHdivFlux

using OpHdivFlux = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpBaseTimesVector<3, 3, 1>

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

Examples
seepage.cpp.

Definition at line 109 of file seepage.cpp.

◆ OpHDivH

using OpHDivH = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpMixDivTimesU<3, 1, 2>

Integrate Rhs div flux base times temperature (T)

Examples
seepage.cpp.

Definition at line 116 of file seepage.cpp.

◆ OpHdivHdiv

using OpHdivHdiv = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<3, 3>

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

Examples
seepage.cpp.

Definition at line 87 of file seepage.cpp.

◆ OpHdivQ

using OpHdivQ = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMixDivTimesScalar<SPACE_DIM>

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 95 of file seepage.cpp.

◆ OpHeatSource

Definition at line 138 of file seepage.cpp.

◆ OpInertiaForce

using OpInertiaForce = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpBaseTimesVector<1, SPACE_DIM, 1>

Definition at line 58 of file seepage.cpp.

◆ OpInternalForceCauchy

using OpInternalForceCauchy = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpGradTimesSymTensor<1, SPACE_DIM, SPACE_DIM>
Examples
seepage.cpp.

Definition at line 51 of file seepage.cpp.

◆ OpInternalForcePiola

Examples
PlasticOps.hpp.

Definition at line 65 of file seepage.cpp.

◆ OpKCauchy

using OpKCauchy = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< 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 = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpGradTensorGrad<1, SPACE_DIM, SPACE_DIM, 1>

[Only used for dynamics]

[Only used with Hencky/nonlinear material]

Examples
PlasticOps.hpp.

Definition at line 63 of file seepage.cpp.

◆ OpMass

using OpMass = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, SPACE_DIM>

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

[Only used for dynamics]

Definition at line 56 of file seepage.cpp.

◆ OpScaleL2

[Essential boundary conditions]

Definition at line 77 of file seepage.cpp.

◆ OpTemperatureBC

Definition at line 148 of file seepage.cpp.

◆ 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 1111 of file seepage.cpp.

1111 {
1112
1113 // Initialisation of MoFEM/PETSc and MOAB data structures
1114 const char param_file[] = "param_file.petsc";
1115 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
1116
1117 // Add logging channel for example
1118 auto core_log = logging::core::get();
1119 core_log->add_sink(
1121 LogManager::setLog("Seepage");
1122 MOFEM_LOG_TAG("Seepage", "seepage");
1123 core_log->add_sink(
1125 LogManager::setLog("SeepageSync");
1126 MOFEM_LOG_TAG("SeepageSync", "seepage");
1127
1128 try {
1129
1130 //! [Register MoFEM discrete manager in PETSc]
1131 DMType dm_name = "DMMOFEM";
1132 CHKERR DMRegister_MoFEM(dm_name);
1133 //! [Register MoFEM discrete manager in PETSc
1134
1135 //! [Create MoAB]
1136 moab::Core mb_instance; ///< mesh database
1137 moab::Interface &moab = mb_instance; ///< mesh database interface
1138 //! [Create MoAB]
1139
1140 //! [Create MoFEM]
1141 MoFEM::Core core(moab); ///< finite element database
1142 MoFEM::Interface &m_field = core; ///< finite element database insterface
1143 //! [Create MoFEM]
1144
1145 //! [Load mesh]
1146 Simple *simple = m_field.getInterface<Simple>();
1147 CHKERR simple->getOptions();
1148 CHKERR simple->loadFile();
1149 //! [Load mesh]
1150
1151 //! [Seepage]
1152 Seepage ex(m_field);
1153 CHKERR ex.runProblem();
1154 //! [Seepage]
1155 }
1157
1159}
std::string param_file
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:389
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
static char help[]
[Solve]
Definition: seepage.cpp:1109
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.
Definition: LogManager.cpp:298
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:344
static boost::shared_ptr< std::ostream > getStrmSync()
Get the strm sync object.
Definition: LogManager.cpp:348
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.

Variable Documentation

◆ default_conductivity

double default_conductivity = 1
Examples
seepage.cpp.

Definition at line 165 of file seepage.cpp.

◆ default_poisson_ratio

double default_poisson_ratio = 0.25
Examples
seepage.cpp.

Definition at line 164 of file seepage.cpp.

◆ default_young_modulus

double default_young_modulus = 1
Examples
seepage.cpp.

Definition at line 163 of file seepage.cpp.

◆ fluid_density

double fluid_density = 10
Examples
seepage.cpp.

Definition at line 166 of file seepage.cpp.

◆ help

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

[Solve]

Definition at line 1109 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 ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.
Definition: Templates.hpp:1857
Examples
seepage.cpp.

Definition at line 171 of file seepage.cpp.

◆ scale

double scale = 1.

[Essential boundary conditions (Least square approach)]

Definition at line 161 of file seepage.cpp.

◆ SPACE_DIM

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

Definition at line 34 of file seepage.cpp.