v0.10.0
Classes | Typedefs | Functions | Variables
lesson8_contact.cpp File Reference
#include <MoFEM.hpp>
#include <ElasticOps.hpp>
#include <ContactOps.hpp>

Go to the source code of this file.

Classes

struct  Example
 [Example] More...
 

Typedefs

using EntData = DataForcesAndSourcesCore::EntData
 
using DomainEle = PipelineManager::FaceEle2D
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = PipelineManager::EdgeEle2D
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 

Functions

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

Variables

constexpr int order = 4
 
constexpr double young_modulus = 1
 
constexpr double poisson_ratio = 0.25
 
constexpr double cn = 1
 
constexpr double spring_stiffness = 0
 
static char help [] = "...\n\n"
 

Typedef Documentation

◆ BoundaryEle

Definition at line 30 of file lesson8_contact.cpp.

◆ BoundaryEleOp

Definition at line 31 of file lesson8_contact.cpp.

◆ DomainEle

Definition at line 28 of file lesson8_contact.cpp.

◆ DomainEleOp

Definition at line 29 of file lesson8_contact.cpp.

◆ EntData

Examples
lesson8_contact.cpp.

Definition at line 27 of file lesson8_contact.cpp.

Function Documentation

◆ main()

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

Definition at line 417 of file lesson8_contact.cpp.

417  {
418 
419  MoFEM::Core::Initialize(&argc, &argv, (char *)0, help);
420 
421  try {
422 
423  //! [Register MoFEM discrete manager in PETSc]
424  DMType dm_name = "DMMOFEM";
425  CHKERR DMRegister_MoFEM(dm_name);
426  //! [Register MoFEM discrete manager in PETSc
427 
428  //! [Create MoAB]
429  moab::Core mb_instance; ///< mesh database
430  moab::Interface &moab = mb_instance; ///< mesh database interface
431  //! [Create MoAB]
432 
433  //! [Create MoFEM]
434  MoFEM::Core core(moab); ///< finite element database
435  MoFEM::Interface &m_field = core; ///< finite element database insterface
436  //! [Create MoFEM]
437 
438  //! [Load mesh]
439  Simple *simple = m_field.getInterface<Simple>();
440  CHKERR simple->getOptions();
441  CHKERR simple->loadFile("");
442  //! [Load mesh]
443 
444  //! [Example]
445  Example ex(m_field);
446  CHKERR ex.runProblem();
447  //! [Example]
448  }
449  CATCH_ERRORS;
450 
452 }
Deprecated interface functions.
CoreTmp< 0 > Core
Definition: Core.hpp:1129
[Example]
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
Simple interface for fast problem set-up.
Definition: Simple.hpp:36
MoFEMErrorCode getInterface(const MOFEMuuid &uuid, IFACE *&iface) const
Get interface by uuid and return reference to pointer of interface.
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:48
static char help[]
#define CHKERR
Inline error check.
Definition: definitions.h:604
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1943
Core (interface) class.
Definition: Core.hpp:77
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:441
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:100

Variable Documentation

◆ cn

constexpr double cn = 1
Examples
lesson8_contact.cpp.

Definition at line 36 of file lesson8_contact.cpp.

◆ help

char help[] = "...\n\n"
static
Examples
lesson8_contact.cpp.

Definition at line 415 of file lesson8_contact.cpp.

◆ order

constexpr int order = 4
Examples
lesson8_contact.cpp.

Definition at line 33 of file lesson8_contact.cpp.

◆ poisson_ratio

constexpr double poisson_ratio = 0.25
Examples
lesson8_contact.cpp.

Definition at line 35 of file lesson8_contact.cpp.

◆ spring_stiffness

constexpr double spring_stiffness = 0
Examples
lesson8_contact.cpp.

Definition at line 37 of file lesson8_contact.cpp.

◆ young_modulus

constexpr double young_modulus = 1
Examples
lesson8_contact.cpp.

Definition at line 34 of file lesson8_contact.cpp.