v0.13.1
Loading...
Searching...
No Matches
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]

Definition at line 310 of file poisson_2d_homogeneous.cpp.

310 {
311
312 // Initialisation of MoFEM/PETSc and MOAB data structures
313 const char param_file[] = "param_file.petsc";
315
316 // Error handling
317 try {
318 // Register MoFEM discrete manager in PETSc
319 DMType dm_name = "DMMOFEM";
320 CHKERR DMRegister_MoFEM(dm_name);
321
322 // Create MOAB instance
323 moab::Core mb_instance; // mesh database
324 moab::Interface &moab = mb_instance; // mesh database interface
325
326 // Create MoFEM instance
327 MoFEM::Core core(moab); // finite element database
328 MoFEM::Interface &m_field = core; // finite element interface
329
330 // Run the main analysis
331 Poisson2DHomogeneous poisson_problem(m_field);
332 CHKERR poisson_problem.runProgram();
333 }
335
336 // Finish work: cleaning memory, getting statistics, etc.
338
339 return 0;
340}
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
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

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

Examples
poisson_2d_homogeneous.cpp.

Definition at line 13 of file poisson_2d_homogeneous.cpp.