v0.16.3
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
dynamic_first_order_con_law.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>

Go to the source code of this file.

Classes

struct  PostProcEleByDim< 2 >
 
struct  PostProcEleByDim< 3 >
 
struct  OpCalculateFStab< DIM_0, DIM_1 >
 
struct  OpCalculatePiola< DIM_0, DIM_1 >
 
struct  OpCalculateDisplacement< DIM >
 
struct  OpCalculatePiolaIncompressibleNH< DIM_0, DIM_1 >
 
struct  OpCalculateDeformationGradient< DIM_0, DIM_1 >
 
struct  TSPrePostProc
 Set of functions called by PETSc solver used to refine and update mesh. More...
 
struct  LinMomTimeScale
 
struct  CommonData
 
struct  Example
 [Example] More...
 
struct  Example::DynamicFirstOrderConsSinusTimeScale
 
struct  Example::DynamicFirstOrderConsConstantTimeScale
 
struct  Monitor
 [Push operators to pipeline] More...
 

Typedefs

using EntData = EntitiesFieldData::EntData
 
using DomainEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using PostProcFaceEle = PostProcBrokenMeshInMoab< FaceElementForcesAndSourcesCore >
 
using BoundaryEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::BoundaryEle
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using SetPtsData = FieldEvaluatorInterface::SetPtsData
 
using PostProcEleDomain = PostProcEleByDim< SPACE_DIM >::PostProcEleDomain
 
using SideEle = PostProcEleByDim< SPACE_DIM >::SideEle
 
using PostProcEleBdy = PostProcEleByDim< SPACE_DIM >::PostProcEleBdy
 
using OpMassV = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM >
 
using OpMassF = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM *SPACE_DIM >
 
using OpInertiaForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, SPACE_DIM >
 
using OpBodyForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, 0 >
 
using DomainNaturalBC = NaturalBC< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 
using OpBodyForceVector = DomainNaturalBC::OpFlux< NaturalMeshsetTypeVectorScaling< BLOCKSET >, 1, SPACE_DIM >
 
using OpGradTimesTensor2 = FormsIntegrators< DomainEleOp >::Assembly< AssemblyType::PETSC >::LinearForm< IntegrationType::GAUSS >::OpGradTimesTensor< 1, SPACE_DIM, SPACE_DIM >
 
using OpRhsTestPiola = FormsIntegrators< DomainEleOp >::Assembly< AssemblyType::PETSC >::LinearForm< IntegrationType::GAUSS >::OpBaseTimesVector< 1, SPACE_DIM *SPACE_DIM, SPACE_DIM *SPACE_DIM >
 
using OpGradTimesPiola = FormsIntegrators< DomainEleOp >::Assembly< AssemblyType::PETSC >::LinearForm< IntegrationType::GAUSS >::OpGradTimesTensor< 1, SPACE_DIM, SPACE_DIM >
 
using BoundaryNaturalBC = NaturalBC< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 
using OpForce = BoundaryNaturalBC::OpFlux< NaturalForceMeshsets, 1, SPACE_DIM >
 

Functions

template<typename T >
double trace (FTensor::Tensor2< T, 2, 2 > &t_stress)
 
template<typename T >
double trace (FTensor::Tensor2< T, 3, 3 > &t_stress)
 
int main (int argc, char *argv[])
 

Variables

constexpr int SPACE_DIM
 
constexpr double omega = 1.
 Save field DOFS on vertices/tags.
 
constexpr double young_modulus = 1.
 
constexpr double poisson_ratio = 0.
 
double bulk_modulus_K = young_modulus / (3. * (1. - 2. * poisson_ratio))
 
double shear_modulus_G = young_modulus / (2. * (1. + poisson_ratio))
 
double mu = young_modulus / (2. * (1. + poisson_ratio))
 
double lamme_lambda
 
static boost::weak_ptr< TSPrePostProc > tsPrePostProc
 
static char help [] = "...\n\n"
 [Check]
 

Typedef Documentation

◆ BoundaryEle

Definition at line 33 of file dynamic_first_order_con_law.cpp.

◆ BoundaryEleOp

Definition at line 35 of file dynamic_first_order_con_law.cpp.

◆ BoundaryNaturalBC

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

Definition at line 86 of file dynamic_first_order_con_law.cpp.

◆ DomainEle

Definition at line 27 of file dynamic_first_order_con_law.cpp.

◆ DomainEleOp

Definition at line 28 of file dynamic_first_order_con_law.cpp.

◆ DomainNaturalBC

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

Definition at line 67 of file dynamic_first_order_con_law.cpp.

◆ EntData

Definition at line 26 of file dynamic_first_order_con_law.cpp.

◆ OpBodyForce

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

Definition at line 64 of file dynamic_first_order_con_law.cpp.

◆ OpBodyForceVector

Definition at line 69 of file dynamic_first_order_con_law.cpp.

◆ OpForce

Definition at line 88 of file dynamic_first_order_con_law.cpp.

