v0.15.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 143 of file seepage.cpp.

◆ DomainEle

◆ DomainNaturalBCLhs

◆ DomainNaturalBCRhs

Initial value:

[Body and heat source]

Definition at line 132 of file seepage.cpp.

◆ OpBaseDivFlux

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

Examples
seepage.cpp.

Definition at line 129 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, and shallow_wave.cpp.

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

◆ OpBodyForce

using OpBodyForce
Initial value:

Definition at line 134 of file seepage.cpp.

◆ OpBoundaryInternal

◆ OpBoundaryMass

Initial value:

[Only used with Hencky/nonlinear material]

[Essential boundary conditions]

Examples
helmholtz.cpp.

Definition at line 69 of file seepage.cpp.

◆ OpBoundaryVec

◆ OpCapacity

using OpCapacity
Initial value:

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

Definition at line 101 of file seepage.cpp.

◆ OpEssentialFluxLhs

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

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

◆ OpForce

◆ OpHdivFlux

using OpHdivFlux
Initial value:

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

Examples
seepage.cpp, and test_broken_space.cpp.

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

◆ OpHdivHdiv

using OpHdivHdiv
Initial value:

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

Examples
phase.cpp, seepage.cpp, and test_broken_space.cpp.

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

◆ OpHeatSource

using OpHeatSource
Initial value:

Definition at line 136 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
PlasticOps.hpp, and seepage.cpp.

Definition at line 48 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, adolc_plasticity.cpp, and thermo_elastic.cpp.

Definition at line 62 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, mofem/tutorials/vec-7/adjoint.cpp, plastic.cpp, and scalar_check_approximation.cpp.

Definition at line 55 of file seepage.cpp.

◆ OpTemperatureBC

◆ PostProcEle

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

1098 {
1099
1100 // Initialisation of MoFEM/PETSc and MOAB data structures
1101 const char param_file[] = "param_file.petsc";
1102 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
1103
1104 // Add logging channel for example
1105 auto core_log = logging::core::get();
1106 core_log->add_sink(
1108 LogManager::setLog("Seepage");
1109 MOFEM_LOG_TAG("Seepage", "seepage");
1110 core_log->add_sink(
1112 LogManager::setLog("SeepageSync");
1113 MOFEM_LOG_TAG("SeepageSync", "seepage");
1114
1115 try {
1116
1117 //! [Register MoFEM discrete manager in PETSc]
1118 DMType dm_name = "DMMOFEM";
1119 CHKERR DMRegister_MoFEM(dm_name);
1120 //! [Register MoFEM discrete manager in PETSc
1121
1122 //! [Create MoAB]
1123 moab::Core mb_instance; ///< mesh database
1124 moab::Interface &moab = mb_instance; ///< mesh database interface
1125 //! [Create MoAB]
1126
1127 //! [Create MoFEM]
1128 MoFEM::Core core(moab); ///< finite element database
1129 MoFEM::Interface &m_field = core; ///< finite element database insterface
1130 //! [Create MoFEM]
1131
1132 //! [Load mesh]
1133 Simple *simple = m_field.getInterface<Simple>();
1135 CHKERR simple->loadFile();
1136 //! [Load mesh]
1137
1138 //! [Seepage]
1139 Seepage ex(m_field);
1140 CHKERR ex.runProblem();
1141 //! [Seepage]
1142 }
1144
1146}
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:1096
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:118
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 getOptions()
get options
Definition Simple.cpp:180
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 163 of file seepage.cpp.

◆ default_poisson_ratio

double default_poisson_ratio = 0.25
Examples
seepage.cpp.

Definition at line 162 of file seepage.cpp.

◆ default_young_modulus

double default_young_modulus = 1
Examples
seepage.cpp.

Definition at line 161 of file seepage.cpp.

◆ fluid_density

double fluid_density = 10
Examples
seepage.cpp.

Definition at line 164 of file seepage.cpp.

◆ help

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

[Solve]

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

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

◆ scale

double scale = 1.

[Essential boundary conditions (Least square approach)]

Definition at line 159 of file seepage.cpp.

◆ SPACE_DIM

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

Definition at line 33 of file seepage.cpp.