v0.5.86
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::EntMethod
 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)   FENumeredDofEntity_multiIndex::iterator IT = FE->rowPtr->begin(); IT != FE->rowPtr->end();IT++
 loop over all dofs which are on a particular FE row More...
 
#define _IT_GET_FECOL_DOFS_FOR_LOOP_(FE, IT)   FENumeredDofEntity_multiIndex::iterator IT = FE->colPtr->begin(); IT != FE->colPtr->end();IT++
 loop over all dofs which are on a particular FE column More...
 
#define _IT_GET_FEDATA_DOFS_FOR_LOOP_(FE, IT)   FEDofEntity_multiIndex::iterator IT = FE->dataPtr->begin(); IT != FE->dataPtr->end();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 PetscErrorCode MoFEM::Interface::problem_basic_method_postProcess (const Problem *problem_ptr, BasicMethod &method, int verb=-1)=0
 Set data for BasicMethodThis function set data about problem, adjacencies and other MultIindices 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 PetscErrorCode MoFEM::Interface::problem_basic_method_postProcess (const std::string &problem_name, BasicMethod &method, int verb=-1)=0
 Set data for BasicMethodThis function set data about problem, adjacencies and other MultIindices 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 PetscErrorCode MoFEM::Interface::loop_finite_elements (const std::string &problem_name, const std::string &fe_name, FEMethod &method, MoFEMTypes bh=MF_EXIST, int verb=-1)=0
 Make a loop over finite elements. More...
 
virtual PetscErrorCode MoFEM::Interface::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=-1)=0
 Make a loop over finite elements on partitions from upper to lower rank. More...
 
virtual PetscErrorCode MoFEM::Interface::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=-1)=0
 Make a loop over finite elements on partitions from upper to lower rank. More...
 
virtual PetscErrorCode MoFEM::Interface::loop_dofs (const Problem *problem_ptr, const std::string &field_name, RowColData rc, EntMethod &method, int lower_rank, int upper_rank, int verb=-1)=0
 Make a loop over entities. More...
 
virtual PetscErrorCode MoFEM::Interface::loop_dofs (const std::string &problem_name, const std::string &field_name, RowColData rc, EntMethod &method, int lower_rank, int upper_rank, int verb=-1)=0
 Make a loop over entities. More...
 
virtual PetscErrorCode MoFEM::Interface::loop_dofs (const std::string &problem_name, const std::string &field_name, RowColData rc, EntMethod &method, int verb=-1)=0
 Make a loop over entities. 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:
FENumeredDofEntityByFieldName::iterator \
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 474 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 408 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:
FENumeredDofEntityByNameAndType::iterator \
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 441 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:
FENumeredDofEntityByEnt::iterator \
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 507 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:
FENumeredDofEntityByNameAndEnt::iterator \
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 540 of file LoopMethods.hpp.

◆ _IT_GET_FECOL_DOFS_FOR_LOOP_

#define _IT_GET_FECOL_DOFS_FOR_LOOP_ (   FE,
  IT 
)    FENumeredDofEntity_multiIndex::iterator IT = FE->colPtr->begin(); IT != FE->colPtr->end();IT++

loop over all dofs which are on a particular FE column

Definition at line 370 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:
FEDofEntityByFieldName::iterator \
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 482 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 416 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:
FEDofEntityByNameAndType::iterator \
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 449 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:
FEDofEntity_multiIndex::index<Ent_mi_tag>::type::iterator \
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 515 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:
FEDofEntityByNameAndEnt::iterator \
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 548 of file LoopMethods.hpp.

◆ _IT_GET_FEDATA_DOFS_FOR_LOOP_

#define _IT_GET_FEDATA_DOFS_FOR_LOOP_ (   FE,
  IT 
)    FEDofEntity_multiIndex::iterator IT = FE->dataPtr->begin(); IT != FE->dataPtr->end();IT++

loop over all dofs which are on a particular FE data

Definition at line 377 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:
FENumeredDofEntityByFieldName::iterator \
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 466 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 400 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:
FENumeredDofEntityByNameAndType::iterator \
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 433 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:
FENumeredDofEntityByEnt::iterator \
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 499 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:
FENumeredDofEntityByNameAndEnt::iterator \
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 532 of file LoopMethods.hpp.

◆ _IT_GET_FEROW_DOFS_FOR_LOOP_

#define _IT_GET_FEROW_DOFS_FOR_LOOP_ (   FE,
  IT 
)    FENumeredDofEntity_multiIndex::iterator IT = FE->rowPtr->begin(); IT != FE->rowPtr->end();IT++

loop over all dofs which are on a particular FE row

Definition at line 364 of file LoopMethods.hpp.

Function Documentation

◆ loop_dofs() [1/3]

virtual PetscErrorCode MoFEM::Interface::loop_dofs ( const Problem problem_ptr,
const std::string &  field_name,
RowColData  rc,
EntMethod method,
int  lower_rank,
int  upper_rank,
int  verb = -1 
)
pure virtual

Make a loop over entities.

Implemented in MoFEM::Core.

Examples:
elasticity.cpp, MagneticElement.hpp, and simple_interface.cpp.

◆ loop_dofs() [2/3]

virtual PetscErrorCode MoFEM::Interface::loop_dofs ( const std::string &  problem_name,
const std::string &  field_name,
RowColData  rc,
EntMethod method,
int  lower_rank,
int  upper_rank,
int  verb = -1 
)
pure virtual

Make a loop over entities.

Implemented in MoFEM::Core.

◆ loop_dofs() [3/3]

virtual PetscErrorCode MoFEM::Interface::loop_dofs ( const std::string &  problem_name,
const std::string &  field_name,
RowColData  rc,
EntMethod method,
int  verb = -1 
)
pure virtual

Make a loop over entities.

Implemented in MoFEM::Core.

◆ loop_finite_elements() [1/3]

virtual PetscErrorCode MoFEM::Interface::loop_finite_elements ( const std::string &  problem_name,
const std::string &  fe_name,
FEMethod method,
MoFEMTypes  bh = MF_EXIST,
int  verb = -1 
)
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.

◆ loop_finite_elements() [2/3]

virtual PetscErrorCode MoFEM::Interface::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 = -1 
)
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 PetscErrorCode MoFEM::Interface::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 = -1 
)
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 PetscErrorCode MoFEM::Interface::problem_basic_method_postProcess ( const Problem problem_ptr,
BasicMethod method,
int  verb = -1 
)
pure virtual

Set data for BasicMethodThis function set data about problem, adjacencies and other MultIindices 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 PetscErrorCode MoFEM::Interface::problem_basic_method_postProcess ( const std::string &  problem_name,
BasicMethod method,
int  verb = -1 
)
pure virtual

Set data for BasicMethodThis function set data about problem, adjacencies and other MultIindices 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.