v0.8.13
Classes | Macros
Loops

Manages complexities for integrating over finite elements and dofs. More...

Collaboration diagram for Loops:

Classes

struct  MoFEM::KspMethod
 data structure for ksp (linear solver) contextStruture stores context data which are set in functions run by PETSc SNES functions. More...
 
struct  MoFEM::SnesMethod
 data structure for snes (nonlinear solver) contextStructure stores context data which are set in functions run by PETSc SNES functions. More...
 
struct  MoFEM::TSMethod
 data structure for TS (time stepping) contextStructure stores context data which are set in functions run by PETSc Time Stepping functions. More...
 
struct  MoFEM::BasicMethod
 Data structure to exchange data between mofem and User Loop Methods.It allows to exchange data between MoFEM and user functions. It stores information about multi-indices. More...
 
struct  MoFEM::FEMethod
 structure for User Loop Methods on finite elementsIt can be used to calculate stiffness matrices, residuals, load vectors etc. It is low level class however in some class users looking for speed and efficiency, can use it directly. More...
 
struct  MoFEM::EntityMethod
 Data structure to exchange data between mofem and User Loop Methods on entities. More...
 
struct  MoFEM::DofMethod
 Data structure to exchange data between mofem and User Loop Methods on entities.It allows to exchange data between MoFEM and user functions. It stores information about multi-indices. More...
 

Macros

#define _IT_GET_FEROW_DOFS_FOR_LOOP_(FE, IT)
 loop over all dofs which are on a particular FE row More...
 
#define _IT_GET_FECOL_DOFS_FOR_LOOP_(FE, IT)
 loop over all dofs which are on a particular FE column More...
 
#define _IT_GET_FEDATA_DOFS_FOR_LOOP_(FE, IT)
 loop over all dofs which are on a particular FE data More...
 
#define _IT_GET_FEROW_BY_SIDE_DOFS_FOR_LOOP_(FE, NAME, TYPE, SIDE, IT)
 loop over all dofs which are on a particular FE row, field, entity type and canonical side number More...
 
#define _IT_GET_FECOL_BY_SIDE_DOFS_FOR_LOOP_(FE, NAME, TYPE, SIDE, IT)
 loop over all dofs which are on a particular FE column, field, entity type and canonical side number More...
 
#define _IT_GET_FEDATA_BY_SIDE_DOFS_FOR_LOOP_(FE, NAME, TYPE, SIDE, IT)
 loop over all dofs which are on a particular FE data, field, entity type and canonical side number More...
 
#define _IT_GET_FEROW_BY_TYPE_DOFS_FOR_LOOP_(FE, NAME, TYPE, IT)
 loop over all dofs which are on a particular FE row, field and entity type More...
 
#define _IT_GET_FECOL_BY_TYPE_DOFS_FOR_LOOP_(FE, NAME, TYPE, IT)
 loop over all dofs which are on a particular FE column, field and entity type More...
 
#define _IT_GET_FEDATA_BY_TYPE_DOFS_FOR_LOOP_(FE, NAME, TYPE, IT)
 loop over all dofs which are on a particular FE data, field and entity type More...
 
#define _IT_GET_FEROW_BY_NAME_DOFS_FOR_LOOP_(FE, NAME, IT)
 loop over all dofs which are on a particular FE row and field More...
 
#define _IT_GET_FECOL_BY_NAME_DOFS_FOR_LOOP_(FE, NAME, IT)
 loop over all dofs which are on a particular FE column and field More...
 
#define _IT_GET_FEDATA_BY_NAME_DOFS_FOR_LOOP_(FE, NAME, IT)
 loop over all dofs which are on a particular FE data and field More...
 
#define _IT_GET_FEROW_DOFS_BY_ENT_FOR_LOOP_(FE, ENT, IT)
 loop over all dofs which are on a particular FE row and given element entity (handle from moab) More...
 
#define _IT_GET_FECOL_DOFS_BY_ENT_FOR_LOOP_(FE, ENT, IT)
 loop over all dofs which are on a particular FE column and given element entity (handle from moab) More...
 
#define _IT_GET_FEDATA_DOFS_BY_ENT_FOR_LOOP_(FE, ENT, IT)
 loop over all dofs which are on a particular FE data and given element entity (handle from moab) More...
 
#define _IT_GET_FEROW_DOFS_BY_NAME_AND_ENT_FOR_LOOP_(FE, NAME, ENT, IT)
 loop over all dofs which are on a particular FE row, field and given element entity (handle from moab) More...
 
