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

Go to the source code of this file.

Classes

struct  Example
 

Typedefs

using EntData = DataForcesAndSourcesCore::EntData
 
using DomainEle = MoFEM::Basic::FaceEle2D
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = MoFEM::Basic::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 = 1e-6
 
static char help [] = "...\n\n"
 

Typedef Documentation

◆ BoundaryEle

Definition at line 30 of file basic_contact.cpp.

◆ BoundaryEleOp

Definition at line 31 of file basic_contact.cpp.

◆ DomainEle

Definition at line 28 of file basic_contact.cpp.

◆ DomainEleOp

Definition at line 29 of file basic_contact.cpp.

◆ EntData

Examples
basic_contact.cpp.

Definition at line 27 of file basic_contact.cpp.

Function Documentation

◆ main()

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

Definition at line 404 of file basic_contact.cpp.

404  {
405 
406  MoFEM::Core::Initialize(&argc, &argv, (char *)0, help);
407 
408  try {
409 
410  //! [Register MoFEM discrete manager in PETSc]
411  DMType dm_name = "DMMOFEM";
412  CHKERR DMRegister_MoFEM(dm_name);
413  //! [Register MoFEM discrete manager in PETSc
414 
415  //! [Create MoAB]
416  moab::Core mb_instance; ///< mesh database
417  moab::Interface &moab = mb_instance; ///< mesh database interface
418  //! [Create MoAB]
419 
420  //! [Create MoFEM]
421  MoFEM::Core core(moab); ///< finite element database
422  MoFEM::Interface &m_field = core; ///< finite element database insterface
423  //! [Create MoFEM]
424 
425  //! [Load mesh]
426  Simple *simple = m_field.getInterface<Simple>();
427  CHKERR simple->getOptions();
428  CHKERR simple->loadFile("");
429  //! [Load mesh]
430 
431  //! [Example]
432  Example ex(m_field);
433  CHKERR ex.runProblem();
434  //! [Example]
435  }
436  CATCH_ERRORS;
437 
439 }
Deprecated interface functions.
Core (interface) class.
Definition: Core.hpp:50
Simple interface for fast problem set-up.
Definition: Simple.hpp:36
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:51
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
static char help[]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:48
#define CHKERR
Inline error check.
Definition: definitions.h:601
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1791
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:438
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:61

Variable Documentation

◆ cn

constexpr double cn = 1
Examples
basic_contact.cpp.

Definition at line 36 of file basic_contact.cpp.

◆ help

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

Definition at line 402 of file basic_contact.cpp.

◆ order

constexpr int order = 4

◆ poisson_ratio

constexpr double poisson_ratio = 0.25
Examples
basic_contact.cpp, and Remodeling.cpp.

Definition at line 35 of file basic_contact.cpp.

◆ spring_stiffness

constexpr double spring_stiffness = 1e-6
Examples
basic_contact.cpp.

Definition at line 37 of file basic_contact.cpp.

◆ young_modulus

constexpr double young_modulus = 1
Examples
basic_contact.cpp, and Remodeling.cpp.

Definition at line 34 of file basic_contact.cpp.