v0.10.0
Macros | Enumerations | Functions | Variables
definitions.h File Reference

useful compiler directives and definitions More...

Go to the source code of this file.

Macros

#define DEPRECATED
 
#define MAX_CORE_TMP   1
 maximal number of cores More...
 
#define BITREFEDGES_SIZE   6
 number of edges on tetrahedral More...
 
#define BITREFLEVEL_SIZE   128
 max number of refinements More...
 
#define BITFIELDID_SIZE   32
 max number of fields More...
 
#define BITFEID_SIZE   32
 max number of finite elements More...
 
#define BITPROBLEMID_SIZE   32
 max number of problems More...
 
#define BITINTERFACEUID_SIZE   32
 
#define MYPCOMM_INDEX   0
 default communicator number PCOMM More...
 
#define MB_TYPE_WIDTH   4
 
#define MB_ID_WIDTH   (8 * sizeof(EntityHandle) - MB_TYPE_WIDTH)
 
#define MB_TYPE_MASK   ((EntityHandle)0xF << MB_ID_WIDTH)
 
#define MB_START_ID   ((EntityID)1)
 All entity id's currently start at 1. More...
 
#define MB_END_ID    ((EntityID)MB_ID_MASK)
 Last id is the complement of the MASK. More...
 
#define MB_ID_MASK   (~MB_TYPE_MASK)
 
#define MAX_DOFS_ON_ENTITY   512
 Maximal number of DOFs on entity. More...
 
#define MAX_PROCESSORS_NUMBER   1024
 Maximal number of processors. More...
 
#define DOF_UID_MASK    (MAX_DOFS_ON_ENTITY - 1)
 Mask for DOF number on entity form UId. More...
 
#define ENTITY_UID_MASK   (~DOF_UID_MASK)
 
#define NOT_USED(x)   ((void)(x))
 
#define BARRIER_PCOMM_RANK_START(PCMB)
 set barrier start Run code in sequence, starting from process 0, and ends on last process. More...
 
#define BARRIER_RANK_START(PCMB)
 
#define BARRIER_PCOMM_RANK_END(PCMB)
 set barrier start Run code in sequence, starting from process 0, and ends on last process. More...
 
#define BARRIER_RANK_END(PCMB)
 
#define BARRIER_MOFEM_RANK_START(MOFEM)
 set barrier start Run code in sequence, starting from process 0, and ends on last process. More...
 
#define BARRIER_MOFEM_RANK_END(MOFEM)
 set barrier start Run code in sequence, starting from process 0, and ends on last process. More...
 
#define MoFEMFunctionBegin
 First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions should be MoFEMFunctionReturn(0);. More...
 
#define CATCH_ERRORS
 Catch errors. More...
 
#define MoFEMFunctionReturn(a)
 Last executable line of each PETSc function used for error handling. Replaces return() More...
 
#define MoFEMFunctionBeginHot   PetscFunctionBeginHot
 First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions should be MoFEMFunctionReturn(0); Use of this function allows for lighter profiling by default. More...
 
#define MoFEMFunctionReturnHot(a)   PetscFunctionReturn(a)
 Last executable line of each PETSc function used for error handling. Replaces return() More...
 
#define CHKERRQ_PETSC(n)   CHKERRQ(n)
 
#define CHKERRQ_MOAB(a)
 check error code of MoAB function More...
 
#define CHKERRG(n)
 Check error code of MoFEM/MOAB/PETSc function. More...
 
#define CHKERR   MoFEM::ErrorChecker<__LINE__>() <<
 Inline error check. More...
 
#define MOAB_THROW(a)
 Check error code of MoAB function and throw MoFEM exception. More...
 
#define THROW_MESSAGE(a)
 Throw MoFEM exception. More...
 
#define SSTR(x)   toString(x)
 Convert number to string. More...
 
#define TENSOR1_VEC_PTR(VEC)   &VEC[0], &VEC[1], &VEC[2]
 
#define SYMMETRIC_TENSOR4_MAT_PTR(MAT)
 
#define TENSOR4_MAT_PTR(MAT)   &MAT(0, 0), MAT.size2()
 
#define TENSOR2_MAT_PTR(MAT)
 
#define SYMMETRIC_TENSOR2_MAT_PTR(MAT)    &MAT(0, 0), &MAT(0, 1), &MAT(0, 2), &MAT(0, 3), &MAT(0, 4), &MAT(0, 5)
 
#define SYMMETRIC_TENSOR2_VEC_PTR(VEC)    &VEC[0], &VEC[1], &VEC[2], &VEC[3], &VEC[4], &VEC[5]
 

Enumerations

enum  Interfaces {
  UNKNOWNINTERFACE = 1 << 0, CORE_INTERFACE = 1 << 0 | 1 << 1, DEPRECATED_CORE_INTERFACE = 1 << 0 | 1 << 2, PROBLEMSMANAGER_INTERFACE = 1 << 0 | 1 << 3,
  MATRIX_MANAGER_INTERFACE = 1 << 0 | 1 << 4, SIMPLE_INTERFACE = 1 << 0 | 1 << 5, BASIC_INTERFACE = 1 << 0 | 1 << 6, COMM_INTERFACE = 1 << 0 | 1 << 7,
  LOGMANAGER_INTERFACE = 1 << 0 | 1 << 8, MESH_REFINE = 1 << 1 | 1 << 2, PRISM_INTEFACE = 1 << 1 | 1 << 3, SERIES_RECORDER = 1 << 1 | 1 << 4,
  ISMANAGER_INTERFACE = 1 << 1 | 1 << 5, VECMANAGER_INTERFACE = 1 << 1 | 1 << 6, FIELDBLAS_INTERFACE = 1 << 1 | 1 << 7, BITREFMANAGER_INTERFACE = 1 << 1 | 1 << 8,
  TOOLS = 1 << 1 | 1 << 10, TETGEN_INTERFACE = 1 << 2 | 1 << 3, MED_INTERFACE = 1 << 2 | 1 << 4, NODEMERGER_INTERFACE = 1 << 2 | 1 << 5,
  BITLEVELCOUPLER_INTERFACE = 1 << 2 | 1 << 6, PRISMSFROMSURFACE_INTERFACE = 1 << 2 | 1 << 7, MESHSETSMANAGER_INTERFACE = 1 << 2 | 1 << 8, COORDSSYSTEMMANAGER_INTERFACE = 1 << 2 | 1 << 9,
  CUTMESH_INTERFACE = 1 << 2 | 1 << 10, FIELDEVALUATOR_INTERFACE = 1 << 2 | 1 << 11
}
 Interfaces IDs. More...
 
enum  LoopInterfaces {
  PETSC_DATA_METHOD = 1 << 3, KSP_METHOD = 1 << 3 | 1 << 4, SNES_METHOD = 1 << 3 | 1 << 5, TS_METHOD = 1 << 3 | 1 << 6,
  BASIC_METHOD = 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6, FE_METHOD = 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 7, ENTITY_METHOD = 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 9, DOF_METHOD = 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 9
}
 
enum  DMInterfaces { UNKNOWN_DM_INTERFACE = 1 << 4 | 1 << 5, DMCTX_INTERFACE = 1 << 4 | 1 << 6 }
 interfaces for PETSc DM interfaces More...
 
enum  BaseIntefaces {
  UNKNOWN_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6, LEGENDRE_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 7, LOBATTO_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 8, KERNEL_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 9,
  JACOBI_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 10, INTEGRATED_JACOBI_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 11, ENT_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 7, TET_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 8,
  TRI_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 9, EDGE_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 10, FATPRISM_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 11, FLATPRISM_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 12,
  QUAD_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 13
}
 Interfaces uses to manage base functions. More...
 
enum  MoFEMErrorCodes {
  MOFEM_SUCCESS = 0, MOFEM_DATA_INCONSISTENCY = 100, MOFEM_NOT_IMPLEMENTED = 101, MOFEM_NOT_FOUND = 102,
  MOFEM_OPERATION_UNSUCCESSFUL = 103, MOFEM_IMPOSIBLE_CASE = 104, MOFEM_INVALID_DATA = 105, MOFEM_NOT_INSTALLED = 106,
  MOFEM_MOFEMEXCEPTION_THROW = 107, MOFEM_STD_EXCEPTION_THROW = 108, MOFEM_ATOM_TEST_INVALID = 109, MOFEM_MOAB_ERROR = 110
}
 Error handling. More...
 