◆ OpGradTimesPiola

using OpGradTimesPiola = FormsIntegrators<DomainEleOp>::Assembly<AssemblyType::PETSC>::LinearForm< IntegrationType::GAUSS>::OpGradTimesTensor<1, SPACE_DIM, SPACE_DIM>

Definition at line 82 of file dynamic_first_order_con_law.cpp.

◆ OpGradTimesTensor2

using OpGradTimesTensor2 = FormsIntegrators<DomainEleOp>::Assembly<AssemblyType::PETSC>::LinearForm< IntegrationType::GAUSS>::OpGradTimesTensor<1, SPACE_DIM, SPACE_DIM>

◆ OpInertiaForce

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

◆ OpMassF

◆ OpMassV

◆ OpRhsTestPiola

using OpRhsTestPiola = FormsIntegrators<DomainEleOp>::Assembly<AssemblyType::PETSC>::LinearForm< IntegrationType::GAUSS>::OpBaseTimesVector<1, SPACE_DIM * SPACE_DIM, SPACE_DIM * SPACE_DIM>

◆ PostProcEle

Definition at line 29 of file dynamic_first_order_con_law.cpp.

◆ PostProcEleBdy

Definition at line 54 of file dynamic_first_order_con_law.cpp.

◆ PostProcEleDomain

Definition at line 52 of file dynamic_first_order_con_law.cpp.

◆ PostProcFaceEle

Definition at line 30 of file dynamic_first_order_con_law.cpp.

◆ SetPtsData

Definition at line 36 of file dynamic_first_order_con_law.cpp.

◆ SideEle

Definition at line 53 of file dynamic_first_order_con_law.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 interface

[Create MoFEM]

[Example]

[Example]

Definition at line 1189 of file dynamic_first_order_con_law.cpp.

1189 {
1190
1191 // Initialisation of MoFEM/PETSc and MOAB data structures
1192 const char param_file[] = "param_file.petsc";
1193 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
1194
1195 // Add logging channel for example
1196 auto core_log = logging::core::get();
1197 core_log->add_sink(
1199 LogManager::setLog("EXAMPLE");
1200 MOFEM_LOG_TAG("EXAMPLE", "example");
1201
1202 try {
1203
1204 //! [Register MoFEM discrete manager in PETSc]
1205 DMType dm_name = "DMMOFEM";
1206 CHKERR DMRegister_MoFEM(dm_name);
1207 //! [Register MoFEM discrete manager in PETSc
1208
1209 //! [Create MoAB]
1210 moab::Core mb_instance; ///< mesh database
1211 moab::Interface &moab = mb_instance; ///< mesh database interface
1212 //! [Create MoAB]
1213
1214 //! [Create MoFEM]
1215 MoFEM::Core core(moab); ///< finite element database
1216 MoFEM::Interface &m_field = core; ///< finite element database interface
1217 //! [Create MoFEM]
1218
1219 //! [Example]
1220 Example ex(m_field);
1221 CHKERR ex.runProblem();
1222 //! [Example]
1223 }
1225
1227}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
static char help[]
[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.
[Example]
Definition plastic.cpp:216
Core (interface) class.
Definition Core.hpp:83
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:68
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:123
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.

◆ trace() [1/2]

template<typename T >
double trace ( FTensor::Tensor2< T, 2, 2 > &  t_stress)
inline
Examples
PlasticOpsGeneric.hpp, and mofem/tutorials/adv-4_dynamic_first_order_con_law/dynamic_first_order_con_law.cpp.

Definition at line 14 of file dynamic_first_order_con_law.cpp.

14 {
15 constexpr double third = boost::math::constants::third<double>();
16 return (t_stress(0, 0) + t_stress(1, 1));
17};

◆ trace() [2/2]

template<typename T >
double trace ( FTensor::Tensor2< T, 3, 3 > &  t_stress)
inline

Definition at line 19 of file dynamic_first_order_con_law.cpp.

19 {
20 return (t_stress(0, 0) + t_stress(1, 1) + t_stress(2, 2));
21};

Variable Documentation

◆ bulk_modulus_K

double bulk_modulus_K = young_modulus / (3. * (1. - 2. * poisson_ratio))

◆ help

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

[Check]

Definition at line 1187 of file dynamic_first_order_con_law.cpp.

◆ lamme_lambda

double lamme_lambda

◆ mu

double mu = young_modulus / (2. * (1. + poisson_ratio))

◆ omega

constexpr double omega = 1.
constexpr

◆ poisson_ratio

constexpr double poisson_ratio = 0.
constexpr

Definition at line 95 of file dynamic_first_order_con_law.cpp.

◆ shear_modulus_G

double shear_modulus_G = young_modulus / (2. * (1. + poisson_ratio))

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr

◆ tsPrePostProc

boost::weak_ptr<TSPrePostProc> tsPrePostProc
static

◆ young_modulus

constexpr double young_modulus = 1.
constexpr

Definition at line 94 of file dynamic_first_order_con_law.cpp.