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

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 = DataForcesAndSourcesCore::EntData
 
using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = ElementsAndOps< SPACE_DIM >::DomainEleOp
 
using PostProcEle = ElementsAndOps< SPACE_DIM >::PostProcEle
 
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 47 of file eigen_elastic.cpp.

◆ DomainEleOp

Definition at line 48 of file eigen_elastic.cpp.

◆ EntData

Examples
eigen_elastic.cpp.

Definition at line 46 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 51 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 53 of file eigen_elastic.cpp.

◆ PostProcEle

Definition at line 49 of file eigen_elastic.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
Examples
eigen_elastic.cpp.

Definition at line 476 of file eigen_elastic.cpp.

476  {
477 
478  // Initialisation of MoFEM/PETSc and MOAB data structures
479  const char param_file[] = "param_file.petsc";
480  SlepcInitialize(&argc, &argv, param_file, help);
481  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
482 
483  // Add logging channel for example
484  auto core_log = logging::core::get();
485  core_log->add_sink(
486  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
487  LogManager::setLog("EXAMPLE");
488  MOFEM_LOG_TAG("EXAMPLE", "example");
489 
490  try {
491 
492  //! [Register MoFEM discrete manager in PETSc]
493  DMType dm_name = "DMMOFEM";
494  CHKERR DMRegister_MoFEM(dm_name);
495  //! [Register MoFEM discrete manager in PETSc
496 
497  //! [Create MoAB]
498  moab::Core mb_instance; ///< mesh database
499  moab::Interface &moab = mb_instance; ///< mesh database interface
500  //! [Create MoAB]
501 
502  //! [Create MoFEM]
503  MoFEM::Core core(moab); ///< finite element database
504  MoFEM::Interface &m_field = core; ///< finite element database insterface
505  //! [Create MoFEM]
506 
507  //! [Example]
508  Example ex(m_field);
509  CHKERR ex.runProblem();
510  //! [Example]
511  }
512  CATCH_ERRORS;
513 
514  SlepcFinalize();
516 }
std::string param_file
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:441
#define CHKERR
Inline error check.
Definition: definitions.h:604
static char help[]
[Check]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:48
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:343
CoreTmp< 0 > Core
Definition: Core.hpp:1140
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1953
[Example]
Definition: plastic.cpp:119
Core (interface) class.
Definition: Core.hpp:77
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
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:100
Deprecated interface functions.

Variable Documentation

◆ bulk_modulus_K

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

Definition at line 60 of file eigen_elastic.cpp.

◆ help

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

[Check]

Examples
eigen_elastic.cpp.

Definition at line 474 of file eigen_elastic.cpp.

◆ order

int order = 1
Examples
eigen_elastic.cpp.

Definition at line 63 of file eigen_elastic.cpp.

◆ poisson_ratio

double poisson_ratio = 0.33
Examples
eigen_elastic.cpp.

Definition at line 58 of file eigen_elastic.cpp.

◆ rho

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

Definition at line 56 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 61 of file eigen_elastic.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
=
#define EXECUTABLE_DIMENSION
Definition: plastic.cpp:24
Examples
eigen_elastic.cpp.

Definition at line 43 of file eigen_elastic.cpp.

◆ young_modulus

double young_modulus = 207e3
Examples
eigen_elastic.cpp.

Definition at line 57 of file eigen_elastic.cpp.