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

Go to the source code of this file.

Classes

struct  Example
 [Example] More...
 
struct  Example::CommonData
 [Example] More...
 
struct  Example::OpZero
 [Common data] More...
 
struct  Example::OpFirst
 
struct  Example::OpSecond
 [Operator] More...
 

Typedefs

using Element = MoFEM::VolumeElementForcesAndSourcesCoreBase
 
using OpElement = Element::UserDataOperator
 
using EntData = DataForcesAndSourcesCore::EntData
 

Functions

int main (int argc, char *argv[])
 [Test example] More...
 

Variables

static char help [] = "...\n\n"
 
FTensor::Index< 'i', 3 > i
 
FTensor::Index< 'j', 3 > j
 

Typedef Documentation

◆ Element

Definition at line 32 of file basic_moment_of_inertia.cpp.

◆ EntData

Examples
basic_moment_of_inertia.cpp.

Definition at line 34 of file basic_moment_of_inertia.cpp.

◆ OpElement

Definition at line 33 of file basic_moment_of_inertia.cpp.

Function Documentation

◆ main()

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

[Test example]

[main]

Examples
basic_moment_of_inertia.cpp.

Definition at line 314 of file basic_moment_of_inertia.cpp.

314  {
315 
316  // Initialisation MoFEM/PETSc and MoAB data strutures
317  MoFEM::Core::Initialize(&argc, &argv, (char *)0, help);
318 
319  // Error handling
320  try {
321 
322  //! [Register MoFEM discrete manager in PETSc]
323  DMType dm_name = "DMMOFEM";
324  CHKERR DMRegister_MoFEM(dm_name);
325  //! [Register MoFEM discrete manager in PETSc
326 
327  //! [Create MoAB]
328  moab::Core mb_instance; ///< mesh database
329  moab::Interface &moab = mb_instance; ///< mesh database interface
330  //! [Create MoAB]
331 
332  //! [Create MoFEM]
333  MoFEM::Core core(moab); ///< finite element database
334  MoFEM::Interface &m_field = core; ///< finite element database insterface
335  //! [Create MoFEM]
336 
337  Example ex(m_field);
338  CHKERR ex.runProblem();
339  }
340  CATCH_ERRORS;
341 
343 }
static char help[]
Deprecated interface functions.
[Example]
Core (interface) class.
Definition: Core.hpp:50
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
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

◆ help

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

Definition at line 30 of file basic_moment_of_inertia.cpp.

◆ i

FTensor::Index<'i', 3> i

◆ j

FTensor::Index<'j', 3> j