enum  FieldApproximationBase {
  NOBASE = 0, AINSWORTH_LEGENDRE_BASE, AINSWORTH_LOBATTO_BASE, AINSWORTH_BERNSTEIN_BEZIER_BASE,
  DEMKOWICZ_JACOBI_BASE, USER_BASE, LASTBASE
}
 approximation base More...
 
enum  FieldSpace {
  NOSPACE = 0, NOFIELD = 1, H1, HCURL,
  HDIV, L2, LASTSPACE
}
 approximation spaces More...
 
enum  MoFEMTypes { MF_ZERO = 0, MF_EXCL = 1 << 0, MF_EXIST = 1 << 1 }
 Those types control how functions respond on arguments, f.e. error handling. More...
 
enum  RowColData { ROW = 0, COL, DATA, LASTROWCOLDATA }
 RowColData. More...
 
enum  ByWhat {
  BYROW = 1 << 0, BYCOL = 1 << 1, BYDATA = 1 << 2, BYROWDATA = 1 << 0 | 1 << 2,
  BYCOLDATA = 1 << 1 | 1 << 2, BYROWCOL = 1 << 0 | 1 << 1, BYALL = 1 << 0 | 1 << 1 | 1 << 2
}
 
enum  CubitBC {
  UNKNOWNSET = 0, NODESET = 1 << 0, SIDESET = 1 << 1, BLOCKSET = 1 << 2,
  MATERIALSET = 1 << 3, DISPLACEMENTSET = 1 << 4, FORCESET = 1 << 5, PRESSURESET = 1 << 6,
  VELOCITYSET = 1 << 7, ACCELERATIONSET = 1 << 8, TEMPERATURESET = 1 << 9, HEATFLUXSET = 1 << 10,
  INTERFACESET = 1 << 11, UNKNOWNNAME = 1 << 12, MAT_ELASTICSET = 1 << 13, MAT_INTERFSET = 1 << 14,
  MAT_THERMALSET = 1 << 15, BODYFORCESSET = 1 << 16, MAT_MOISTURESET = 1 << 17, DIRICHLET_BC = 1 << 18,
  NEUMANN_BC = 1 << 19, LASTSET_BC = 1 << 20
}
 Types of sets and boundary conditions. More...
 
enum  HVecFormatting { HVEC0 = 0, HVEC1, HVEC2 }
 Format in rows of vectorial base functions. More...
 
enum  HVecDiffFormatting {
  HVEC0_0 = 0, HVEC1_0, HVEC2_0, HVEC0_1,
  HVEC1_1, HVEC2_1, HVEC0_2, HVEC1_2,
  HVEC2_2
}
 Format in rows of vectorial base gradients of base functions. More...
 
enum  VERBOSITY_LEVELS {
  DEFAULT_VERBOSITY = -1, QUIET = 0, VERBOSE, VERY_VERBOSE,
  NOISY, VERY_NOISY
}
 Verbosity levels. More...
 

Functions

DEPRECATED void macro_is_deprecated_using_deprecated_function ()
 Is used to indicate that macro is deprecated Do nothing just triggers error at the compilation. More...
 

Variables

static const char *const MoFEMErrorCodesNames []
 
static const char *const ApproximationBaseNames []
 
static const char *const FieldSpaceNames []
 
static const char *const CubitBCNames []
 Names of types of sets and boundary conditions. More...
 

Detailed Description

useful compiler directives and definitions

Definition in file definitions.h.

Macro Definition Documentation

◆ BARRIER_MOFEM_RANK_END

#define BARRIER_MOFEM_RANK_END (   MOFEM)
Value:
{ \
for (int i = (MOFEM)->get_comm_rank(); i < (MOFEM)->get_comm_size(); i++) \
MPI_Barrier((MOFEM)->get_comm()); \
};

set barrier start Run code in sequence, starting from process 0, and ends on last process.

It can be only used for testing. Do not use that function as a part of these code.

Definition at line 379 of file definitions.h.

◆ BARRIER_MOFEM_RANK_START

#define BARRIER_MOFEM_RANK_START (   MOFEM)
Value:
{ \
for (int i = 0; i < (MOFEM)->get_comm_rank(); i++) \
MPI_Barrier((MOFEM)->get_comm()); \
};

set barrier start Run code in sequence, starting from process 0, and ends on last process.

It can be only used for testing. Do not use that function as a part of these code.

Definition at line 366 of file definitions.h.

◆ BARRIER_PCOMM_RANK_END

#define BARRIER_PCOMM_RANK_END (   PCMB)
Value:
{ \
for (unsigned int i = PCMB->proc_config().proc_rank(); \
i < PCMB->proc_config().proc_size(); i++) \
MPI_Barrier(PCMB->proc_config().proc_comm()); \
};

set barrier start Run code in sequence, starting from process 0, and ends on last process.

It can be only used for testing. Do not use that function as a part of these code.

Definition at line 342 of file definitions.h.

◆ BARRIER_PCOMM_RANK_START

#define BARRIER_PCOMM_RANK_START (   PCMB)
Value:
{ \
for (unsigned int i = 0; i < PCMB->proc_config().proc_rank(); i++) \
MPI_Barrier(PCMB->proc_config().proc_comm()); \
};

set barrier start Run code in sequence, starting from process 0, and ends on last process.

It can be only used for testing. Do not use that function as a part of these code.

Definition at line 320 of file definitions.h.

◆ BARRIER_RANK_END

#define BARRIER_RANK_END (   PCMB)
Value:
{ \
macro_is_deprecated_using_deprecated_function(); \
for (unsigned int i = PCMB->proc_config().proc_rank(); \
i < PCMB->proc_config().proc_size(); i++) \
MPI_Barrier(PCMB->proc_config().proc_comm()); \
};
Deprecated:
Do use this macro, instead use BARRIER_PCOMM_RANK_START

Definition at line 351 of file definitions.h.

◆ BARRIER_RANK_START

#define BARRIER_RANK_START (   PCMB)
Value:
{ \
macro_is_deprecated_using_deprecated_function(); \
for (unsigned int i = 0; i < PCMB->proc_config().proc_rank(); i++) \
MPI_Barrier(PCMB->proc_config().proc_comm()); \
};
Deprecated:
Do use this macro, instead use BARRIER_PCOMM_RANK_START

Definition at line 328 of file definitions.h.

◆ BITFEID_SIZE

#define BITFEID_SIZE   32

max number of finite elements

Definition at line 288 of file definitions.h.

◆ BITFIELDID_SIZE

#define BITFIELDID_SIZE   32

max number of fields

Definition at line 287 of file definitions.h.

◆ BITINTERFACEUID_SIZE

#define BITINTERFACEUID_SIZE   32

Definition at line 290 of file definitions.h.

◆ BITPROBLEMID_SIZE

#define BITPROBLEMID_SIZE   32

max number of problems

Definition at line 289 of file definitions.h.

◆ BITREFEDGES_SIZE

#define BITREFEDGES_SIZE   6

number of edges on tetrahedral

Definition at line 285 of file definitions.h.

◆ BITREFLEVEL_SIZE

#define BITREFLEVEL_SIZE   128

max number of refinements

Definition at line 286 of file definitions.h.

◆ CATCH_ERRORS

#define CATCH_ERRORS
Value:
catch (MoFEMExceptionInitial const &ex) { \
return PetscError(PETSC_COMM_SELF, ex.lINE, PETSC_FUNCTION_NAME, __FILE__, \
ex.errorCode, PETSC_ERROR_INITIAL, ex.what()); \
} \
catch (MoFEMExceptionRepeat const &ex) { \
return PetscError(PETSC_COMM_SELF, ex.lINE, PETSC_FUNCTION_NAME, __FILE__, \
ex.errorCode, PETSC_ERROR_REPEAT, " "); \
} \
catch (MoFEMException const &ex) { \
SETERRQ(PETSC_COMM_SELF, ex.errorCode, ex.errorMessage); \
} \
catch (boost::bad_weak_ptr & ex) { \
std::string message("Boost bad weak ptr: " + std::string(ex.what()) + \
" at " + boost::lexical_cast<std::string>(__LINE__) + \
" : " + std::string(__FILE__) + " in " + \
std::string(PETSC_FUNCTION_NAME)); \
SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, message.c_str()); \
} \
catch (std::out_of_range & ex) { \
std::string message("Std out of range error: " + std::string(ex.what()) + \
" at " + boost::lexical_cast<std::string>(__LINE__) + \
" : " + std::string(__FILE__) + " in " + \
std::string(PETSC_FUNCTION_NAME)); \
SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, message.c_str()); \
} \
catch (std::exception const &ex) { \
std::string message("Std error: " + std::string(ex.what()) + " at " + \
boost::lexical_cast<std::string>(__LINE__) + " : " + \
std::string(__FILE__) + " in " + \
std::string(PETSC_FUNCTION_NAME)); \
SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, message.c_str()); \
}

