v0.16.0
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
electrostatics.cpp File Reference
#include <electrostatics.hpp>

Go to the source code of this file.

Classes

struct  Electrostatics
 

Macros

#define EXECUTABLE_DIMENSION   3
 

Functions

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

Variables

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

Macro Definition Documentation

◆ EXECUTABLE_DIMENSION

#define EXECUTABLE_DIMENSION   3

Definition at line 7 of file electrostatics.cpp.

Function Documentation

◆ main()

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

[Run program]

[Main]

Definition at line 783 of file electrostatics.cpp.

783 {
784 // Initialisation of MoFEM/PETSc and MOAB data structures
785 const char param_file[] = "param_file.petsc";
786 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
787
788 // Error handling
789 try {
790 // Register MoFEM discrete manager in PETSc
791 DMType dm_name = "DMMOFEM";
792 CHKERR DMRegister_MoFEM(dm_name);
793
794 // Create MOAB instance
795 moab::Core mb_instance; // mesh database
796 moab::Interface &moab = mb_instance; // mesh database interface
797
798 // Create MoFEM instance
799 MoFEM::Core core(moab); // finite element database
800 MoFEM::Interface &m_field = core; // finite element interface
801
802 // Run the main analysis
803 Electrostatics Electrostatics_problem(m_field);
804 CHKERR Electrostatics_problem.runProgram();
805 }
807
808 // Finish work: cleaning memory, getting statistics, etc.
810
811 return 0;
812}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
static char help[]
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
Core (interface) class.
Definition Core.hpp:83
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:68
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:123
Deprecated interface functions.

Variable Documentation

◆ help

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

Definition at line 11 of file electrostatics.cpp.