v0.13.1
Classes | Typedefs | Functions | Variables
poisson_2d_homogeneous.cpp File Reference
#include <BasicFiniteElements.hpp>
#include <poisson_2d_homogeneous.hpp>
#include <random_mesh_refine.hpp>

Go to the source code of this file.

Classes

struct  Poisson2DHomogeneous
 

Typedefs

using PostProcFaceEle = PostProcBrokenMeshInMoab< FaceElementForcesAndSourcesCore >
 

Functions

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

Variables

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

Typedef Documentation

◆ PostProcFaceEle

Definition at line 26 of file poisson_2d_homogeneous.cpp.

Function Documentation

◆ main()

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

[Run program]

[Main]

Examples
poisson_2d_homogeneous.cpp.

Definition at line 311 of file poisson_2d_homogeneous.cpp.

311 {
312
313 // Initialisation of MoFEM/PETSc and MOAB data structures
314 const char param_file[] = "param_file.petsc";
316
317 // Error handling
318 try {
319 // Register MoFEM discrete manager in PETSc
320 DMType dm_name = "DMMOFEM";
321 CHKERR DMRegister_MoFEM(dm_name);
322
323 // Create MOAB instance
324 moab::Core mb_instance; // mesh database
325 moab::Interface &moab = mb_instance; // mesh database interface
326
327 // Create MoFEM instance
328 MoFEM::Core core(moab); // finite element database
329 MoFEM::Interface &m_field = core; // finite element interface
330
331 // Run the main analysis
332 Poisson2DHomogeneous poisson_problem(m_field);
333 CHKERR poisson_problem.runProgram();
334 }
336
337 // Finish work: cleaning memory, getting statistics, etc.
339
340 return 0;
341}
std::string param_file
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
#define CHKERR
Inline error check.
Definition: definitions.h:535
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:47
CoreTmp< 0 > Core
Definition: Core.hpp:1086
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1955
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

constexpr auto field_name = "U"
constexpr

◆ help

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

Definition at line 29 of file poisson_2d_homogeneous.cpp.

◆ nb_ref_levels

const int nb_ref_levels
static
Initial value:
=
1

if larger than zero set n-levels of random mesh refinements with hanging nodes

Definition at line 13 of file poisson_2d_homogeneous.cpp.