Catch errors.

Usage in main functions

int main(int argc, char *argv[]) {
MoFEM::Core::Initialize(&argc, &argv, (char *)0, help);
try {
// More code here
}
}
Examples
add_blockset.cpp, add_cubit_meshsets.cpp, analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, analytical_poisson_field_split.cpp, bases_on_reference_rectangle.cpp, bernstein_bezier_generate_base.cpp, bone_adaptation.cpp, boundary_marker.cpp, build_large_problem.cpp, build_problems.cpp, cell_forces.cpp, contact.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, continuity_check_on_skeleton_with_simple_2d_for_h1.cpp, continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, cubit_bc_test.cpp, delete_ho_nodes.cpp, dm_build_partitioned_mesh.cpp, dm_create_subdm.cpp, dm_partitioned_no_field.cpp, dynamic_elastic.cpp, edge_and_bubble_shape_functions_on_quad.cpp, eigen_elastic.cpp, elasticity.cpp, elasticity_mixed_formulation.cpp, ep.cpp, field_axpy_atom_test.cpp, field_blas_set_vertex_dofs.cpp, field_evaluator.cpp, field_to_vertices.cpp, find_local_coordinates_on_tet.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_flat_prism_element.cpp, forces_and_sources_testing_users_base.cpp, gauss_points_on_quad.cpp, hcurl_check_approx_in_2d.cpp, hcurl_curl_operator.cpp, hcurl_divergence_operator_2d.cpp, hdiv_divergence_operator.cpp, heat_equation.cpp, hello_world.cpp, helmholtz.cpp, hertz_surface.cpp, log.cpp, loop_entities.cpp, lorentz_force.cpp, magnetostatic.cpp, matrix_function.cpp, mesh_cut.cpp, mesh_insert_interface_atom.cpp, mesh_smoothing.cpp, meshset_to_vtk.cpp, minimal_surface_area.cpp, petsc_smart_ptr_objects.cpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, quad_polynomial_approximation.cpp, reaction_diffusion.cpp, remove_entities_from_problem.cpp, scalar_check_approximation_2d.cpp, simple_contact.cpp, simple_elasticity.cpp, simple_interface.cpp, split_sideset.cpp, test_cache_on_entities.cpp, test_jacobian_of_simple_contact_element.cpp, testing_jacobian_of_hook_element.cpp, testing_jacobian_of_hook_scaled_with_density_element.cpp, unsaturated_transport.cpp, wave_equation.cpp, and wavy_surface.cpp.

Definition at line 441 of file definitions.h.

◆ CHKERR

#define CHKERR   MoFEM::ErrorChecker<__LINE__>() <<

Inline error check.

// Call other functions
CHKERR fun_moab();
CHKERR fun_petsc();
CHKERR fun_mofem();
// Throw error
SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "Some error message");
}
int main(int argc, char *argv[]) {
// Initailise MoFEM and Petsc
MoFEM::Core::Initialize(&argc, &argv, (char *)0, help);
try {
moab::Core mb_instance; // MoAB database
moab::Interface &moab = mb_instance;
MoFEM::Core core(moab); // MOFEM database
MoFEM::CoreInterface &m_field = core;
CHKERR foo(); // Call function
}
}
Examples
add_blockset.cpp, add_cubit_meshsets.cpp, analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, analytical_poisson_field_split.cpp, AuxPoissonFunctions.hpp, bases_on_reference_rectangle.cpp, bernstein_bezier_generate_base.cpp, bone_adaptation.cpp, boundary_marker.cpp, build_large_problem.cpp, build_problems.cpp, cell_forces.cpp, contact.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, continuity_check_on_skeleton_with_simple_2d_for_h1.cpp, continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, cubit_bc_test.cpp, delete_ho_nodes.cpp, dm_build_partitioned_mesh.cpp, dm_create_subdm.cpp, dm_partitioned_no_field.cpp, dynamic_elastic.cpp, edge_and_bubble_shape_functions_on_quad.cpp, eigen_elastic.cpp, elasticity.cpp, elasticity_mixed_formulation.cpp, ElasticityMixedFormulation.hpp, ep.cpp, EshelbianOperators.cpp, EshelbianPlasticity.cpp, field_axpy_atom_test.cpp, field_blas_set_vertex_dofs.cpp, field_evaluator.cpp, field_to_vertices.cpp, find_local_coordinates_on_tet.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_flat_prism_element.cpp, forces_and_sources_testing_users_base.cpp, gauss_points_on_quad.cpp, hcurl_check_approx_in_2d.cpp, hcurl_curl_operator.cpp, hcurl_divergence_operator_2d.cpp, hdiv_divergence_operator.cpp, heat_equation.cpp, heat_equation.hpp, hello_world.cpp, helmholtz.cpp, hertz_surface.cpp, HookeElement.cpp, HookeElement.hpp, log.cpp, loop_entities.cpp, lorentz_force.cpp, MagneticElement.hpp, magnetostatic.cpp, matrix_function.cpp, mesh_cut.cpp, mesh_insert_interface_atom.cpp, mesh_smoothing.cpp, meshset_to_vtk.cpp, minimal_surface_area.cpp, OpPostProcElastic.hpp, petsc_smart_ptr_objects.cpp, PoissonOperators.hpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, quad_polynomial_approximation.cpp, reaction_diffusion.cpp, Remodeling.cpp, Remodeling.hpp, remove_entities_from_problem.cpp, scalar_check_approximation_2d.cpp, simple_contact.cpp, simple_elasticity.cpp, simple_interface.cpp, split_sideset.cpp, test_cache_on_entities.cpp, test_jacobian_of_simple_contact_element.cpp, testing_jacobian_of_hook_element.cpp, testing_jacobian_of_hook_scaled_with_density_element.cpp, unsaturated_transport.cpp, UnsaturatedFlow.hpp, wave_equation.cpp, wave_equation.hpp, and wavy_surface.cpp.

Definition at line 604 of file definitions.h.

◆ CHKERRG

#define CHKERRG (   n)
Value:
if ((boost::is_same<BOOST_TYPEOF((n)), \
MoFEMErrorCodeGeneric<PetscErrorCode>>::value)) { \
CHKERRQ_PETSC((n)); \
} else if (boost::is_same<BOOST_TYPEOF((n)), \
MoFEMErrorCodeGeneric<moab::ErrorCode>>::value) { \
CHKERRQ_MOAB((n)); \
}

Check error code of MoFEM/MOAB/PETSc function.

Parameters
aMoFEMErrorCode
rval = fun_moab(); CHKERRG(rval);
ierr = fun_petsc(); CHKERRG(ierr);
merr = fun_mofem(); CHKERRG(merr);
Note
Function detect type of errocode using specialized template function getErrorType, i.e. condition is evaluated at compilation time.
Examples
analytical_nonlinear_poisson.cpp, analytical_poisson.cpp, analytical_poisson_field_split.cpp, delete_ho_nodes.cpp, elasticity.cpp, EshelbianPlasticity.cpp, field_to_vertices.cpp, hertz_surface.cpp, lorentz_force.cpp, magnetostatic.cpp, mesh_cut.cpp, mesh_smoothing.cpp, minimal_surface_area.cpp, NeoHookean.hpp, simple_elasticity.cpp, split_sideset.cpp, unsaturated_transport.cpp, UnsaturatedFlow.hpp, and wavy_surface.cpp.

Definition at line 552 of file definitions.h.

◆ CHKERRQ_MOAB

