v0.9.1
Classes | Typedefs | Functions | Variables
basic_plastic.cpp File Reference
#include <MoFEM.hpp>
#include <ElasticOps.hpp>
#include <PlasticOps.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 double young_modulus = 1e1
 
constexpr double poisson_ratio = 0.25
 
constexpr double sigmaY = 1
 
constexpr double H = 1e-2
 
constexpr double cn = H
 
constexpr int order = 2
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ BoundaryEle

Definition at line 30 of file basic_plastic.cpp.

◆ BoundaryEleOp

Definition at line 31 of file basic_plastic.cpp.

◆ DomainEle

Definition at line 28 of file basic_plastic.cpp.

◆ DomainEleOp

Definition at line 29 of file basic_plastic.cpp.

◆ EntData

Examples
basic_plastic.cpp.

Definition at line 27 of file basic_plastic.cpp.

Function Documentation

◆ main()

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

Definition at line 376 of file basic_plastic.cpp.

376  {
377 
378  MoFEM::Core::Initialize(&argc, &argv, (char *)0, help);
379 
380  try {
381 
382  //! [Register MoFEM discrete manager in PETSc]
383  DMType dm_name = "DMMOFEM";
384  CHKERR DMRegister_MoFEM(dm_name);
385  //! [Register MoFEM discrete manager in PETSc
386 
387  //! [Create MoAB]
388  moab::Core mb_instance; ///< mesh database
389  moab::Interface &moab = mb_instance; ///< mesh database interface
390  //! [Create MoAB]
391 
392  //! [Create MoFEM]
393  MoFEM::Core core(moab); ///< finite element database
394  MoFEM::Interface &m_field = core; ///< finite element database insterface
395  //! [Create MoFEM]
396 
397  //! [Load mesh]
398  Simple *simple = m_field.getInterface<Simple>();
399  CHKERR simple->getOptions();
400  CHKERR simple->loadFile("");
401  //! [Load mesh]
402 
403  //! [Example]
404  Example ex(m_field);
405  CHKERR ex.runProblem();
406  //! [Example]
407  }
408  CATCH_ERRORS;
409 
411 }
Deprecated interface functions.
static char help[]
[Check]
[Example]
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
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 = H
Examples
basic_plastic.cpp.

Definition at line 37 of file basic_plastic.cpp.

◆ H

constexpr double H = 1e-2
Examples
basic_plastic.cpp.

Definition at line 36 of file basic_plastic.cpp.

◆ help

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

[Check]

Examples
basic_plastic.cpp.

Definition at line 374 of file basic_plastic.cpp.

◆ order

constexpr int order = 2
Examples
basic_plastic.cpp.

Definition at line 38 of file basic_plastic.cpp.

◆ poisson_ratio

constexpr double poisson_ratio = 0.25
Examples
basic_plastic.cpp.

Definition at line 34 of file basic_plastic.cpp.

◆ sigmaY

constexpr double sigmaY = 1
Examples
basic_plastic.cpp.

Definition at line 35 of file basic_plastic.cpp.

◆ young_modulus

constexpr double young_modulus = 1e1
Examples
basic_plastic.cpp.

Definition at line 33 of file basic_plastic.cpp.