#define _IT_GET_FECOL_DOFS_BY_NAME_AND_ENT_FOR_LOOP_(FE, NAME, ENT, IT)
 loop over all dofs which are on a particular FE column, field and given element entity (handle from moab) More...
 
#define _IT_GET_FEDATA_DOFS_BY_NAME_AND_ENT_FOR_LOOP_(FE, NAME, ENT, IT)
 loop over all dofs which are on a particular FE data, field and given element entity (handle from moab) More...
 

Making loops on elements and entities

virtual MoFEMErrorCode MoFEM::CoreInterface::problem_basic_method_postProcess (const Problem *problem_ptr, BasicMethod &method, int verb=DEFAULT_VERBOSITY)=0
 Set data for BasicMethodThis function set data about problem, adjacencies and other multi-indices in database. This function can be used a special case when user need to do some pre- and post-processing before matrix or vector is initiated, or to assemble matrix for group of FEMethods. Is used by classes SnesCtx and TsCtx. Look for more details there. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::problem_basic_method_postProcess (const std::string &problem_name, BasicMethod &method, int verb=DEFAULT_VERBOSITY)=0
 Set data for BasicMethodThis function set data about problem, adjacencies and other multi-indices in database. This function can be used a special case when user need to do some pre- and post-processing before matrix or vector is initiated, or to assemble matrix for group of FEMethods. Is used by classes SnesCtx and TsCtx. Look for more details there. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_finite_elements (const std::string &problem_name, const std::string &fe_name, FEMethod &method, MoFEMTypes bh=MF_EXIST, int verb=DEFAULT_VERBOSITY)=0
 Make a loop over finite elements. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_finite_elements (const Problem *problem_ptr, const std::string &fe_name, FEMethod &method, int lower_rank, int upper_rank, MoFEMTypes bh=MF_EXIST, int verb=DEFAULT_VERBOSITY)=0
 Make a loop over finite elements on partitions from upper to lower rank. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_finite_elements (const std::string &problem_name, const std::string &fe_name, FEMethod &method, int lower_rank, int upper_rank, MoFEMTypes bh=MF_EXIST, int verb=DEFAULT_VERBOSITY)=0
 Make a loop over finite elements on partitions from upper to lower rank. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_dofs (const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
 Make a loop over dofs. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_dofs (const std::string &problem_name, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
 Make a loop over dofs. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_dofs (const std::string &problem_name, const std::string &field_name, RowColData rc, DofMethod &method, int verb=DEFAULT_VERBOSITY)=0
 Make a loop over dofs. More...
 

Detailed Description

Manages complexities for integrating over finite elements and dofs.

Macro Definition Documentation

◆ _IT_GET_FECOL_BY_NAME_DOFS_FOR_LOOP_

#define _IT_GET_FECOL_BY_NAME_DOFS_FOR_LOOP_ (   FE,
  NAME,
  IT 
)
Value:
auto IT = FE->get_begin<FENumeredDofEntityByFieldName>( \
FE->colPtr->get<FieldName_mi_tag>(), NAME); \
IT != FE->get_end<FENumeredDofEntityByFieldName>( \
FE->colPtr->get<FieldName_mi_tag>(), NAME); \
IT++
FENumeredDofEntity_multiIndex::index< FieldName_mi_tag >::type FENumeredDofEntityByFieldName
Finite element numbered DoF multi-index by field name.

loop over all dofs which are on a particular FE column and field

Definition at line 477 of file LoopMethods.hpp.

◆ _IT_GET_FECOL_BY_SIDE_DOFS_FOR_LOOP_

#define _IT_GET_FECOL_BY_SIDE_DOFS_FOR_LOOP_ (   FE,
  NAME,
  TYPE,
  SIDE,
  IT 
)
Value:
FENumeredDofEntity_multiIndex::index<Composite_mi_tag>::type::iterator IT = \
FE->get_begin< \
FENumeredDofEntity_multiIndex::index<Composite_mi_tag>::type>( \
FE->colPtr->get<Composite_mi_tag>(), NAME, TYPE, SIDE); \
IT != FE->get_end< \
FENumeredDofEntity_multiIndex::index<Composite_mi_tag>::type>( \
FE->colPtr->get<Composite_mi_tag>(), NAME, TYPE, SIDE); \
IT++

loop over all dofs which are on a particular FE column, field, entity type and canonical side number

Definition at line 389 of file LoopMethods.hpp.