#define CHKERRQ_MOAB (   a)
Value:
if (PetscUnlikely(MB_SUCCESS != (a))) { \
std::string error_str = (unsigned)(a) <= (unsigned)MB_FAILURE \
? moab::ErrorCodeStr[a] \
: "INVALID ERROR CODE"; \
std::string str("MOAB error (" + boost::lexical_cast<std::string>((a)) + \
") " + error_str + " at line " + \
boost::lexical_cast<std::string>(__LINE__) + " : " + \
std::string(__FILE__)); \
SETERRQ(PETSC_COMM_SELF, MOFEM_MOAB_ERROR, str.c_str()); \
}

check error code of MoAB function

Parameters
aMoABErrorCode

Definition at line 523 of file definitions.h.

◆ CHKERRQ_PETSC

#define CHKERRQ_PETSC (   n)    CHKERRQ(n)

Definition at line 518 of file definitions.h.

◆ DEPRECATED

#define DEPRECATED

Definition at line 29 of file definitions.h.

◆ DOF_UID_MASK

#define DOF_UID_MASK    (MAX_DOFS_ON_ENTITY - 1)

Mask for DOF number on entity form UId.

Definition at line 308 of file definitions.h.

◆ ENTITY_UID_MASK

#define ENTITY_UID_MASK   (~DOF_UID_MASK)

Definition at line 309 of file definitions.h.

◆ MAX_CORE_TMP

#define MAX_CORE_TMP   1

maximal number of cores

Definition at line 284 of file definitions.h.

◆ MAX_DOFS_ON_ENTITY

#define MAX_DOFS_ON_ENTITY   512

Maximal number of DOFs on entity.

Examples
EshelbianPlasticity.cpp.

Definition at line 305 of file definitions.h.

◆ MAX_PROCESSORS_NUMBER

#define MAX_PROCESSORS_NUMBER   1024

Maximal number of processors.

Definition at line 306 of file definitions.h.

◆ MB_END_ID

#define MB_END_ID    ((EntityID)MB_ID_MASK)

Last id is the complement of the MASK.

Definition at line 302 of file definitions.h.

◆ MB_ID_MASK

#define MB_ID_MASK   (~MB_TYPE_MASK)

Definition at line 303 of file definitions.h.

◆ MB_ID_WIDTH

#define MB_ID_WIDTH   (8 * sizeof(EntityHandle) - MB_TYPE_WIDTH)

Definition at line 296 of file definitions.h.

◆ MB_START_ID

#define MB_START_ID   ((EntityID)1)

All entity id's currently start at 1.

Definition at line 300 of file definitions.h.

◆ MB_TYPE_MASK

#define MB_TYPE_MASK   ((EntityHandle)0xF << MB_ID_WIDTH)

Definition at line 297 of file definitions.h.

◆ MB_TYPE_WIDTH

#define MB_TYPE_WIDTH   4

Definition at line 295 of file definitions.h.

◆ MOAB_THROW

#define MOAB_THROW (   a)
Value:
{ \
if (PetscUnlikely(MB_SUCCESS != (a))) { \
std::string error_str = (unsigned)(a) <= (unsigned)MB_FAILURE \
? moab::ErrorCodeStr[a] \
: "INVALID ERROR CODE"; \
std::string str("MOAB error (" + boost::lexical_cast<std::string>((a)) + \
") " + error_str + " at line " + \
boost::lexical_cast<std::string>(__LINE__) + " : " + \
std::string(__FILE__)); \
throw MoFEMException(MOFEM_MOAB_ERROR, str.c_str()); \
} \
}

Check error code of MoAB function and throw MoFEM exception.

Parameters
aMoABErrorCode

Definition at line 610 of file definitions.h.

◆ MoFEMFunctionBegin

#define MoFEMFunctionBegin
Value:
PetscFunctionBegin; \
try {

First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions should be MoFEMFunctionReturn(0);.

\node Not collective

Example

PetscErrorCode fun() {
int something;
}
Examples
add_blockset.cpp, analytical_poisson_field_split.cpp, AuxPoissonFunctions.hpp, bernstein_bezier_generate_base.cpp, boundary_marker.cpp, build_large_problem.cpp, contact.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, continuity_check_on_skeleton_with_simple_2d_for_h1.cpp, continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, dm_partitioned_no_field.cpp, dynamic_elastic.cpp, eigen_elastic.cpp, elasticity.cpp, ElasticityMixedFormulation.hpp, EshelbianOperators.cpp, EshelbianPlasticity.cpp, field_axpy_atom_test.cpp, field_blas_set_vertex_dofs.cpp, field_evaluator.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_users_base.cpp, hcurl_check_approx_in_2d.cpp, hcurl_curl_operator.cpp, hcurl_divergence_operator_2d.cpp, hdiv_divergence_operator.cpp, heat_equation.cpp, heat_equation.hpp, helmholtz.cpp, HookeElement.cpp, HookeElement.hpp, log.cpp, loop_entities.cpp, lorentz_force.cpp, MagneticElement.hpp, mesh_cut.cpp, mesh_smoothing.cpp, OpPostProcElastic.hpp, petsc_smart_ptr_objects.cpp, PoissonOperators.hpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, quad_polynomial_approximation.cpp, reaction_diffusion.cpp, Remodeling.cpp, Remodeling.hpp, remove_entities_from_problem.cpp, scalar_check_approximation_2d.cpp, simple_contact.cpp, simple_elasticity.cpp, simple_interface.cpp, test_cache_on_entities.cpp, test_jacobian_of_simple_contact_element.cpp, testing_jacobian_of_hook_scaled_with_density_element.cpp, UnsaturatedFlow.hpp, wave_equation.cpp, and wave_equation.hpp.

Definition at line 415 of file definitions.h.

◆ MoFEMFunctionBeginHot

#define MoFEMFunctionBeginHot   PetscFunctionBeginHot

◆ MoFEMFunctionReturn

#define MoFEMFunctionReturn (   a)
Value:
} \
CATCH_ERRORS \
PetscFunctionReturn(a)

Last executable line of each PETSc function used for error handling. Replaces return()

Parameters
aerror code
Note
MoFEMFunctionReturn has to be used with MoFEMFunctionBegin and can be used only at the end of the function. If is need to return function in earlier use MoFEMFunctionReturnHot
Examples
add_blockset.cpp, analytical_poisson_field_split.cpp, AuxPoissonFunctions.hpp, bernstein_bezier_generate_base.cpp, boundary_marker.cpp, build_large_problem.cpp, contact.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, continuity_check_on_skeleton_with_simple_2d_for_h1.cpp, continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, dm_partitioned_no_field.cpp, dynamic_elastic.cpp, eigen_elastic.cpp, elasticity.cpp, ElasticityMixedFormulation.hpp, EshelbianOperators.cpp, EshelbianPlasticity.cpp, field_axpy_atom_test.cpp, field_blas_set_vertex_dofs.cpp, field_evaluator.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_users_base.cpp, hcurl_check_approx_in_2d.cpp, hcurl_curl_operator.cpp, hcurl_divergence_operator_2d.cpp, hdiv_divergence_operator.cpp, heat_equation.cpp, heat_equation.hpp, hello_world.cpp, helmholtz.cpp, HookeElement.cpp, HookeElement.hpp, log.cpp, loop_entities.cpp, lorentz_force.cpp, MagneticElement.hpp, mesh_cut.cpp, mesh_smoothing.cpp, OpPostProcElastic.hpp, petsc_smart_ptr_objects.cpp, PoissonOperators.hpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, quad_polynomial_approximation.cpp, reaction_diffusion.cpp, Remodeling.cpp, Remodeling.hpp, remove_entities_from_problem.cpp, scalar_check_approximation_2d.cpp, simple_contact.cpp, simple_elasticity.cpp, simple_interface.cpp, test_cache_on_entities.cpp, test_jacobian_of_simple_contact_element.cpp, testing_jacobian_of_hook_scaled_with_density_element.cpp, UnsaturatedFlow.hpp, wave_equation.cpp, and wave_equation.hpp.

Definition at line 485 of file definitions.h.

◆ MoFEMFunctionReturnHot

#define MoFEMFunctionReturnHot (   a)    PetscFunctionReturn(a)

◆ MYPCOMM_INDEX

#define MYPCOMM_INDEX   0

◆ NOT_USED

#define NOT_USED (   x)    ((void)(x))

Definition at line 311 of file definitions.h.

◆ SSTR

#define SSTR (   x)    toString(x)

Convert number to string.

Parameters
xnumber

