v0.14.0
Loading...
Searching...
No Matches
approximaton.cpp File Reference
#include <MoFEM.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 PostProcEle = PostProcBrokenMeshInMoab<DomainEle>
 
using OpDomainMass
 
using OpDomainSource
 

Functions

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

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 32 of file approximaton.cpp.

◆ OpDomainMass

◆ OpDomainSource

◆ PostProcEle

Definition at line 36 of file approximaton.cpp.

Function Documentation

◆ main()

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

[Check results]

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc

[Create MoAB]

< mesh database

< mesh database interface

[Create MoAB]

[Create MoFEM]

< finite element database

< finite element database insterface

[Create MoFEM]

[Example]

[Example]

Definition at line 305 of file approximaton.cpp.

305 {
306
307 // Initialisation of MoFEM/PETSc and MOAB data structures
308 const char param_file[] = "param_file.petsc";
309 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
310
311 try {
312
313 //! [Register MoFEM discrete manager in PETSc]
314 DMType dm_name = "DMMOFEM";
315 CHKERR DMRegister_MoFEM(dm_name);
316 //! [Register MoFEM discrete manager in PETSc
317
318 //! [Create MoAB]
319 moab::Core mb_instance; ///< mesh database
320 moab::Interface &moab = mb_instance; ///< mesh database interface
321 //! [Create MoAB]
322
323 //! [Create MoFEM]
324 MoFEM::Core core(moab); ///< finite element database
325 MoFEM::Interface &m_field = core; ///< finite element database insterface
326 //! [Create MoFEM]
327
328 //! [Example]
329 Example ex(m_field);
330 CHKERR ex.runProblem();
331 //! [Example]
332 }
334
336}
static char help[]
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
[Example]
Definition plastic.cpp:213
Core (interface) class.
Definition Core.hpp:82
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:72
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:112
Deprecated interface functions.

Variable Documentation

◆ FIELD_DIM

int FIELD_DIM = 1
constexpr

Definition at line 19 of file approximaton.cpp.

◆ FIELD_NAME

char FIELD_NAME[] = "U"
constexpr

Definition at line 18 of file approximaton.cpp.

◆ help

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

Definition at line 14 of file approximaton.cpp.

◆ SPACE_DIM

int SPACE_DIM = 2
constexpr

Definition at line 20 of file approximaton.cpp.