v0.14.0
Loading...
Searching...
No Matches
poisson_2d_homogeneous.cpp File Reference

Go to the source code of this file.

Classes

struct  Poisson2DHomogeneous
 

Typedefs

using PostProcFaceEle = PostProcBrokenMeshInMoab<DomainEle>
 

Functions

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

Variables

constexpr auto field_name = "U"
 
constexpr int SPACE_DIM
 
static char help [] = "...\n\n"
 

Typedef Documentation

◆ PostProcFaceEle

Function Documentation

◆ main()

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

[Run program]

[Main]

Definition at line 374 of file poisson_2d_homogeneous.cpp.

374 {
375
376 // Initialisation of MoFEM/PETSc and MOAB data structures
377 const char param_file[] = "param_file.petsc";
378 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
379
380 // Error handling
381 try {
382 // Register MoFEM discrete manager in PETSc
383 DMType dm_name = "DMMOFEM";
384 CHKERR DMRegister_MoFEM(dm_name);
385
386 // Create MOAB instance
387 moab::Core mb_instance; // mesh database
388 moab::Interface &moab = mb_instance; // mesh database interface
389
390 // Create MoFEM instance
391 MoFEM::Core core(moab); // finite element database
392 MoFEM::Interface &m_field = core; // finite element interface
393
394 // Run the main analysis
395 Poisson2DHomogeneous poisson_problem(m_field);
396 CHKERR poisson_problem.runProgram();
397 }
399
400 // Finish work: cleaning memory, getting statistics, etc.
402
403 return 0;
404}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
static char help[]
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_name

◆ help

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

Definition at line 25 of file poisson_2d_homogeneous.cpp.

◆ SPACE_DIM

int SPACE_DIM
constexpr
Initial value:
=
#define EXECUTABLE_DIMENSION
Definition plastic.cpp:13
Examples
poisson_2d_homogeneous.cpp.

Definition at line 15 of file poisson_2d_homogeneous.cpp.