◆ _IT_GET_FECOL_BY_TYPE_DOFS_FOR_LOOP_

#define _IT_GET_FECOL_BY_TYPE_DOFS_FOR_LOOP_ (   FE,
  NAME,
  TYPE,
  IT 
)
Value:
auto IT = FE->get_begin<FENumeredDofEntityByNameAndType>( \
FE->colPtr->get<Composite_Name_And_Type_mi_tag>(), NAME, TYPE); \
IT != FE->get_end<FENumeredDofEntityByNameAndType>( \
FE->colPtr->get<Composite_Name_And_Type_mi_tag>(), NAME, TYPE); \
IT++
FENumeredDofEntity_multiIndex::index< Composite_Name_And_Type_mi_tag >::type FENumeredDofEntityByNameAndType
Dof entity multi-index by field name and entity type.

loop over all dofs which are on a particular FE column, field and entity type

Definition at line 436 of file LoopMethods.hpp.

◆ _IT_GET_FECOL_DOFS_BY_ENT_FOR_LOOP_

#define _IT_GET_FECOL_DOFS_BY_ENT_FOR_LOOP_ (   FE,
  ENT,
  IT 
)
Value:
auto IT = FE->get_begin<FENumeredDofEntityByEnt>( \
FE->colPtr->get<Ent_mi_tag>(), ENT); \
IT != FE->get_end<FENumeredDofEntityByEnt>(FE->colPtr->get<Ent_mi_tag>(), \
ENT); \
IT++
FENumeredDofEntity_multiIndex::index< Ent_mi_tag >::type FENumeredDofEntityByEnt
Numbered DoF multi-index by entity.

loop over all dofs which are on a particular FE column and given element entity (handle from moab)

Definition at line 518 of file LoopMethods.hpp.

◆ _IT_GET_FECOL_DOFS_BY_NAME_AND_ENT_FOR_LOOP_

#define _IT_GET_FECOL_DOFS_BY_NAME_AND_ENT_FOR_LOOP_ (   FE,
  NAME,
  ENT,
  IT 
)
Value:
auto IT = FE->get_begin<FENumeredDofEntityByNameAndEnt>( \
FE->colPtr->get<Composite_Name_And_Ent_mi_tag>(), NAME, ENT); \
IT != FE->get_end<FENumeredDofEntityByNameAndEnt>( \
FE->colPtr->get<Composite_Name_And_Ent_mi_tag>(), NAME, ENT); \
IT++
FENumeredDofEntity_multiIndex::index< Composite_Name_And_Ent_mi_tag >::type FENumeredDofEntityByNameAndEnt
Dof entity multi-index by field name and entity.

loop over all dofs which are on a particular FE column, field and given element entity (handle from moab)

Definition at line 561 of file LoopMethods.hpp.

◆ _IT_GET_FECOL_DOFS_FOR_LOOP_

#define _IT_GET_FECOL_DOFS_FOR_LOOP_ (   FE,
  IT 
)
Value:
auto IT = FE->colPtr->begin(); \
IT != FE->colPtr->end(); \
IT++

loop over all dofs which are on a particular FE column

Definition at line 341 of file LoopMethods.hpp.

◆ _IT_GET_FEDATA_BY_NAME_DOFS_FOR_LOOP_

#define _IT_GET_FEDATA_BY_NAME_DOFS_FOR_LOOP_ (   FE,
  NAME,
  IT 
)
Value:
auto IT = FE->get_begin<FEDofEntityByFieldName>( \
FE->dataPtr->get<FieldName_mi_tag>(), NAME); \
IT != FE->get_end<FEDofEntityByFieldName>( \
FE->dataPtr->get<FieldName_mi_tag>(), NAME); \
IT++
FEDofEntity_multiIndex::index< FieldName_mi_tag >::type FEDofEntityByFieldName
Finite element DoF multi-index by field name.

loop over all dofs which are on a particular FE data and field

Definition at line 487 of file LoopMethods.hpp.

◆ _IT_GET_FEDATA_BY_SIDE_DOFS_FOR_LOOP_

#define _IT_GET_FEDATA_BY_SIDE_DOFS_FOR_LOOP_ (   FE,
  NAME,
  TYPE,
  SIDE,
  IT 
)
Value:
FEDofEntity_multiIndex::index<Composite_mi_tag>::type::iterator IT = \
FE->get_begin<FEDofEntity_multiIndex::index<Composite_mi_tag>::type>( \
FE->dataPtr->get<Composite_mi_tag>(), NAME, TYPE, SIDE); \
IT != FE->get_end<FEDofEntity_multiIndex::index<Composite_mi_tag>::type>( \
FE->dataPtr->get<Composite_mi_tag>(), NAME, TYPE, SIDE); \
IT++

