v0.14.0
Loading...
Searching...
No Matches
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 768 of file electrostatics.cpp.

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

◆ help

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

Definition at line 11 of file electrostatics.cpp.