v0.13.0
Classes | Typedefs | Functions | Variables
approximaton.cpp File Reference
#include <MoFEM.hpp>
#include <BasicFiniteElements.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  ApproxFieldFunction< 1 >
 third order polynomial used for testing More...
 
struct  Example
 [Example] More...
 
struct  Example::CommonData
 [Example] More...
 
struct  Example::OpError< 1 >
 

Typedefs

using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using EntData = EntitiesFieldData::EntData
 
using OpDomainMass = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, FIELD_DIM >
 
using OpDomainSource = FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, FIELD_DIM >
 

Functions

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

Variables

static char help [] = "...\n\n"
 
constexpr char FIELD_NAME [] = "U"
 
constexpr int FIELD_DIM = 1
 
constexpr int SPACE_DIM = 2
 

Typedef Documentation

◆ DomainEle

Definition at line 50 of file approximaton.cpp.

◆ DomainEleOp

Definition at line 51 of file approximaton.cpp.

◆ EntData

Definition at line 52 of file approximaton.cpp.

◆ OpDomainMass

using OpDomainMass = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::BiLinearForm<GAUSS>::OpMass<1, FIELD_DIM>

Definition at line 62 of file approximaton.cpp.

◆ OpDomainSource

using OpDomainSource = FormsIntegrators<DomainEleOp>::Assembly< PETSC>::LinearForm<GAUSS>::OpSource<1, FIELD_DIM>

Definition at line 64 of file approximaton.cpp.

Function Documentation

◆ main()

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

[Check results]

Definition at line 300 of file approximaton.cpp.

300  {
301 
302  // Initialisation of MoFEM/PETSc and MOAB data structures
303  const char param_file[] = "param_file.petsc";
304  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
305 
306  try {
307 
308  //! [Register MoFEM discrete manager in PETSc]
309  DMType dm_name = "DMMOFEM";
310  CHKERR DMRegister_MoFEM(dm_name);
311  //! [Register MoFEM discrete manager in PETSc
312 
313  //! [Create MoAB]
314  moab::Core mb_instance; ///< mesh database
315  moab::Interface &moab = mb_instance; ///< mesh database interface
316  //! [Create MoAB]
317 
318  //! [Create MoFEM]
319  MoFEM::Core core(moab); ///< finite element database
320  MoFEM::Interface &m_field = core; ///< finite element database insterface
321  //! [Create MoFEM]
322 
323  //! [Example]
324  Example ex(m_field);
325  CHKERR ex.runProblem();
326  //! [Example]
327  }
328  CATCH_ERRORS;
329 
331 }
std::string param_file
static char help[]
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:385
#define CHKERR
Inline error check.
Definition: definitions.h:548
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:59
CoreTmp< 0 > Core
Definition: Core.hpp:1096
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1965
[Example]
Core (interface) class.
Definition: Core.hpp:92
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:85
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:125
Deprecated interface functions.

Variable Documentation

◆ FIELD_DIM

constexpr int FIELD_DIM = 1
constexpr

Definition at line 33 of file approximaton.cpp.

◆ FIELD_NAME

constexpr char FIELD_NAME[] = "U"
constexpr

Definition at line 32 of file approximaton.cpp.

◆ help

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

Definition at line 28 of file approximaton.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr

Definition at line 34 of file approximaton.cpp.