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 765 of file electrostatics.cpp.

765 {
766 // Initialisation of MoFEM/PETSc and MOAB data structures
767 const char param_file[] = "param_file.petsc";
768 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
769
770 // Error handling
771 try {
772 // Register MoFEM discrete manager in PETSc
773 DMType dm_name = "DMMOFEM";
774 CHKERR DMRegister_MoFEM(dm_name);
775
776 // Create MOAB instance
777 moab::Core mb_instance; // mesh database
778 moab::Interface &moab = mb_instance; // mesh database interface
779
780 // Create MoFEM instance
781 MoFEM::Core core(moab); // finite element database
782 MoFEM::Interface &m_field = core; // finite element interface
783
784 // Run the main analysis
785 Electrostatics Electrostatics_problem(m_field);
786 CHKERR Electrostatics_problem.runProgram();
787 }
789
790 // Finish work: cleaning memory, getting statistics, etc.
792
793 return 0;
794}
#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.