Definition at line 642 of file definitions.h.

◆ SYMMETRIC_TENSOR2_MAT_PTR

#define SYMMETRIC_TENSOR2_MAT_PTR (   MAT)     &MAT(0, 0), &MAT(0, 1), &MAT(0, 2), &MAT(0, 3), &MAT(0, 4), &MAT(0, 5)

Definition at line 660 of file definitions.h.

◆ SYMMETRIC_TENSOR2_VEC_PTR

#define SYMMETRIC_TENSOR2_VEC_PTR (   VEC)     &VEC[0], &VEC[1], &VEC[2], &VEC[3], &VEC[4], &VEC[5]

Definition at line 663 of file definitions.h.

◆ SYMMETRIC_TENSOR4_MAT_PTR

#define SYMMETRIC_TENSOR4_MAT_PTR (   MAT)
Value:
&MAT(0, 0), &MAT(0, 1), &MAT(0, 2), &MAT(0, 3), &MAT(0, 4), &MAT(0, 5), \
&MAT(1, 0), &MAT(1, 1), &MAT(1, 2), &MAT(1, 3), &MAT(1, 4), &MAT(1, 5), \
&MAT(2, 0), &MAT(2, 1), &MAT(2, 2), &MAT(2, 3), &MAT(2, 4), &MAT(2, 5), \
&MAT(3, 0), &MAT(3, 1), &MAT(3, 2), &MAT(3, 3), &MAT(3, 4), &MAT(3, 5), \
&MAT(4, 0), &MAT(4, 1), &MAT(4, 2), &MAT(4, 3), &MAT(4, 4), &MAT(4, 5), \
&MAT(5, 0), &MAT(5, 1), &MAT(5, 2), &MAT(5, 3), &MAT(5, 4), &MAT(5, 5)

Definition at line 646 of file definitions.h.

◆ TENSOR1_VEC_PTR

#define TENSOR1_VEC_PTR (   VEC)    &VEC[0], &VEC[1], &VEC[2]

Definition at line 644 of file definitions.h.

◆ TENSOR2_MAT_PTR

#define TENSOR2_MAT_PTR (   MAT)
Value:
&MAT(0, 0), &MAT(1, 0), &MAT(2, 0), &MAT(3, 0), &MAT(4, 0), &MAT(5, 0), \
&MAT(6, 0), &MAT(7, 0), &MAT(8, 0)

Definition at line 656 of file definitions.h.

◆ TENSOR4_MAT_PTR

#define TENSOR4_MAT_PTR (   MAT)    &MAT(0, 0), MAT.size2()

Definition at line 654 of file definitions.h.

◆ THROW_MESSAGE

#define THROW_MESSAGE (   a)
Value:
{ \
("MoFEM error " + boost::lexical_cast<std::string>((a)) + \
" at line " + boost::lexical_cast<std::string>(__LINE__) + " : " + \
std::string(__FILE__)) \
.c_str()); \
}

Throw MoFEM exception.

Parameters
amessage
Examples
matrix_function.cpp.

Definition at line 628 of file definitions.h.

Enumeration Type Documentation

◆ BaseIntefaces

Interfaces uses to manage base functions.

Enumerator
UNKNOWN_BASE_FUNCTION_INTERFACE 
LEGENDRE_BASE_FUNCTION_INTERFACE 
LOBATTO_BASE_FUNCTION_INTERFACE 
KERNEL_BASE_FUNCTION_INTERFACE 
JACOBI_BASE_FUNCTION_INTERFACE 
INTEGRATED_JACOBI_BASE_FUNCTION_INTERFACE 
ENT_BASE_FUNCTION_INTERFACE 
TET_BASE_FUNCTION_INTERFACE 
TRI_BASE_FUNCTION_INTERFACE 
EDGE_BASE_FUNCTION_INTERFACE 
FATPRISM_BASE_FUNCTION_INTERFACE 
FLATPRISM_BASE_FUNCTION_INTERFACE 
QUAD_BASE_FUNCTION_INTERFACE 

Definition at line 97 of file definitions.h.

97  {
98  UNKNOWN_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6,
99  LEGENDRE_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 7,
100  LOBATTO_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 8,
101  KERNEL_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 9,
102  JACOBI_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 10,
104  ENT_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 7,
105  TET_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 8,
106  TRI_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 9,
107  EDGE_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 10,
108  FATPRISM_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 11,
109  FLATPRISM_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 12,
110  QUAD_BASE_FUNCTION_INTERFACE = 1 << 5 | 1 << 6 | 1 << 13
111 };

◆ ByWhat

enum ByWhat

Controls adjency multi_index container (e.g. BYROW is adjacenciecy by field on on rows), see MoFEM::FieldEntityEntFiniteElementAdjacencyMap

Enumerator
BYROW 
BYCOL 
BYDATA 
BYROWDATA 
BYCOLDATA 
BYROWCOL 
BYALL 

Definition at line 199 of file definitions.h.

199  {
200  BYROW = 1 << 0,
201  BYCOL = 1 << 1,
202  BYDATA = 1 << 2,
203  BYROWDATA = 1 << 0 | 1 << 2,
204  BYCOLDATA = 1 << 1 | 1 << 2,
205  BYROWCOL = 1 << 0 | 1 << 1,
206  BYALL = 1 << 0 | 1 << 1 | 1 << 2
207 };

◆ CubitBC

enum CubitBC

Types of sets and boundary conditions.

Enumerator
UNKNOWNSET 
NODESET 
SIDESET 
BLOCKSET 
MATERIALSET 
DISPLACEMENTSET 
FORCESET 
PRESSURESET 
VELOCITYSET 
ACCELERATIONSET 
TEMPERATURESET 
HEATFLUXSET 
INTERFACESET 
UNKNOWNNAME 
MAT_ELASTICSET 

block name is "MAT_ELASTIC"

MAT_INTERFSET 
MAT_THERMALSET 

block name is "MAT_THERMAL"

BODYFORCESSET 

block name is "BODY_FORCES"

MAT_MOISTURESET 

block name is "MAT_MOISTURE"

DIRICHLET_BC 
NEUMANN_BC 
LASTSET_BC 

Definition at line 213 of file definitions.h.

213  {
214  UNKNOWNSET = 0,
215  NODESET = 1 << 0,
216  SIDESET = 1 << 1,
217  BLOCKSET = 1 << 2,
218  MATERIALSET = 1 << 3,
219  DISPLACEMENTSET = 1 << 4,
220  FORCESET = 1 << 5,
221  PRESSURESET = 1 << 6,
222  VELOCITYSET = 1 << 7,
223  ACCELERATIONSET = 1 << 8,
224  TEMPERATURESET = 1 << 9,
225  HEATFLUXSET = 1 << 10,
226  INTERFACESET = 1 << 11,
227  UNKNOWNNAME = 1 << 12,
228  MAT_ELASTICSET = 1 << 13, ///< block name is "MAT_ELASTIC"
229  MAT_INTERFSET = 1 << 14,
230  MAT_THERMALSET = 1 << 15, ///< block name is "MAT_THERMAL"
231  BODYFORCESSET = 1 << 16, ///< block name is "BODY_FORCES"
232  MAT_MOISTURESET = 1 << 17, ///< block name is "MAT_MOISTURE"
233  DIRICHLET_BC = 1 << 18,
234  NEUMANN_BC = 1 << 19,
235  LASTSET_BC = 1 << 20
236 };

◆ DMInterfaces

interfaces for PETSc DM interfaces

Enumerator
UNKNOWN_DM_INTERFACE 
DMCTX_INTERFACE 

Definition at line 89 of file definitions.h.

89  {
90  UNKNOWN_DM_INTERFACE = 1 << 4 | 1 << 5,
91  DMCTX_INTERFACE = 1 << 4 | 1 << 6
92 };

◆ FieldApproximationBase

approximation base

Enumerator
NOBASE 
AINSWORTH_LEGENDRE_BASE 

Ainsworth Cole (Legendre) approx. base [1].

AINSWORTH_LOBATTO_BASE 

Like AINSWORTH_LEGENDRE_BASE but with Lobatto base instead Legendre [10]

AINSWORTH_BERNSTEIN_BEZIER_BASE 

See [3] and [2]

DEMKOWICZ_JACOBI_BASE 

Construction of base is by Demkowicz [24]

USER_BASE 

user implemented approximation base

