v0.14.0
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, 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 34 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 86 of file dynamic_first_order_con_law.cpp.

◆ DomainEle

Definition at line 28 of file dynamic_first_order_con_law.cpp.

◆ 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 68 of file dynamic_first_order_con_law.cpp.

◆ EntData

Definition at line 27 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 65 of file dynamic_first_order_con_law.cpp.

◆ OpBodyForceVector

Definition at line 70 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, 1>

Definition at line 62 of file dynamic_first_order_con_law.cpp.

◆ OpMassF

◆ OpMassV

◆ 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 31 of file dynamic_first_order_con_law.cpp.

◆ SetPtsData

Definition at line 37 of file dynamic_first_order_con_law.cpp.

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

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(
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 }
1249
1251}
std::string param_file
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
static char help[]
[Check]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
Definition: LogManager.cpp:389
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
[Example]
Definition: plastic.cpp:226
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:112
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
Definition: LogManager.cpp:298
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
Definition: LogManager.cpp:344

◆ 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};
constexpr double third

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

Definition at line 1211 of file dynamic_first_order_con_law.cpp.

◆ lamme_lambda

double lamme_lambda
Initial value:
((1. + poisson_ratio) * (1. - 2. * poisson_ratio))
constexpr double poisson_ratio
constexpr double young_modulus
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, and shallow_wave.cpp.

Definition at line 93 of file dynamic_first_order_con_law.cpp.

◆ 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
Initial value:
=
#define EXECUTABLE_DIMENSION
Definition: plastic.cpp:13

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

Definition at line 94 of file dynamic_first_order_con_law.cpp.