v0.14.0
Classes | Typedefs | Functions | Variables
eigen_elastic.cpp File Reference
#include <MoFEM.hpp>
#include <slepceps.h>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  Example
 [Example] More...
 

Typedefs

using EntData = EntitiesFieldData::EntData
 
using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using PostProcEle = PostProcBrokenMeshInMoab< DomainEle >
 
using OpK = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 >
 
using OpMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM >
 

Functions

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

Variables

constexpr int SPACE_DIM
 
double rho = 7829e-12
 
double young_modulus = 207e3
 
double poisson_ratio = 0.33
 
double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio))
 
double shear_modulus_G = young_modulus / (2 * (1 + poisson_ratio))
 
int order = 1
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ DomainEle

Definition at line 29 of file eigen_elastic.cpp.

◆ DomainEleOp

Definition at line 30 of file eigen_elastic.cpp.

◆ EntData

Examples
eigen_elastic.cpp.

Definition at line 28 of file eigen_elastic.cpp.

◆ OpK

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

Definition at line 34 of file eigen_elastic.cpp.

◆ OpMass

using OpMass = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm< GAUSS>::OpMass<1, SPACE_DIM>
Examples
eigen_elastic.cpp.

Definition at line 36 of file eigen_elastic.cpp.

◆ PostProcEle

Definition at line 31 of file eigen_elastic.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]

[Example]

[Example]

Examples
eigen_elastic.cpp.

Definition at line 484 of file eigen_elastic.cpp.

484  {
485 
486  // Initialisation of MoFEM/PETSc and MOAB data structures
487  const char param_file[] = "param_file.petsc";
488  SlepcInitialize(&argc, &argv, param_file, help);
489  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
490 
491  // Add logging channel for example
492  auto core_log = logging::core::get();
493  core_log->add_sink(
494  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
495  LogManager::setLog("EXAMPLE");
496  MOFEM_LOG_TAG("EXAMPLE", "example");
497 
498  try {
499 
500  //! [Register MoFEM discrete manager in PETSc]
501  DMType dm_name = "DMMOFEM";
502  CHKERR DMRegister_MoFEM(dm_name);
503  //! [Register MoFEM discrete manager in PETSc
504 
505  //! [Create MoAB]
506  moab::Core mb_instance; ///< mesh database
507  moab::Interface &moab = mb_instance; ///< mesh database interface
508  //! [Create MoAB]
509 
510  //! [Create MoFEM]
511  MoFEM::Core core(moab); ///< finite element database
512  MoFEM::Interface &m_field = core; ///< finite element database insterface
513  //! [Create MoFEM]
514 
515  //! [Example]
516  Example ex(m_field);
517  CHKERR ex.runProblem();
518  //! [Example]
519  }
520  CATCH_ERRORS;
521 
522  SlepcFinalize();
524 }

Variable Documentation

◆ bulk_modulus_K

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

Definition at line 42 of file eigen_elastic.cpp.

◆ help

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

[Check]

Examples
eigen_elastic.cpp.

Definition at line 482 of file eigen_elastic.cpp.

◆ order

int order = 1
Examples
eigen_elastic.cpp.

Definition at line 45 of file eigen_elastic.cpp.

◆ poisson_ratio

double poisson_ratio = 0.33
Examples
eigen_elastic.cpp.

Definition at line 40 of file eigen_elastic.cpp.

◆ rho

double rho = 7829e-12
Examples
eigen_elastic.cpp.

Definition at line 38 of file eigen_elastic.cpp.

◆ shear_modulus_G

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

Definition at line 43 of file eigen_elastic.cpp.

◆ SPACE_DIM

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

Definition at line 25 of file eigen_elastic.cpp.

◆ young_modulus

double young_modulus = 207e3
Examples
eigen_elastic.cpp.

Definition at line 39 of file eigen_elastic.cpp.

EXECUTABLE_DIMENSION
#define EXECUTABLE_DIMENSION
Definition: plastic.cpp:13
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
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
help
static char help[]
[Check]
Definition: eigen_elastic.cpp:482
Example
[Example]
Definition: plastic.cpp:216
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