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

Go to the source code of this file.

Classes

struct  Example
 [Example] More...
 

Typedefs

using EntData = DataForcesAndSourcesCore::EntData
 
using DomainEle = FaceElementForcesAndSourcesCoreBase
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = EdgeElementForcesAndSourcesCoreBase
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 

Functions

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

Variables

constexpr int order = 2
 
constexpr double young_modulus = 1
 
constexpr double poisson_ratio = 0.25
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ BoundaryEle

Definition at line 30 of file lesson4_elastic.cpp.

◆ BoundaryEleOp

Definition at line 31 of file lesson4_elastic.cpp.

◆ DomainEle

Definition at line 28 of file lesson4_elastic.cpp.

◆ DomainEleOp

Definition at line 29 of file lesson4_elastic.cpp.

◆ EntData

Examples
lesson4_elastic.cpp.

Definition at line 27 of file lesson4_elastic.cpp.

Function Documentation

◆ main()

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

Definition at line 286 of file lesson4_elastic.cpp.

286  {
287 
288  MoFEM::Core::Initialize(&argc, &argv, (char *)0, help);
289 
290  try {
291 
292  //! [Register MoFEM discrete manager in PETSc]
293  DMType dm_name = "DMMOFEM";
294  CHKERR DMRegister_MoFEM(dm_name);
295  //! [Register MoFEM discrete manager in PETSc
296 
297  //! [Create MoAB]
298  moab::Core mb_instance; ///< mesh database
299  moab::Interface &moab = mb_instance; ///< mesh database interface
300  //! [Create MoAB]
301 
302  //! [Create MoFEM]
303  MoFEM::Core core(moab); ///< finite element database
304  MoFEM::Interface &m_field = core; ///< finite element database insterface
305  //! [Create MoFEM]
306 
307  //! [Load mesh]
308  Simple *simple = m_field.getInterface<Simple>();
309  CHKERR simple->getOptions();
310  CHKERR simple->loadFile("");
311  //! [Load mesh]
312 
313  //! [Example]
314  Example ex(m_field);
315  CHKERR ex.runProblem();
316  //! [Example]
317  }
318  CATCH_ERRORS;
319 
321 }
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[]
[Check]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:48
#define CHKERR
Inline error check.
Definition: definitions.h:602
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1788
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:439
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:77

Variable Documentation

◆ help

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

[Check]

Examples
lesson4_elastic.cpp.

Definition at line 284 of file lesson4_elastic.cpp.

◆ order

constexpr int order = 2

◆ poisson_ratio

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

Definition at line 35 of file lesson4_elastic.cpp.

◆ young_modulus

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

Definition at line 34 of file lesson4_elastic.cpp.