v0.14.0
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
Examples
seepage.cpp.

Definition at line 24 of file seepage.cpp.

Typedef Documentation

◆ AssemblyDomainEleOp

Definition at line 46 of file seepage.cpp.

◆ BoundaryEle

Definition at line 41 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 146 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 141 of file seepage.cpp.

◆ DomainNaturalBCRhs

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

[Body and heat source]

Definition at line 135 of file seepage.cpp.

◆ EntData

Examples
seepage.cpp.

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

◆ OpBodyForce

Definition at line 137 of file seepage.cpp.

◆ OpBoundaryInternal

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

Definition at line 75 of file seepage.cpp.

◆ OpBoundaryMass

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

[Only used with Hencky/nonlinear material]

[Essential boundary conditions]

Definition at line 71 of file seepage.cpp.

◆ OpBoundaryVec

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

Definition at line 73 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 104 of file seepage.cpp.

◆ OpEssentialFluxLhs

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

Definition at line 158 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 155 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 110 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 117 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 88 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 96 of file seepage.cpp.

◆ OpHeatSource

Definition at line 139 of file seepage.cpp.

◆ OpInertiaForce

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

Definition at line 59 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 52 of file seepage.cpp.

◆ OpInternalForcePiola

using OpInternalForcePiola = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpGradTimesTensor<1, SPACE_DIM, SPACE_DIM>
Examples
PlasticOps.hpp.

Definition at line 66 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 50 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 64 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]

Examples
plastic.cpp, scalar_check_approximation.cpp, and schur_test_diag_mat.cpp.

Definition at line 57 of file seepage.cpp.

◆ OpScaleL2

[Essential boundary conditions]

Definition at line 77 of file seepage.cpp.

◆ OpTemperatureBC

Definition at line 149 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]

Examples
seepage.cpp.

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(
1120  LogManager::createSink(LogManager::getStrmWorld(), "Seepage"));
1121  LogManager::setLog("Seepage");
1122  MOFEM_LOG_TAG("Seepage", "seepage");
1123  core_log->add_sink(
1124  LogManager::createSink(LogManager::getStrmSync(), "SeepageSync"));
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  }
1156  CATCH_ERRORS;
1157 
1159 }

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]

Examples
seepage.cpp.

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);
}
Examples
seepage.cpp.

Definition at line 171 of file seepage.cpp.

◆ scale

double scale = 1.

[Essential boundary conditions (Least square approach)]

Examples
seepage.cpp.

Definition at line 161 of file seepage.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
Examples
seepage.cpp.

Definition at line 34 of file seepage.cpp.

MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
help
static char help[]
[Solve]
Definition: seepage.cpp:1109
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
sdf.r
int r
Definition: sdf.py:8
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1975
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEM::get_temp_meshset_ptr
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.
Definition: Templates.hpp:1864
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
Seepage
Definition: seepage.cpp:180
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:43
EXECUTABLE_DIMENSION
#define EXECUTABLE_DIMENSION
Definition: seepage.cpp:24
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
Range
MoFEM::CoreTmp< 0 >::Initialize
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
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1102
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346