loop over all dofs which are on a particular FE data, field, entity type and canonical side number

Definition at line 402 of file LoopMethods.hpp.

◆ _IT_GET_FEDATA_BY_TYPE_DOFS_FOR_LOOP_

#define _IT_GET_FEDATA_BY_TYPE_DOFS_FOR_LOOP_ (   FE,
  NAME,
  TYPE,
  IT 
)
Value:
auto IT = FE->get_begin<FEDofEntityByNameAndType>( \
FE->dataPtr->get<Composite_Name_And_Type_mi_tag>(), NAME, TYPE); \
IT != FE->get_end<FEDofEntityByNameAndType>( \
FE->dataPtr->get<Composite_Name_And_Type_mi_tag>(), NAME, TYPE); \
IT++
FEDofEntity_multiIndex::index< Composite_Name_And_Type_mi_tag >::type FEDofEntityByNameAndType
Dof entity multi-index by field name and entity type.

loop over all dofs which are on a particular FE data, field and entity type

Definition at line 446 of file LoopMethods.hpp.

◆ _IT_GET_FEDATA_DOFS_BY_ENT_FOR_LOOP_

#define _IT_GET_FEDATA_DOFS_BY_ENT_FOR_LOOP_ (   FE,
  ENT,
  IT 
)
Value:
auto IT = FE->get_begin<FEDofEntity_multiIndex::index<Ent_mi_tag>::type>( \
FE->dataPtr->get<Ent_mi_tag>(), ENT); \
IT != FE->get_end<FEDofEntity_multiIndex::index<Ent_mi_tag>::type>( \
FE->dataPtr->get<Ent_mi_tag>(), ENT); \
IT++

loop over all dofs which are on a particular FE data and given element entity (handle from moab)

Definition at line 528 of file LoopMethods.hpp.

◆ _IT_GET_FEDATA_DOFS_BY_NAME_AND_ENT_FOR_LOOP_

#define _IT_GET_FEDATA_DOFS_BY_NAME_AND_ENT_FOR_LOOP_ (   FE,
  NAME,
  ENT,
  IT 
)
Value:
auto IT = FE->get_begin<FEDofEntityByNameAndEnt>( \
FE->dataPtr->get<Composite_Name_And_Ent_mi_tag>(), NAME, ENT); \
IT != FE->get_end<FEDofEntityByNameAndEnt>( \
FE->dataPtr->get<Composite_Name_And_Ent_mi_tag>(), NAME, ENT); \
IT++
FEDofEntity_multiIndex::index< Composite_Name_And_Ent_mi_tag >::type FEDofEntityByNameAndEnt
Dof entity multi-index by field name and entity.

loop over all dofs which are on a particular FE data, field and given element entity (handle from moab)

Definition at line 571 of file LoopMethods.hpp.

◆ _IT_GET_FEDATA_DOFS_FOR_LOOP_

#define _IT_GET_FEDATA_DOFS_FOR_LOOP_ (   FE,
  IT 
)
Value:
auto IT = FE->dataPtr->begin(); \
IT != FE->dataPtr->end(); \
IT++

loop over all dofs which are on a particular FE data

Definition at line 349 of file LoopMethods.hpp.

◆ _IT_GET_FEROW_BY_NAME_DOFS_FOR_LOOP_

#define _IT_GET_FEROW_BY_NAME_DOFS_FOR_LOOP_ (   FE,
  NAME,
  IT 
)
Value:
auto IT = FE->get_begin<FENumeredDofEntityByFieldName>( \
FE->rowPtr->get<FieldName_mi_tag>(), NAME); \
IT != FE->get_end<FENumeredDofEntityByFieldName>( \
FE->rowPtr->get<FieldName_mi_tag>(), NAME); \
IT++
FENumeredDofEntity_multiIndex::index< FieldName_mi_tag >::type FENumeredDofEntityByFieldName
Finite element numbered DoF multi-index by field name.

loop over all dofs which are on a particular FE row and field

Definition at line 467 of file LoopMethods.hpp.

◆ _IT_GET_FEROW_BY_SIDE_DOFS_FOR_LOOP_