LASTBASE 

Definition at line 150 of file definitions.h.

150  {
151  NOBASE = 0,
153  1, ///< Ainsworth Cole (Legendre) approx. base \cite NME:NME847
154  AINSWORTH_LOBATTO_BASE, ///< Like AINSWORTH_LEGENDRE_BASE but with Lobatto
155  ///< base instead Legendre \cite beriot2015efficient
156  AINSWORTH_BERNSTEIN_BEZIER_BASE, ///< See \cite ainsworth2011bernstein and
157  ///< \cite ainsworth2018bernstein
158  DEMKOWICZ_JACOBI_BASE, ///< Construction of base is by Demkowicz \cite
159  ///< fuentes2015orientation
160  USER_BASE, ///< user implemented approximation base
161  LASTBASE
162 };

◆ FieldSpace

enum FieldSpace

approximation spaces

Enumerator
NOSPACE 
NOFIELD 

scalar or vector of scalars describe (no true field)

H1 

continuous field

HCURL 

field with continuous tangents

HDIV 

field with continuous normal traction

L2 

field with C-1 continuity

LASTSPACE 

FieldSpace in [ 0, LASTSPACE )

Definition at line 174 of file definitions.h.

174  {
175  NOSPACE = 0,
176  NOFIELD = 1, ///< scalar or vector of scalars describe (no true field)
177  H1, ///< continuous field
178  HCURL, ///< field with continuous tangents
179  HDIV, ///< field with continuous normal traction
180  L2, ///< field with C-1 continuity
181  LASTSPACE ///< FieldSpace in [ 0, LASTSPACE )
182 };

◆ HVecDiffFormatting

Format in rows of vectorial base gradients of base functions.

Enumerator
HVEC0_0 
HVEC1_0 
HVEC2_0 
HVEC0_1 
HVEC1_1 
HVEC2_1 
HVEC0_2 
HVEC1_2 
HVEC2_2 

Definition at line 260 of file definitions.h.

260  {
261  HVEC0_0 = 0,
262  HVEC1_0,
263  HVEC2_0,
264  HVEC0_1,
265  HVEC1_1,
266  HVEC2_1,
267  HVEC0_2,
268  HVEC1_2,
269  HVEC2_2
270 };

◆ HVecFormatting

Format in rows of vectorial base functions.

Enumerator
HVEC0 
HVEC1 
HVEC2 

Definition at line 255 of file definitions.h.

255 { HVEC0 = 0, HVEC1, HVEC2 };

◆ Interfaces

enum Interfaces

Interfaces IDs.

To manage different complexities related to field, finite elements mesh refinements, etc. a appropriate interfaces related to each complexities are created. Interfaces by itself could vary by functionality or the same function can me managed with two interfaces with waring level of abstraction.

Enumerator
UNKNOWNINTERFACE 
CORE_INTERFACE 
DEPRECATED_CORE_INTERFACE 
PROBLEMSMANAGER_INTERFACE 
MATRIX_MANAGER_INTERFACE 
SIMPLE_INTERFACE 
BASIC_INTERFACE 
COMM_INTERFACE 
LOGMANAGER_INTERFACE 
MESH_REFINE 
PRISM_INTEFACE 
SERIES_RECORDER 
ISMANAGER_INTERFACE 
VECMANAGER_INTERFACE 
FIELDBLAS_INTERFACE 
BITREFMANAGER_INTERFACE 
TOOLS 
TETGEN_INTERFACE 
MED_INTERFACE 
NODEMERGER_INTERFACE 
BITLEVELCOUPLER_INTERFACE 
PRISMSFROMSURFACE_INTERFACE 
MESHSETSMANAGER_INTERFACE 
COORDSSYSTEMMANAGER_INTERFACE 
CUTMESH_INTERFACE 
FIELDEVALUATOR_INTERFACE 

Definition at line 40 of file definitions.h.

40  {
41  UNKNOWNINTERFACE = 1 << 0,
42 
43  CORE_INTERFACE = 1 << 0 | 1 << 1,
44  DEPRECATED_CORE_INTERFACE = 1 << 0 | 1 << 2,
45  PROBLEMSMANAGER_INTERFACE = 1 << 0 | 1 << 3,
46  MATRIX_MANAGER_INTERFACE = 1 << 0 | 1 << 4,
47  SIMPLE_INTERFACE = 1 << 0 | 1 << 5,
48  BASIC_INTERFACE = 1 << 0 | 1 << 6,
49  COMM_INTERFACE = 1 << 0 | 1 << 7,
50  LOGMANAGER_INTERFACE = 1 << 0 | 1 << 8,
51 
52  MESH_REFINE = 1 << 1 | 1 << 2,
53  PRISM_INTEFACE = 1 << 1 | 1 << 3,
54  SERIES_RECORDER = 1 << 1 | 1 << 4,
55  ISMANAGER_INTERFACE = 1 << 1 | 1 << 5,
56  VECMANAGER_INTERFACE = 1 << 1 | 1 << 6,
57  FIELDBLAS_INTERFACE = 1 << 1 | 1 << 7,
58  BITREFMANAGER_INTERFACE = 1 << 1 | 1 << 8,
59 
60  TOOLS = 1 << 1 | 1 << 10,
61 
62  // Independent Interfaces
63  TETGEN_INTERFACE = 1 << 2 | 1 << 3,
64  MED_INTERFACE = 1 << 2 | 1 << 4,
65  NODEMERGER_INTERFACE = 1 << 2 | 1 << 5,
66  BITLEVELCOUPLER_INTERFACE = 1 << 2 | 1 << 6,
67  PRISMSFROMSURFACE_INTERFACE = 1 << 2 | 1 << 7,
68  MESHSETSMANAGER_INTERFACE = 1 << 2 | 1 << 8,
69  COORDSSYSTEMMANAGER_INTERFACE = 1 << 2 | 1 << 9,
70  CUTMESH_INTERFACE = 1 << 2 | 1 << 10,
71  FIELDEVALUATOR_INTERFACE = 1 << 2 | 1 << 11
72 };

◆ LoopInterfaces

Enumerator
PETSC_DATA_METHOD 
KSP_METHOD 
SNES_METHOD 
TS_METHOD 
BASIC_METHOD 
FE_METHOD 
ENTITY_METHOD 
DOF_METHOD 

Definition at line 74 of file definitions.h.

74  {
75  // Loop Methods
76  PETSC_DATA_METHOD = 1 << 3,
77  KSP_METHOD = 1 << 3 | 1 << 4,
78  SNES_METHOD = 1 << 3 | 1 << 5,
79  TS_METHOD = 1 << 3 | 1 << 6,
80  BASIC_METHOD = 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6,
81  FE_METHOD = 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 7,
82  ENTITY_METHOD = 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 9,
83  DOF_METHOD = 1 << 3 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 9,
84 };

◆ MoFEMErrorCodes

Error handling.

This is complementary to PETSC error codes. The numerical values for these are defined in include/petscerror.h. The names are defined in err.c

MoAB error messages are defined in moab/Types.hpp

Enumerator
MOFEM_SUCCESS 
MOFEM_DATA_INCONSISTENCY 
MOFEM_NOT_IMPLEMENTED 
MOFEM_NOT_FOUND 
MOFEM_OPERATION_UNSUCCESSFUL 
MOFEM_IMPOSIBLE_CASE 
MOFEM_INVALID_DATA 
MOFEM_NOT_INSTALLED 
MOFEM_MOFEMEXCEPTION_THROW 
MOFEM_STD_EXCEPTION_THROW 
MOFEM_ATOM_TEST_INVALID 
MOFEM_MOAB_ERROR 

Definition at line 121 of file definitions.h.

121  {
122  MOFEM_SUCCESS = 0,
124  MOFEM_NOT_IMPLEMENTED = 101,
125  MOFEM_NOT_FOUND = 102,
127  MOFEM_IMPOSIBLE_CASE = 104,
128  MOFEM_INVALID_DATA = 105,
129  MOFEM_NOT_INSTALLED = 106,
133  MOFEM_MOAB_ERROR = 110
134 };

◆ MoFEMTypes

enum MoFEMTypes

Those types control how functions respond on arguments, f.e. error handling.

Enumerator
MF_ZERO 
MF_EXCL 
MF_EXIST 

Definition at line 189 of file definitions.h.

