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 489 of file eigen_elastic.cpp.

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

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 487 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:487
Example
[Example]
Definition: plastic.cpp:177
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