#define _IT_GET_FEROW_BY_SIDE_DOFS_FOR_LOOP_ (   FE,
  NAME,
  TYPE,
  SIDE,
  IT 
)
Value:
FENumeredDofEntity_multiIndex::index<Composite_mi_tag>::type::iterator IT = \
FE->get_begin< \
FENumeredDofEntity_multiIndex::index<Composite_mi_tag>::type>( \
FE->rowPtr->get<Composite_mi_tag>(), NAME, TYPE, SIDE); \
IT != FE->get_end< \
FENumeredDofEntity_multiIndex::index<Composite_mi_tag>::type>( \
FE->rowPtr->get<Composite_mi_tag>(), NAME, TYPE, SIDE); \
IT++

loop over all dofs which are on a particular FE row, field, entity type and canonical side number

Parameters
FEfinite elements
Namefield name
Typemoab entity type (MBVERTEX, MBEDGE etc)
Sideside canonical number
ITthe interator in use

Definition at line 376 of file LoopMethods.hpp.

◆ _IT_GET_FEROW_BY_TYPE_DOFS_FOR_LOOP_

#define _IT_GET_FEROW_BY_TYPE_DOFS_FOR_LOOP_ (   FE,
  NAME,
  TYPE,
  IT 
)
Value:
auto IT = FE->get_begin<FENumeredDofEntityByNameAndType>( \
FE->rowPtr->get<Composite_Name_And_Type_mi_tag>(), NAME, TYPE); \
IT != FE->get_end<FENumeredDofEntityByNameAndType>( \
FE->rowPtr->get<Composite_Name_And_Type_mi_tag>(), NAME, TYPE); \
IT++
FENumeredDofEntity_multiIndex::index< Composite_Name_And_Type_mi_tag >::type FENumeredDofEntityByNameAndType
Dof entity multi-index by field name and entity type.

loop over all dofs which are on a particular FE row, field and entity type

Definition at line 426 of file LoopMethods.hpp.

◆ _IT_GET_FEROW_DOFS_BY_ENT_FOR_LOOP_

#define _IT_GET_FEROW_DOFS_BY_ENT_FOR_LOOP_ (   FE,
  ENT,
  IT 
)
Value:
auto IT = FE->get_begin<FENumeredDofEntityByEnt>( \
FE->rowPtr->get<Ent_mi_tag>(), ENT); \
IT != FE->get_end<FENumeredDofEntityByEnt>(FE->rowPtr->get<Ent_mi_tag>(), \
ENT); \
IT++
FENumeredDofEntity_multiIndex::index< Ent_mi_tag >::type FENumeredDofEntityByEnt
Numbered DoF multi-index by entity.

loop over all dofs which are on a particular FE row and given element entity (handle from moab)

Definition at line 508 of file LoopMethods.hpp.

◆ _IT_GET_FEROW_DOFS_BY_NAME_AND_ENT_FOR_LOOP_

#define _IT_GET_FEROW_DOFS_BY_NAME_AND_ENT_FOR_LOOP_ (   FE,
  NAME,
  ENT,
  IT 
)
Value:
auto IT = FE->get_begin<FENumeredDofEntityByNameAndEnt>( \
FE->rowPtr->get<Composite_Name_And_Ent_mi_tag>(), NAME, ENT); \
IT != FE->get_end<FENumeredDofEntityByNameAndEnt>( \
FE->rowPtr->get<Composite_Name_And_Ent_mi_tag>(), NAME, ENT); \
IT++
FENumeredDofEntity_multiIndex::index< Composite_Name_And_Ent_mi_tag >::type FENumeredDofEntityByNameAndEnt
Dof entity multi-index by field name and entity.

loop over all dofs which are on a particular FE row, field and given element entity (handle from moab)

Definition at line 551 of file LoopMethods.hpp.

◆ _IT_GET_FEROW_DOFS_FOR_LOOP_

#define _IT_GET_FEROW_DOFS_FOR_LOOP_ (   FE,
  IT 
)
Value:
auto IT = FE->rowPtr->begin(); \
IT != FE->rowPtr->end(); \
IT++

loop over all dofs which are on a particular FE row

Definition at line 333 of file LoopMethods.hpp.

Function Documentation