189 { MF_ZERO = 0, MF_EXCL = 1 << 0, MF_EXIST = 1 << 1 };

◆ RowColData

enum RowColData

RowColData.

Enumerator
ROW 
COL 
DATA 
LASTROWCOLDATA 

Definition at line 192 of file definitions.h.

192 { ROW = 0, COL, DATA, LASTROWCOLDATA };

◆ VERBOSITY_LEVELS

Verbosity levels.

Enumerator
DEFAULT_VERBOSITY 
QUIET 
VERBOSE 
VERY_VERBOSE 
NOISY 
VERY_NOISY 

Definition at line 275 of file definitions.h.

275  {
276  DEFAULT_VERBOSITY = -1,
277  QUIET = 0,
278  VERBOSE,
279  VERY_VERBOSE,
280  NOISY,
281  VERY_NOISY
282 };

Function Documentation

◆ macro_is_deprecated_using_deprecated_function()

DEPRECATED void macro_is_deprecated_using_deprecated_function ( )

Is used to indicate that macro is deprecated Do nothing just triggers error at the compilation.

Definition at line 24 of file Core.cpp.

24 {}

Variable Documentation

◆ ApproximationBaseNames

const char* const ApproximationBaseNames[]
static
Initial value:
= {
"NOBASE",
"AINSWORTH_LEGENDRE_BASE",
"AINSWORTH_LOBATTO_BASE",
"AINSWORTH_BERNSTEIN_BEZIER_BASE",
"DEMKOWICZ_JACOBI_BASE",
"USER_BASE",
"LASTBASE"}
Examples
forces_and_sources_testing_edge_element.cpp.

Definition at line 164 of file definitions.h.

◆ CubitBCNames

const char* const CubitBCNames[]
static
Initial value:
= {
"UNKNOWNSET", "NODESET", "SIDESET", "BLOCKSET",
"MATERIALSET", "DISPLACEMENTSET", "FORCESET", "PRESSURESET",
"VELOCITYSET", "ACCELERATIONSET", "TEMPERATURESET", "HEATFLUXSET",
"INTERFACESET", "UNKNOWNNAME", "MAT_ELASTICSET", "MAT_INTERFSET",
"MAT_THERMALSET", "BODYFORCESSET", "MAT_MOISTURESET", "DIRICHLET_BC",
"NEUMANN_BC", "LASTSET_BC"}

Names of types of sets and boundary conditions.

Definition at line 244 of file definitions.h.

◆ FieldSpaceNames

const char* const FieldSpaceNames[]
static
Initial value:
= {
"NOSPACE", "NOFIELD", "H1", "HCURL", "HDIV", "L2", "LASTSPACE"}

Definition at line 184 of file definitions.h.

◆ MoFEMErrorCodesNames

const char* const MoFEMErrorCodesNames[]
static
Initial value:
= {
"MOFEM_SUCCESS",
"MOFEM_DATA_INCONSISTENCY",
"MOFEM_NOT_IMPLEMENTED",
"MOFEM_NOT_FOUND",
"MOFEM_OPERATION_UNSUCCESSFUL",
"MOFEM_IMPOSIBLE_CASE",
"MOFEM_INVALID_DATA",
"MOFEM_MOFEMEXCEPTION_THROW",
"MOFEM_STD_EXCEPTION_THROW",
"MOFEM_ATOM_TEST_INVALID",
"MOFEM_MOAB_ERROR"}

Definition at line 136 of file definitions.h.

