v0.14.0
Loops

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

Collaboration diagram for Loops:

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 BasicMethod. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::problem_basic_method_postProcess (const std::string &problem_name, BasicMethod &method, int verb=DEFAULT_VERBOSITY)=0
 Set data for BasicMethod. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_finite_elements (const std::string problem_name, const std::string &fe_name, FEMethod &method, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), 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, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), 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, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), 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.

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::CoreTmp< 0 >.

◆ 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::CoreTmp< 0 >.

◆ loop_finite_elements() [1/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,
boost::shared_ptr< NumeredEntFiniteElement_multiIndex fe_ptr = nullptr,
MoFEMTypes  bh = MF_EXIST,
CacheTupleWeakPtr  cache_ptr = CacheTupleSharedPtr(),
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().

Note
If fe_ptr is given it is expected that multi-index is supbes of problem multi-index. If this is not the case behavior of the code is undetermined.

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
fe_ptrpointer to finite elements multi-index
bhif bH = MF_EXIST, throws error if fe_name does not exist
cache_datacache data vector
cache_rowcache row vector
cache_colcache row vector
verbverbosity level
Returns
error code

Implemented in MoFEM::CoreTmp< 0 >.

◆ loop_finite_elements() [2/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_finite_elements ( const std::string  problem_name,
const std::string &  fe_name,
FEMethod method,
boost::shared_ptr< NumeredEntFiniteElement_multiIndex fe_ptr = nullptr,
MoFEMTypes  bh = MF_EXIST,
CacheTupleWeakPtr  cache_ptr = CacheTupleSharedPtr(),
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.

Note
If fe_ptr is given it is expected that multi-index is supbes of problem multi-index. If this is not the case behavior of the code is undetermined.
Parameters
problem_nameproblem consisting set of elements
fe_namename of element in problem
methodclass derived form Interface::FEMethod
fe_ptrpointer to finite elements multi-index
bhif bH = MF_EXIST, throws error if fe_name does not exist
cache_tuple_ptrcache
verbverbosity level
Returns
error code

Implemented in MoFEM::CoreTmp< 0 >.

Examples
build_large_problem.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_flat_prism_element.cpp, forces_and_sources_testing_users_base.cpp, hcurl_divergence_operator_2d.cpp, nonlinear_dynamics.cpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, and quad_polynomial_approximation.cpp.

◆ 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,
boost::shared_ptr< NumeredEntFiniteElement_multiIndex fe_ptr = nullptr,
MoFEMTypes  bh = MF_EXIST,
CacheTupleWeakPtr  cache_ptr = CacheTupleSharedPtr(),
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().

Note
If fe_ptr is given it is expected that multi-index is supbes of problem multi-index. If this is not the case behavior of the code is undetermined.

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
fe_ptrpointer to finite elements multi-index
bhif bH = MF_EXIST, throws error if fe_name does not exist
cache_datacache data vector
cache_rowcache row vector
cache_colcache row vector
verbverbosity level
Returns
error code

Implemented in MoFEM::CoreTmp< 0 >.

◆ 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 BasicMethod.

This 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::CoreTmp< 0 >.

◆ 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 BasicMethod.

This 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::CoreTmp< 0 >.