v0.13.0
Classes | Typedefs | Functions | Variables
cornea_elastic.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <PostProcOnRefMesh.hpp>
#include <HenckyOps.hpp>
#include <OpPostProcElastic.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 3 >
 
struct  Example
 [Example] More...
 
struct  Monitor
 [Push operators to pipeline] 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 >::OpGradTensorGrad< 1, SPACE_DIM, SPACE_DIM, 1 >
 
using OpMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM >
 
using OpInternalForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpGradTimesTensor< 1, SPACE_DIM, SPACE_DIM >
 
using OpBodyForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, SPACE_DIM >
 
using OpInertiaForce = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, SPACE_DIM, 1 >
 

Functions

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

Variables

constexpr int SPACE_DIM = 3
 
constexpr bool is_quasi_static = false
 
constexpr double rho = 1
 
constexpr double omega = 2.4
 
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 double * ts_time_ptr
 
static double * ts_aa_ptr
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ DomainEle

Definition at line 40 of file cornea_elastic.cpp.

◆ DomainEleOp

Definition at line 41 of file cornea_elastic.cpp.

◆ EntData

using EntData = DataForcesAndSourcesCore::EntData

Definition at line 39 of file cornea_elastic.cpp.

◆ OpBodyForce

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

Definition at line 50 of file cornea_elastic.cpp.

◆ OpInertiaForce

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

Definition at line 52 of file cornea_elastic.cpp.

◆ OpInternalForce

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

Definition at line 48 of file cornea_elastic.cpp.

◆ OpK

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

Definition at line 44 of file cornea_elastic.cpp.

◆ OpMass

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

Definition at line 46 of file cornea_elastic.cpp.

◆ PostProcEle

Definition at line 42 of file cornea_elastic.cpp.

Function Documentation

◆ main()

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

Definition at line 449 of file cornea_elastic.cpp.

449  {
450 
451  // Initialisation of MoFEM/PETSc and MOAB data structures
452  const char param_file[] = "param_file.petsc";
453  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
454 
455  // Add logging channel for example
456  auto core_log = logging::core::get();
457  core_log->add_sink(
458  LogManager::createSink(LogManager::getStrmWorld(), "EXAMPLE"));
459  LogManager::setLog("EXAMPLE");
460  MOFEM_LOG_TAG("EXAMPLE", "example");
461 
462  try {
463 
464  //! [Register MoFEM discrete manager in PETSc]
465  DMType dm_name = "DMMOFEM";
466  CHKERR DMRegister_MoFEM(dm_name);
467  //! [Register MoFEM discrete manager in PETSc
468 
469  //! [Create MoAB]
470  moab::Core mb_instance; ///< mesh database
471  moab::Interface &moab = mb_instance; ///< mesh database interface
472  //! [Create MoAB]
473 
474  //! [Create MoFEM]
475  MoFEM::Core core(moab); ///< finite element database
476  MoFEM::Interface &m_field = core; ///< finite element database insterface
477  //! [Create MoFEM]
478 
479  //! [Example]
480  Example ex(m_field);
481  CHKERR ex.runProblem();
482  //! [Example]
483  }
484  CATCH_ERRORS;
485 
487 }
std::string param_file
static char help[]
[Check]
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:385
#define CHKERR
Inline error check.
Definition: definitions.h:548
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:59
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:342
CoreTmp< 0 > Core
Definition: Core.hpp:1096
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1965
[Example]
Core (interface) class.
Definition: Core.hpp:92
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:85
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:125
Deprecated interface functions.

Variable Documentation

◆ bulk_modulus_K

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

Definition at line 60 of file cornea_elastic.cpp.

◆ help

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

[Check]

Definition at line 447 of file cornea_elastic.cpp.

◆ is_quasi_static

constexpr bool is_quasi_static = false
constexpr
Examples
NonlinearElasticElementInterface.hpp.

Definition at line 55 of file cornea_elastic.cpp.

◆ omega

constexpr double omega = 2.4
constexpr

Definition at line 57 of file cornea_elastic.cpp.

◆ poisson_ratio

constexpr double poisson_ratio = 0.25
constexpr
Examples
OpPostProcElastic.hpp, and Remodeling.cpp.

Definition at line 59 of file cornea_elastic.cpp.

◆ rho

constexpr double rho = 1
constexpr

◆ shear_modulus_G

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

Definition at line 61 of file cornea_elastic.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 3
constexpr

Definition at line 37 of file cornea_elastic.cpp.

◆ ts_aa_ptr

double* ts_aa_ptr
static

Definition at line 69 of file cornea_elastic.cpp.

◆ ts_time_ptr

double* ts_time_ptr
static

Definition at line 68 of file cornea_elastic.cpp.

◆ young_modulus

constexpr double young_modulus = 1
constexpr
Examples
Remodeling.cpp.

Definition at line 58 of file cornea_elastic.cpp.