v0.14.0
Classes | Macros | Typedefs | Functions | Variables
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 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 OpBaseDivU = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMixScalarTimesDiv< SPACE_DIM >
 [Essential boundary conditions] More...
 
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 temperature 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 temperature time heat capacity times heat rate (T) More...
 
using OpBaseDivFlux = OpBaseDotH
 Integrate Rhs base of temperature times divergent 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 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

Examples
seepage.cpp.

Definition at line 37 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

[Essential boundary conditions]

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 temperature 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 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 temperature 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 157 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 154 of file seepage.cpp.

◆ OpForce

Definition at line 146 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, and test_broken_space.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 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
HenckyOps.hpp, and 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
HenckyOps.hpp, and 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.

◆ 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]

Examples
seepage.cpp.

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

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]

Examples
seepage.cpp.

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

Definition at line 170 of file seepage.cpp.

◆ scale

double scale = 1.

[Essential boundary conditions (Least square approach)]

Examples
seepage.cpp.

Definition at line 160 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:1108
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:2010
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::get_temp_meshset_ptr
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.
Definition: Templates.hpp:1886
simple
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
Seepage
Definition: seepage.cpp:179
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:385
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1148
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359