v0.9.2
Classes | Typedefs | Functions | Variables
lesson2_approximaton.cpp File Reference
#include <MoFEM.hpp>
#include <BasicFiniteElements.hpp>
#include <BaseOps.hpp>

Go to the source code of this file.

Classes

struct  Example
 [Example] More...
 
struct  Example::CommonData
 [Example] More...
 
struct  Example::OpError
 

Typedefs

using DomainEle = FaceElementForcesAndSourcesCoreBase
 
using DomainEleOp = DomainEle::UserDataOperator
 
using EntData = DataForcesAndSourcesCore::EntData
 
using OpDomainMass = OpTools< DomainEleOp >::OpMass
 
using OpDomainSource = OpTools< DomainEleOp >::OpSource< 2 >
 

Functions

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

Variables

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

Typedef Documentation

◆ DomainEle

Definition at line 32 of file lesson2_approximaton.cpp.

◆ DomainEleOp

Examples
lesson2_approximaton.cpp.

Definition at line 33 of file lesson2_approximaton.cpp.

◆ EntData

Examples
lesson2_approximaton.cpp.

Definition at line 34 of file lesson2_approximaton.cpp.

◆ OpDomainMass

using OpDomainMass = OpTools<DomainEleOp>::OpMass
Examples
lesson2_approximaton.cpp.

Definition at line 38 of file lesson2_approximaton.cpp.

◆ OpDomainSource

using OpDomainSource = OpTools<DomainEleOp>::OpSource<2>
Examples
lesson2_approximaton.cpp.

Definition at line 39 of file lesson2_approximaton.cpp.

Function Documentation

◆ main()

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

[Solver]

Examples
lesson2_approximaton.cpp.

Definition at line 201 of file lesson2_approximaton.cpp.

201  {
202 
203  MoFEM::Core::Initialize(&argc, &argv, (char *)0, help);
204 
205  try {
206 
207  //! [Register MoFEM discrete manager in PETSc]
208  DMType dm_name = "DMMOFEM";
209  CHKERR DMRegister_MoFEM(dm_name);
210  //! [Register MoFEM discrete manager in PETSc
211 
212  //! [Create MoAB]
213  moab::Core mb_instance; ///< mesh database
214  moab::Interface &moab = mb_instance; ///< mesh database interface
215  //! [Create MoAB]
216 
217  //! [Create MoFEM]
218  MoFEM::Core core(moab); ///< finite element database
219  MoFEM::Interface &m_field = core; ///< finite element database insterface
220  //! [Create MoFEM]
221 
222  //! [Load mesh]
223  Simple *simple = m_field.getInterface<Simple>();
224  CHKERR simple->getOptions();
225  CHKERR simple->loadFile("");
226  //! [Load mesh]
227 
228  //! [Example]
229  Example ex(m_field);
230  CHKERR ex.runProblem();
231  //! [Example]
232  }
233  CATCH_ERRORS;
234 
236 }
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
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:1879
#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:69
static char help[]

Variable Documentation

◆ help

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

Definition at line 28 of file lesson2_approximaton.cpp.