NOSPACE
@ NOSPACE
Definition: definitions.h:175
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
LOBATTO_BASE_FUNCTION_INTERFACE
@ LOBATTO_BASE_FUNCTION_INTERFACE
Definition: definitions.h:100
DEFAULT_VERBOSITY
@ DEFAULT_VERBOSITY
Definition: definitions.h:276
KERNEL_BASE_FUNCTION_INTERFACE
@ KERNEL_BASE_FUNCTION_INTERFACE
Definition: definitions.h:101
SIDESET
@ SIDESET
Definition: definitions.h:216
BITREFMANAGER_INTERFACE
@ BITREFMANAGER_INTERFACE
Definition: definitions.h:58
H1
@ H1
continuous field
Definition: definitions.h:177
MOFEM_STD_EXCEPTION_THROW
@ MOFEM_STD_EXCEPTION_THROW
Definition: definitions.h:131
LASTBASE
@ LASTBASE
Definition: definitions.h:161
PETSC_DATA_METHOD
@ PETSC_DATA_METHOD
Definition: definitions.h:76
HVEC0_2
@ HVEC0_2
Definition: definitions.h:267
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:67
NOISY
@ NOISY
Definition: definitions.h:280
n
static Index< 'n', 3 > n
Definition: BasicFeTools.hpp:78
PROBLEMSMANAGER_INTERFACE
@ PROBLEMSMANAGER_INTERFACE
Definition: definitions.h:45
TS_METHOD
@ TS_METHOD
Definition: definitions.h:79
QUAD_BASE_FUNCTION_INTERFACE
@ QUAD_BASE_FUNCTION_INTERFACE
Definition: definitions.h:110
PRESSURESET
@ PRESSURESET
Definition: definitions.h:221
NOBASE
@ NOBASE
Definition: definitions.h:151
ISMANAGER_INTERFACE
@ ISMANAGER_INTERFACE
Definition: definitions.h:55
L2
@ L2
field with C-1 continuity
Definition: definitions.h:180
LOGMANAGER_INTERFACE
@ LOGMANAGER_INTERFACE
Definition: definitions.h:50
help
static char help[]
Definition: activate_deactivate_dofs.cpp:27
HVEC0_1
@ HVEC0_1
Definition: definitions.h:264
VERY_NOISY
@ VERY_NOISY
Definition: definitions.h:281
UNKNOWN_DM_INTERFACE
@ UNKNOWN_DM_INTERFACE
Definition: definitions.h:90
MOFEM_SUCCESS
@ MOFEM_SUCCESS
Definition: definitions.h:122
MED_INTERFACE
@ MED_INTERFACE
Definition: definitions.h:64
DATA
@ DATA
Definition: definitions.h:192
HVEC0_0
@ HVEC0_0
Definition: definitions.h:261
HVEC1_1
@ HVEC1_1
Definition: definitions.h:265
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1943
FIELDEVALUATOR_INTERFACE
@ FIELDEVALUATOR_INTERFACE
Definition: definitions.h:71
FIELDBLAS_INTERFACE
@ FIELDBLAS_INTERFACE
Definition: definitions.h:57
BASIC_METHOD
@ BASIC_METHOD
Definition: definitions.h:80
BASIC_INTERFACE
@ BASIC_INTERFACE
Definition: definitions.h:48
HVEC1
@ HVEC1
Definition: definitions.h:255
KSP_METHOD
@ KSP_METHOD
Definition: definitions.h:77
USER_BASE
@ USER_BASE
user implemented approximation base
Definition: definitions.h:160
PRISMSFROMSURFACE_INTERFACE
@ PRISMSFROMSURFACE_INTERFACE
Definition: definitions.h:67
UNKNOWNNAME
@ UNKNOWNNAME
Definition: definitions.h:227
ROW
@ ROW
Definition: definitions.h:192
TETGEN_INTERFACE
@ TETGEN_INTERFACE
Definition: definitions.h:63
FE_METHOD
@ FE_METHOD
Definition: definitions.h:81
HVEC2_1
@ HVEC2_1
Definition: definitions.h:266
NODESET
@ NODESET
Definition: definitions.h:215
MATERIALSET
@ MATERIALSET
Definition: definitions.h:218
CUTMESH_INTERFACE
@ CUTMESH_INTERFACE
Definition: definitions.h:70
VERBOSE
@ VERBOSE
Definition: definitions.h:278
CORE_INTERFACE
@ CORE_INTERFACE
Definition: definitions.h:43
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:604
BYALL
@ BYALL
Definition: definitions.h:206
HVEC2_2
@ HVEC2_2
Definition: definitions.h:269
HVEC1_2
@ HVEC1_2
Definition: definitions.h:268
SERIES_RECORDER
@ SERIES_RECORDER
Definition: definitions.h:54
DMCTX_INTERFACE
@ DMCTX_INTERFACE
Definition: definitions.h:91
FORCESET
@ FORCESET
Definition: definitions.h:220
MAT_THERMALSET
@ MAT_THERMALSET
block name is "MAT_THERMAL"
Definition: definitions.h:230
BODYFORCESSET
@ BODYFORCESSET
block name is "BODY_FORCES"
Definition: definitions.h:231
EDGE_BASE_FUNCTION_INTERFACE
@ EDGE_BASE_FUNCTION_INTERFACE
Definition: definitions.h:107
MOFEM_IMPOSIBLE_CASE
@ MOFEM_IMPOSIBLE_CASE
Definition: definitions.h:127
MESHSETSMANAGER_INTERFACE
@ MESHSETSMANAGER_INTERFACE
Definition: definitions.h:68
ACCELERATIONSET
@ ACCELERATIONSET
Definition: definitions.h:223
MAT_ELASTICSET
@ MAT_ELASTICSET
block name is "MAT_ELASTIC"
Definition: definitions.h:228
JACOBI_BASE_FUNCTION_INTERFACE
@ JACOBI_BASE_FUNCTION_INTERFACE
Definition: definitions.h:102
DISPLACEMENTSET
@ DISPLACEMENTSET
Definition: definitions.h:219
BYROWDATA
@ BYROWDATA
Definition: definitions.h:203
COL
@ COL
Definition: definitions.h:192
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:60
LASTSPACE
@ LASTSPACE
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:181
INTERFACESET
@ INTERFACESET
Definition: definitions.h:226
MOFEM_NOT_INSTALLED
@ MOFEM_NOT_INSTALLED
Definition: definitions.h:129
NODEMERGER_INTERFACE
@ NODEMERGER_INTERFACE
Definition: definitions.h:65
TRI_BASE_FUNCTION_INTERFACE
@ TRI_BASE_FUNCTION_INTERFACE
Definition: definitions.h:106
AINSWORTH_LOBATTO_BASE
@ AINSWORTH_LOBATTO_BASE
Definition: definitions.h:154
BITLEVELCOUPLER_INTERFACE
@ BITLEVELCOUPLER_INTERFACE
Definition: definitions.h:66
MOFEM_OPERATION_UNSUCCESSFUL
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition: definitions.h:126
UNKNOWNINTERFACE
@ UNKNOWNINTERFACE
Definition: definitions.h:41
MESH_REFINE
@ MESH_REFINE
Definition: definitions.h:52
BYDATA
@ BYDATA
Definition: definitions.h:202
UNKNOWNSET
@ UNKNOWNSET
Definition: definitions.h:214
MOFEM_MOFEMEXCEPTION_THROW
@ MOFEM_MOFEMEXCEPTION_THROW
Definition: definitions.h:130
COMM_INTERFACE
@ COMM_INTERFACE
Definition: definitions.h:49
MOFEM_NOT_FOUND
@ MOFEM_NOT_FOUND
Definition: definitions.h:125
main
int main(int argc, char *argv[])
Definition: activate_deactivate_dofs.cpp:29
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:77
VELOCITYSET
@ VELOCITYSET
Definition: definitions.h:222
AINSWORTH_BERNSTEIN_BEZIER_BASE
@ AINSWORTH_BERNSTEIN_BEZIER_BASE
Definition: definitions.h:156
LEGENDRE_BASE_FUNCTION_INTERFACE
@ LEGENDRE_BASE_FUNCTION_INTERFACE
Definition: definitions.h:99
COORDSSYSTEMMANAGER_INTERFACE
@ COORDSSYSTEMMANAGER_INTERFACE
Definition: definitions.h:69
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:100
BYCOLDATA
@ BYCOLDATA
Definition: definitions.h:204
UNKNOWN_BASE_FUNCTION_INTERFACE
@ UNKNOWN_BASE_FUNCTION_INTERFACE
Definition: definitions.h:98
PRISM_INTEFACE
@ PRISM_INTEFACE
Definition: definitions.h:53
LASTSET_BC
@ LASTSET_BC
Definition: definitions.h:235
MATRIX_MANAGER_INTERFACE
@ MATRIX_MANAGER_INTERFACE
Definition: definitions.h:46
ENTITY_METHOD
@ ENTITY_METHOD
Definition: definitions.h:82
MF_ZERO
@ MF_ZERO
Definition: definitions.h:189
BYCOL
@ BYCOL
Definition: definitions.h:201
MoFEM::Exceptions::MoFEMException
Exception to catch.
Definition: Exceptions.hpp:31
DEMKOWICZ_JACOBI_BASE
@ DEMKOWICZ_JACOBI_BASE
Definition: definitions.h:158
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:441
TOOLS
@ TOOLS
Definition: definitions.h:60
FATPRISM_BASE_FUNCTION_INTERFACE
@ FATPRISM_BASE_FUNCTION_INTERFACE
Definition: definitions.h:108
BLOCKSET
@ BLOCKSET
Definition: definitions.h:217
AINSWORTH_LEGENDRE_BASE
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:152
HCURL
@ HCURL
field with continuous tangents
Definition: definitions.h:178
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:123
TEMPERATURESET
@ TEMPERATURESET
Definition: definitions.h:224
HVEC2_0
@ HVEC2_0
Definition: definitions.h:263
DIRICHLET_BC
@ DIRICHLET_BC
Definition: definitions.h:233
MAT_INTERFSET
@ MAT_INTERFSET
Definition: definitions.h:229
BYROW
@ BYROW
Definition: definitions.h:200
MOFEM_ATOM_TEST_INVALID
@ MOFEM_ATOM_TEST_INVALID
Definition: definitions.h:132
NEUMANN_BC
@ NEUMANN_BC
Definition: definitions.h:234
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:509
HEATFLUXSET
@ HEATFLUXSET
Definition: definitions.h:225
QUIET
@ QUIET
Definition: definitions.h:277
LASTROWCOLDATA
@ LASTROWCOLDATA
Definition: definitions.h:192
HVEC2
@ HVEC2
Definition: definitions.h:255
MoFEM::CoreInterface
Interface.
Definition: Interface.hpp:42
SNES_METHOD
@ SNES_METHOD
Definition: definitions.h:78
i
FTensor::Index< 'i', 3 > i
Definition: matrix_function.cpp:18
MF_EXCL
@ MF_EXCL
Definition: definitions.h:189
DEPRECATED_CORE_INTERFACE
@ DEPRECATED_CORE_INTERFACE
Definition: definitions.h:44
VECMANAGER_INTERFACE
@ VECMANAGER_INTERFACE
Definition: definitions.h:56
DOF_METHOD
@ DOF_METHOD
Definition: definitions.h:83
MF_EXIST
@ MF_EXIST
Definition: definitions.h:189
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
HDIV
@ HDIV
field with continuous normal traction
Definition: definitions.h:179
MOFEM_NOT_IMPLEMENTED
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:124
INTEGRATED_JACOBI_BASE_FUNCTION_INTERFACE
@ INTEGRATED_JACOBI_BASE_FUNCTION_INTERFACE
Definition: definitions.h:103
MAT_MOISTURESET
@ MAT_MOISTURESET
block name is "MAT_MOISTURE"
Definition: definitions.h:232
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:87
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1129
CHKERRG
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:552
MOFEM_MOAB_ERROR
@ MOFEM_MOAB_ERROR
Definition: definitions.h:133
VERY_VERBOSE
@ VERY_VERBOSE
Definition: definitions.h:279
FLATPRISM_BASE_FUNCTION_INTERFACE
@ FLATPRISM_BASE_FUNCTION_INTERFACE
Definition: definitions.h:109
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
MOFEM_INVALID_DATA
@ MOFEM_INVALID_DATA
Definition: definitions.h:128
BYROWCOL
@ BYROWCOL
Definition: definitions.h:205
HVEC1_0
@ HVEC1_0
Definition: definitions.h:262
MoFEM::Exceptions::rval
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:85
TET_BASE_FUNCTION_INTERFACE
@ TET_BASE_FUNCTION_INTERFACE
Definition: definitions.h:105
HVEC0
@ HVEC0
Definition: definitions.h:255
NOFIELD
@ NOFIELD
scalar or vector of scalars describe (no true field)
Definition: definitions.h:176
ENT_BASE_FUNCTION_INTERFACE
@ ENT_BASE_FUNCTION_INTERFACE
Definition: definitions.h:104
SIMPLE_INTERFACE
@ SIMPLE_INTERFACE
Definition: definitions.h:47