v0.14.0
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] More...
 

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

720  {
721  // Initialisation of MoFEM/PETSc and MOAB data structures
722  const char param_file[] = "param_file.petsc";
723  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
724 
725  // Error handling
726  try {
727  // Register MoFEM discrete manager in PETSc
728  DMType dm_name = "DMMOFEM";
729  CHKERR DMRegister_MoFEM(dm_name);
730 
731  // Create MOAB instance
732  moab::Core mb_instance; // mesh database
733  moab::Interface &moab = mb_instance; // mesh database interface
734 
735  // Create MoFEM instance
736  MoFEM::Core core(moab); // finite element database
737  MoFEM::Interface &m_field = core; // finite element interface
738 
739  // Run the main analysis
740  Electrostatics Electrostatics_problem(m_field);
741  CHKERR Electrostatics_problem.runProgram();
742  }
743  CATCH_ERRORS;
744 
745  // Finish work: cleaning memory, getting statistics, etc.
747 
748  return 0;
749 }

Variable Documentation

◆ help

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

Definition at line 11 of file electrostatics.cpp.

MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
help
static char help[]
Definition: electrostatics.cpp:11
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:43
MoFEM::CoreTmp< 0 >::Initialize
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
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:385
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1148
Electrostatics
Definition: electrostatics.cpp:12