v0.14.0
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< DIM >
 
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, 1 >
 
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, 1 >
 
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. More...
 
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< TSPrePostProctsPrePostProc
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ BoundaryEle

Definition at line 35 of file dynamic_first_order_con_law.cpp.

◆ BoundaryEleOp

Definition at line 36 of file dynamic_first_order_con_law.cpp.

◆ BoundaryNaturalBC

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

Definition at line 87 of file dynamic_first_order_con_law.cpp.

◆ DomainEle

◆ DomainEleOp

Definition at line 29 of file dynamic_first_order_con_law.cpp.

◆ DomainNaturalBC

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

Definition at line 69 of file dynamic_first_order_con_law.cpp.

◆ EntData

◆ OpBodyForce

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

◆ OpBodyForceVector

Definition at line 72 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 84 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, 1>
Examples
plastic.cpp.

Definition at line 63 of file dynamic_first_order_con_law.cpp.

◆ OpMassF

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

◆ OpMassV

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

◆ OpRhsTestPiola

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

◆ PostProcEle

Definition at line 30 of file dynamic_first_order_con_law.cpp.

◆ PostProcEleBdy

Definition at line 55 of file dynamic_first_order_con_law.cpp.

◆ PostProcEleDomain

Definition at line 53 of file dynamic_first_order_con_law.cpp.

◆ PostProcFaceEle

Definition at line 32 of file dynamic_first_order_con_law.cpp.

◆ SetPtsData

◆ SideEle

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

Examples
dynamic_first_order_con_law.cpp.

Definition at line 1213 of file dynamic_first_order_con_law.cpp.

1213  {
1214 
1215  // Initialisation of MoFEM/PETSc and MOAB data structures
1216  const char param_file[] = "param_file.petsc";
1217  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
1218 
1219  // Add logging channel for example
1220  auto core_log = logging::core::get();
1221  core_log->add_sink(
1222  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
1223  LogManager::setLog("EXAMPLE");
1224  MOFEM_LOG_TAG("EXAMPLE", "example");
1225 
1226  try {
1227 
1228  //! [Register MoFEM discrete manager in PETSc]
1229  DMType dm_name = "DMMOFEM";
1230  CHKERR DMRegister_MoFEM(dm_name);
1231  //! [Register MoFEM discrete manager in PETSc
1232 
1233  //! [Create MoAB]
1234  moab::Core mb_instance; ///< mesh database
1235  moab::Interface &moab = mb_instance; ///< mesh database interface
1236  //! [Create MoAB]
1237 
1238  //! [Create MoFEM]
1239  MoFEM::Core core(moab); ///< finite element database
1240  MoFEM::Interface &m_field = core; ///< finite element database interface
1241  //! [Create MoFEM]
1242 
1243  //! [Example]
1244  Example ex(m_field);
1245  CHKERR ex.runProblem();
1246  //! [Example]
1247  }
1248  CATCH_ERRORS;
1249 
1251 }

◆ trace() [1/2]

template<typename T >
double trace ( FTensor::Tensor2< T, 2, 2 > &  t_stress)
inline
Examples
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  constexpr double third = boost::math::constants::third<double>();
21  return (t_stress(0, 0) + t_stress(1, 1) + t_stress(2, 2));
22 };

Variable Documentation

◆ bulk_modulus_K

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

◆ help

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

[Check]

Examples
dynamic_first_order_con_law.cpp.

Definition at line 1211 of file dynamic_first_order_con_law.cpp.

◆ lamme_lambda

double lamme_lambda
Initial value:
Examples
dynamic_first_order_con_law.cpp.

Definition at line 99 of file dynamic_first_order_con_law.cpp.

◆ mu

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

◆ omega

constexpr double omega = 1.
constexpr

Save field DOFS on vertices/tags.

Examples
dynamic_first_order_con_law.cpp.

Definition at line 93 of file dynamic_first_order_con_law.cpp.

◆ poisson_ratio

constexpr double poisson_ratio = 0.
constexpr

◆ shear_modulus_G

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

◆ SPACE_DIM

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

Definition at line 24 of file dynamic_first_order_con_law.cpp.

◆ tsPrePostProc

boost::weak_ptr<TSPrePostProc> tsPrePostProc
static

◆ young_modulus

constexpr double young_modulus = 1.
constexpr
EXECUTABLE_DIMENSION
#define EXECUTABLE_DIMENSION
Definition: plastic.cpp:13
young_modulus
constexpr double young_modulus
Definition: dynamic_first_order_con_law.cpp:94
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
poisson_ratio
constexpr double poisson_ratio
Definition: dynamic_first_order_con_law.cpp:95
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
Example
[Example]
Definition: plastic.cpp:177
help
static char help[]
[Check]
Definition: dynamic_first_order_con_law.cpp:1211
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:43
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
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
third
constexpr double third
Definition: EshelbianADOL-C.cpp:17