v0.10.0
Classes | Typedefs | Functions | Variables
elastic.cpp File Reference
#include <MoFEM.hpp>
#include <OpPostProcElastic.hpp>

Go to the source code of this file.

Classes

struct  Example
 [Example] More...
 

Typedefs

using EntData = DataForcesAndSourcesCore::EntData
 
using DomainEle = FaceElementForcesAndSourcesCoreBase
 
using DomainEleOp = DomainEle::UserDataOperator
 
using OpK = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 >
 
using OpBodyForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, 0 >
 
using OpInternalForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesSymTensor< 1, SPACE_DIM, SPACE_DIM >
 

Functions

int main (int argc, char *argv[])
 

Variables

constexpr int SPACE_DIM = 2
 
constexpr double young_modulus = 1
 
constexpr double poisson_ratio = 0.25
 
constexpr double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio))
 
constexpr double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio))
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ DomainEle

Definition at line 28 of file elastic.cpp.

◆ DomainEleOp

Definition at line 29 of file elastic.cpp.

◆ EntData

Definition at line 27 of file elastic.cpp.

◆ OpBodyForce

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

Definition at line 35 of file elastic.cpp.

◆ OpInternalForce

using OpInternalForce = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::LinearForm< GAUSS>::OpGradTimesSymTensor<1, SPACE_DIM, SPACE_DIM>

Definition at line 37 of file elastic.cpp.

◆ OpK

using OpK = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpGradSymTensorGrad<1, SPACE_DIM, SPACE_DIM, 0>
Examples
PoissonOperators.hpp, and simple_elasticity.cpp.

Definition at line 33 of file elastic.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 341 of file elastic.cpp.

341  {
342 
343  // Initialisation of MoFEM/PETSc and MOAB data structures
344  const char param_file[] = "param_file.petsc";
345  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
346 
347  try {
348 
349  //! [Register MoFEM discrete manager in PETSc]
350  DMType dm_name = "DMMOFEM";
351  CHKERR DMRegister_MoFEM(dm_name);
352  //! [Register MoFEM discrete manager in PETSc
353 
354  //! [Create MoAB]
355  moab::Core mb_instance; ///< mesh database
356  moab::Interface &moab = mb_instance; ///< mesh database interface
357  //! [Create MoAB]
358 
359  //! [Create MoFEM]
360  MoFEM::Core core(moab); ///< finite element database
361  MoFEM::Interface &m_field = core; ///< finite element database insterface
362  //! [Create MoFEM]
363 
364  //! [Example]
365  Example ex(m_field);
366  CHKERR ex.runProblem();
367  //! [Example]
368  }
369  CATCH_ERRORS;
370 
372 }

Variable Documentation

◆ bulk_modulus_K

constexpr double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio))
constexpr
Examples
contact.cpp.

Definition at line 43 of file elastic.cpp.

◆ help

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

[Check]

Definition at line 339 of file elastic.cpp.

◆ poisson_ratio

constexpr double poisson_ratio = 0.25
constexpr

Definition at line 42 of file elastic.cpp.

◆ shear_modulus_G

constexpr double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio))
constexpr
Examples
contact.cpp.

Definition at line 44 of file elastic.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr

Definition at line 31 of file elastic.cpp.

◆ young_modulus

constexpr double young_modulus = 1
constexpr

Definition at line 41 of file elastic.cpp.

MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:26
Example
[Example]
Definition: plastic.cpp:113
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1943
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:604
param_file
std::string param_file
Definition: DefaultParams.hpp:29
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:60
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:48
help
static char help[]
[Check]
Definition: elastic.cpp:339
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:77
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:100
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:441
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1129