◆ loop_dofs() [1/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_dofs ( const Problem problem_ptr,
const std::string &  field_name,
RowColData  rc,
DofMethod method,
int  lower_rank,
int  upper_rank,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

◆ loop_dofs() [2/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_dofs ( const std::string &  problem_name,
const std::string &  field_name,
RowColData  rc,
DofMethod method,
int  lower_rank,
int  upper_rank,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

Make a loop over dofs.

Implemented in MoFEM::Core.

◆ loop_dofs() [3/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_dofs ( const std::string &  problem_name,
const std::string &  field_name,
RowColData  rc,
DofMethod method,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

Make a loop over dofs.

Implemented in MoFEM::Core.

◆ loop_finite_elements() [1/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_finite_elements ( const std::string &  problem_name,
const std::string &  fe_name,
FEMethod method,
MoFEMTypes  bh = MF_EXIST,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

Make a loop over finite elements.

This function is like swiss knife, is can be used to post-processing or matrix and vectors assembly. It makes loop over given finite element for given problem. The particular methods executed on each element are given by class derived form Interface::FEMethod. At beginning of each loop user defined function (method) preProcess() is called, for each element operator() is executed, at the end loop finalizes with user defined function (method) postProcess().

Methods are executed only for local elements at given processor.

For more details pleas look to examples.

Parameters
problem_nameproblem consisting set of elements
fe_namename of element in problem
methodclass derived form Interface::FEMethod
bhif bH = MF_EXIST, throws error if fe_name does not exist
verbverbosity level
Returns
error code

Implemented in MoFEM::Core.

Examples:
forces_and_sources_testing_edge_element.cpp.

◆ loop_finite_elements() [2/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_finite_elements ( const Problem problem_ptr,
const std::string &  fe_name,
FEMethod method,
int  lower_rank,
int  upper_rank,
MoFEMTypes  bh = MF_EXIST,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

Make a loop over finite elements on partitions from upper to lower rank.

This function is like swiss knife, is can be used to post-processing or matrix and vectors assembly. It makes loop over given finite element for given problem. The particular methods executed on each element are given by class derived form Interface::FEMethod. At beginning of each loop user defined function (method) preProcess() is called, for each element operator() is executed, at the end loop finalizes with user defined function (method) postProcess().

For more details please look to examples.

Interface::FEMethod

Parameters
problem_ptrpointer to problem consisting set of elements
fe_namename of element in problem
methodclass derived form Interface::FEMethod
lower_ranklower rank of process owned by finite element
upper_ranklower rank of process owned by finite element
bhif bH = MF_EXIST, throws error if fe_name does not exist
verbverbosity level
Returns
error code

Implemented in MoFEM::Core.

◆ loop_finite_elements() [3/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_finite_elements ( const std::string &  problem_name,
const std::string &  fe_name,
FEMethod method,
int  lower_rank,
int  upper_rank,
MoFEMTypes  bh = MF_EXIST,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

Make a loop over finite elements on partitions from upper to lower rank.

This function is like swiss knife, is can be used to post-processing or matrix and vectors assembly. It makes loop over given finite element for given problem. The particular methods executed on each element are given by class derived form Interface::FEMethod. At beginning of each loop user defined function (method) preProcess() is called, for each element operator() is executed, at the end loop finalizes with user defined function (method) postProcess().

For more details please look to examples.

Parameters
problem_namepointer to problem consisting set of elements
fe_namename of element in problem
methodclass derived form Interface::FEMethod
lower_ranklower rank of process owned by finite element
upper_ranklower rank of process owned by finite element
bhif bH = MF_EXIST, throws error if fe_name does not exist
verbverbosity level
Returns
error code

Implemented in MoFEM::Core.

◆ problem_basic_method_postProcess() [1/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::problem_basic_method_postProcess ( const Problem problem_ptr,
BasicMethod method,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

Set data for BasicMethodThis function set data about problem, adjacencies and other multi-indices in database. This function can be used a special case when user need to do some pre- and post-processing before matrix or vector is initiated, or to assemble matrix for group of FEMethods. Is used by classes SnesCtx and TsCtx. Look for more details there.

FIXME: Here we need example

Parameters
pointerto problem data structure
methoduser method derived from BasicMethod

Implemented in MoFEM::Core.

◆ problem_basic_method_postProcess() [2/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::problem_basic_method_postProcess ( const std::string &  problem_name,
BasicMethod method,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

Set data for BasicMethodThis function set data about problem, adjacencies and other multi-indices in database. This function can be used a special case when user need to do some pre- and post-processing before matrix or vector is initiated, or to assemble matrix for group of FEMethods. Is used by classes SnesCtx and TsCtx. Look for more details there.

FIXME: Here we need example

Parameters
problem_namename of the problem
methoduser method derived from BasicMethod

Implemented in MoFEM::Core.