v0.15.0
Loading...
Searching...
No Matches
Fields

Data structure for adding and managing fields. More...

Collaboration diagram for Fields:

Synchronize entities (Following functions in future will be

deprecated)

MoFEMErrorCode MoFEM::CommInterface::synchroniseFieldEntities (const std::string name, int verb=DEFAULT_VERBOSITY)
 

Synchronize

DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::synchronise_field_entities (const std::string &name, int verb=DEFAULT_VERBOSITY)
 

Fields

virtual MoFEMErrorCode MoFEM::CoreInterface::add_ents_to_field_by_dim (const Range &ents, const int dim, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
 Add entities to field meshset.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::add_ents_to_field_by_type (const Range &ents, const EntityType type, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
 Add entities to field meshset.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::add_ents_to_field_by_dim (const EntityHandle meshset, const int dim, const std::string &name, const bool recursive=true, int verb=DEFAULT_VERBOSITY)=0
 Add entities to field meshset.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::add_ents_to_field_by_type (const EntityHandle meshset, const EntityType type, const std::string &name, const bool recursive=true, int verb=DEFAULT_VERBOSITY)=0
 Add entities to field meshset.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field_by_bit_ref (const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
 remove entities from field
 
virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field (const std::string name, const EntityHandle meshset, const EntityType type, int verb=DEFAULT_VERBOSITY)=0
 remove entities from field
 
virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field (const std::string name, const Range ents, int verb=DEFAULT_VERBOSITY)=0
 remove entities from field
 
virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field (const Range ents, int verb=DEFAULT_VERBOSITY)=0
 remove entities from all fields
 
virtual MoFEMErrorCode MoFEM::CoreInterface::set_field_order (const EntityHandle meshset, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
 Set order approximation of the entities in the field.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::set_field_order (const Range &ents, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
 Set order approximation of the entities in the field.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::set_field_order_by_entity_type_and_bit_ref (const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
 Set order approximation of the entities in the field.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::list_fields () const =0
 list entities in the field
 
virtual MoFEMErrorCode MoFEM::CoreInterface::build_fields (int verb=DEFAULT_VERBOSITY)=0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::get_field_entities_by_dimension (const std::string name, int dim, Range &ents) const =0
 get entities in the field by dimension
 
virtual MoFEMErrorCode MoFEM::CoreInterface::get_field_entities_by_type (const std::string name, EntityType type, Range &ents) const =0
 get entities in the field by type
 
virtual MoFEMErrorCode MoFEM::CoreInterface::get_field_entities_by_handle (const std::string name, Range &ents) const =0
 get entities in the field by handle
 
virtual bool MoFEM::CoreInterface::check_field (const std::string &name) const =0
 check if field is in database
 
virtual const FieldMoFEM::CoreInterface::get_field_structure (const std::string &name, enum MoFEMTypes bh=MF_EXIST) const =0
 get field structure
 

Finite elements

virtual MoFEMErrorCode MoFEM::CoreInterface::get_finite_element_entities_by_dimension (const std::string name, int dim, Range &ents) const =0
 get entities in the finite element by dimension
 
virtual MoFEMErrorCode MoFEM::CoreInterface::get_finite_element_entities_by_type (const std::string name, EntityType type, Range &ents) const =0
 get entities in the finite element by type
 
virtual MoFEMErrorCode MoFEM::CoreInterface::get_finite_element_entities_by_handle (const std::string name, Range &ents) const =0
 get entities in the finite element by handle
 

Clear dofs and entities

virtual MoFEMErrorCode MoFEM::CoreInterface::list_dofs_by_field_name (const std::string &name) const =0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::clear_inactive_dofs (int verb=DEFAULT_VERBOSITY)=0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::clear_dofs_fields_by_bit_ref (const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::clear_dofs_fields (const Range ents, int verb=DEFAULT_VERBOSITY)=0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::clear_dofs_fields (const std::string name, const Range ents, int verb=DEFAULT_VERBOSITY)=0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::clear_ents_fields (const Range ents, int verb=DEFAULT_VERBOSITY)=0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::clear_ents_fields (const std::string name, const Range ents, int verb=DEFAULT_VERBOSITY)=0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::clear_ents_fields_by_bit_ref (const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
 

Making loops on elements and entities

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_dofs (const std::string &field_name, DofMethod &method, int verb=DEFAULT_VERBOSITY)=0
 Make a loop over dofs.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_entities (const std::string field_name, EntityMethod &method, Range const *const ents=nullptr, int verb=DEFAULT_VERBOSITY)=0
 Loop over field entities.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_entities (const Problem *problem_ptr, const std::string field_name, RowColData rc, EntityMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
 Loop over field entities in the problem.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_entities (const std::string problem_name, const std::string field_name, RowColData rc, EntityMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
 Loop over field entities in the problem.
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_entities (const std::string problem_name, const std::string field_name, RowColData rc, EntityMethod &method, int verb=DEFAULT_VERBOSITY)=0
 Loop over field entities in the problem.
 

Get pointers to multi-index database

virtual FieldEntityByUId::iterator MoFEM::CoreInterface::get_ent_field_by_name_begin (const std::string &field_name) const =0
 get begin iterator of field ents of given name (instead you can use IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)
 
virtual FieldEntityByUId::iterator MoFEM::CoreInterface::get_ent_field_by_name_end (const std::string &field_name) const =0
 get end iterator of field ents of given name (instead you can use IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)
 
virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_begin (const std::string &field_name) const =0
 get begin iterator of field dofs of given name (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)
 
virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_end (const std::string &field_name) const =0
 get begin iterator of field dofs of given name (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)
 
virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_and_ent_begin (const std::string &field_name, const EntityHandle ent) const =0
 get begin iterator of field dofs of given name and ent(instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,ENT,IT)
 
virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_and_ent_end (const std::string &field_name, const EntityHandle ent) const =0
 get end iterator of field dofs of given name and ent (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,ENT,IT)
 
virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_and_type_begin (const std::string &field_name, const EntityType type) const =0
 get begin iterator of field dofs of given name and ent type (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,TYPE,IT)
 
virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_and_type_end (const std::string &field_name, const EntityType type) const =0
 get end iterator of field dofs of given name and ent type(instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,TYPE,IT)
 
#define _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT)
 loop over all dofs from a moFEM field and particular field
 
#define _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT)
 
#define _IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_(MFIELD, NAME, TYPE, IT)
 loop over all dofs from a moFEM field and particular field
 
#define _IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_(MFIELD, NAME, ENT, IT)
 loop over all dofs from a moFEM field and particular field
 
#define _IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT)
 loop over all finite elements from a moFEM field and FE
 

Detailed Description

Data structure for adding and managing fields.

Macro Definition Documentation

◆ _IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_

#define _IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_ (   MFIELD,
  NAME,
  ENT,
  IT 
)

#include <src/interfaces/Interface.hpp>

Value:
DofEntityByUId::iterator IT = \
(MFIELD).get_dofs_by_name_and_ent_begin(NAME, ENT); \
IT != (MFIELD).get_dofs_by_name_and_ent_end(NAME, ENT); \
IT++
constexpr IntegrationType IT

loop over all dofs from a moFEM field and particular field

Examples
mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp.

Definition at line 2022 of file Interface.hpp.

2121 {
2122
2123using Interface = DeprecatedCoreInterface;
2124
2125} // namespace MoFEM
2126
2127#endif // __INTERFACE_HPP__
2128
2129/**
2130 * \defgroup mofem_field Fields
2131 * \brief Data structure for adding and managing fields
2132 *
2133 * \ingroup mofem
2134 ******************************************************************************/
2135
2136/**
2137 * \defgroup mofem_ref_ents Get entities and adjacencies
2138 * \brief Get adjacencies/entities for given BitRefLevel (mesh refinement)
2139 *
2140 * \ingroup mofem
2141 ******************************************************************************/
2142
2143/**
2144 * \defgroup mofem_fe Finite elements
2145 * \brief Adding and managing finite elements
2146 *
2147 * \ingroup mofem
2148 ******************************************************************************/
2149
2150/**
2151 * \defgroup mofem_problems Problems
2152 * \brief Adding and managing problems
2153 *
2154 * \ingroup mofem
2155 ******************************************************************************/
2156
2157/**
2158 * \defgroup mofem_loops Loops
2159 * \brief Manages complexities for integrating over finite elements and dofs.
2160 *
2161 * \ingroup mofem
2162 ******************************************************************************/
2163
2164/**
2165 * \defgroup mofem_access Pointers to multi-indices
2166 * \brief Get direct access to multi-indices in database
2167 *
2168 * \ingroup mofem
2169 ******************************************************************************/
DeprecatedCoreInterface Interface

◆ _IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_

#define _IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_ (   MFIELD,
  NAME,
  TYPE,
  IT 
)

#include <src/interfaces/Interface.hpp>

Value:
DofEntityByUId::iterator IT = \
(MFIELD).get_dofs_by_name_and_type_begin(NAME, TYPE); \
IT != (MFIELD).get_dofs_by_name_and_type_end(NAME, TYPE); \
IT++

loop over all dofs from a moFEM field and particular field

Definition at line 2071 of file Interface.hpp.

◆ _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_

#define _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_ (   MFIELD,
  NAME,
  IT 
)

#include <src/interfaces/Interface.hpp>

Value:
DofEntityByUId::iterator IT = (MFIELD).get_dofs_by_name_begin(NAME); \
IT != (MFIELD).get_dofs_by_name_end(NAME); \
IT++

loop over all dofs from a moFEM field and particular field

Definition at line 1981 of file Interface.hpp.

◆ _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_

#define _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_ (   MFIELD,
  NAME,
  IT 
)

#include <src/interfaces/Interface.hpp>

Value:
auto IT = (MFIELD).get_ent_field_by_name_begin(NAME); \
IT != (MFIELD).get_ent_field_by_name_end(NAME); \
IT++

loop over all dofs from a moFEM field and particular field

Examples
mofem/tools/mesh_smoothing.cpp.

Definition at line 1945 of file Interface.hpp.

◆ _IT_GET_FES_BY_NAME_FOR_LOOP_

#define _IT_GET_FES_BY_NAME_FOR_LOOP_ (   MFIELD,
  NAME,
  IT 
)

#include <src/interfaces/Interface.hpp>

Value:
auto IT = (MFIELD).get_fe_by_name_begin(NAME); \
IT != (MFIELD).get_fe_by_name_end(NAME); \
IT++

loop over all finite elements from a moFEM field and FE

Definition at line 2113 of file Interface.hpp.

Function Documentation

◆ add_ents_to_field_by_dim() [1/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::add_ents_to_field_by_dim ( const EntityHandle  meshset,
const int  dim,
const std::string &  name,
const bool  recursive = true,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Add entities to field meshset.

\not collective

The lower dimension entities are added depending on the space type

Parameters
meshset
dimdimension
namename of field
recursivetake entities recursively from embedded entities
verbverbosity level
Returns
error code

Implemented in MoFEM::CoreTmp< 0 >.

◆ add_ents_to_field_by_dim() [2/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::add_ents_to_field_by_dim ( const Range ents,
const int  dim,
const std::string &  name,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

◆ add_ents_to_field_by_type() [1/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::add_ents_to_field_by_type ( const EntityHandle  meshset,
const EntityType  type,
const std::string &  name,
const bool  recursive = true,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Add entities to field meshset.

Note
not collective

The lower dimension entities are added depending on the space type

Parameters
meshset
typeof entities
namename of field
recursivetake entities recursively from embedded entities
verbverbosity level
Returns
error code

Implemented in MoFEM::CoreTmp< 0 >.

◆ add_ents_to_field_by_type() [2/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::add_ents_to_field_by_type ( const Range ents,
const EntityType  type,
const std::string &  name,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Add entities to field meshset.

Note
not collective

The lower dimension entities are added depending on the space type

Parameters
entsrange of entities
typetype of entities
namename of field
verbverbosity level
Returns
error code

Implemented in MoFEM::CoreTmp< 0 >.

Examples
mofem/atom_tests/build_composite_problem.cpp, mofem/atom_tests/build_large_problem.cpp, mofem/atom_tests/continuity_check_on_contact_prism_side_ele.cpp, mofem/atom_tests/dm_build_partitioned_mesh.cpp, mofem/atom_tests/dm_create_subdm.cpp, mofem/atom_tests/dm_partitioned_no_field.cpp, mofem/atom_tests/field_blas.cpp, mofem/atom_tests/field_blas_axpy.cpp, mofem/atom_tests/forces_and_sources_testing_edge_element.cpp, mofem/atom_tests/forces_and_sources_testing_flat_prism_element.cpp, mofem/atom_tests/forces_and_sources_testing_users_base.cpp, mofem/atom_tests/mesh_insert_interface_atom.cpp, mofem/atom_tests/prism_elements_from_surface.cpp, mofem/atom_tests/prism_polynomial_approximation.cpp, mofem/atom_tests/quad_polynomial_approximation.cpp, mofem/tools/mesh_smoothing.cpp, mofem/tutorials/cor-0to1/src/UnsaturatedFlow.hpp, mofem/tutorials/cor-7/elasticity_mixed_formulation.cpp, mofem/tutorials/max-0/src/MagneticElement.hpp, mofem/users_modules/basic_finite_elements/elasticity/elasticity.cpp, mofem/users_modules/basic_finite_elements/nonlinear_elasticity/nonlinear_dynamics.cpp, mofem/users_modules/bone_remodelling/src/impl/Remodeling.cpp, mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp, and mofem/users_modules/minimal_surface_equation/minimal_surface_area.cpp.

◆ build_fields()

virtual MoFEMErrorCode MoFEM::CoreInterface::build_fields ( int  verb = DEFAULT_VERBOSITY)
pure virtual

#include <src/interfaces/Interface.hpp>

build fields

Parameters
verbVerbosity level (default: DEFAULT_VERBOSITY)
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

Examples
mofem/atom_tests/build_composite_problem.cpp, mofem/atom_tests/build_large_problem.cpp, mofem/atom_tests/build_problems.cpp, mofem/atom_tests/continuity_check_on_contact_prism_side_ele.cpp, mofem/atom_tests/continuity_check_on_skeleton_3d.cpp, mofem/atom_tests/dm_build_partitioned_mesh.cpp, mofem/atom_tests/dm_create_subdm.cpp, mofem/atom_tests/dm_partitioned_no_field.cpp, mofem/atom_tests/field_blas.cpp, mofem/atom_tests/field_blas_axpy.cpp, mofem/atom_tests/forces_and_sources_testing_edge_element.cpp, mofem/atom_tests/forces_and_sources_testing_flat_prism_element.cpp, mofem/atom_tests/forces_and_sources_testing_users_base.cpp, mofem/atom_tests/hcurl_divergence_operator_2d.cpp, mofem/atom_tests/mesh_insert_interface_atom.cpp, mofem/atom_tests/prism_elements_from_surface.cpp, mofem/atom_tests/prism_polynomial_approximation.cpp, mofem/atom_tests/quad_polynomial_approximation.cpp, mofem/atom_tests/remove_entities_from_problem.cpp, mofem/atom_tests/remove_entities_from_problem_not_partitioned.cpp, mofem/tools/field_to_vertices.cpp, mofem/tutorials/cor-0to1/src/UnsaturatedFlow.hpp, mofem/tutorials/cor-10/navier_stokes.cpp, mofem/tutorials/cor-7/elasticity_mixed_formulation.cpp, mofem/tutorials/max-0/src/MagneticElement.hpp, mofem/tutorials/max-1/lorentz_force.cpp, mofem/tutorials/mix-0/mixed_poisson.cpp, mofem/tutorials/vec-7/adjoint.cpp, mofem/users_modules/basic_finite_elements/elasticity/elasticity.cpp, mofem/users_modules/basic_finite_elements/nonlinear_elasticity/nonlinear_dynamics.cpp, mofem/users_modules/bone_remodelling/src/impl/Remodeling.cpp, mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp, and mofem/users_modules/minimal_surface_equation/minimal_surface_area.cpp.

◆ check_field()

virtual bool MoFEM::CoreInterface::check_field ( const std::string &  name) const
pure virtual

◆ clear_dofs_fields() [1/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::clear_dofs_fields ( const Range  ents,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Clear dofs by ents

Implemented in MoFEM::CoreTmp< 0 >.

◆ clear_dofs_fields() [2/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::clear_dofs_fields ( const std::string  name,
const Range  ents,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Clear dofs by field name and ents

Implemented in MoFEM::CoreTmp< 0 >.

◆ clear_dofs_fields_by_bit_ref()

virtual MoFEMErrorCode MoFEM::CoreInterface::clear_dofs_fields_by_bit_ref ( const BitRefLevel  bit,
const BitRefLevel  mask,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Clear dofs by bit level

Implemented in MoFEM::CoreTmp< 0 >.

◆ clear_ents_fields() [1/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::clear_ents_fields ( const Range  ents,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Clear entities by field name

Implemented in MoFEM::CoreTmp< 0 >.

◆ clear_ents_fields() [2/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::clear_ents_fields ( const std::string  name,
const Range  ents,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Clear entities by field name

Implemented in MoFEM::CoreTmp< 0 >.

◆ clear_ents_fields_by_bit_ref()

virtual MoFEMErrorCode MoFEM::CoreInterface::clear_ents_fields_by_bit_ref ( const BitRefLevel  bit,
const BitRefLevel  mask,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Clear ents by bit level

Implemented in MoFEM::CoreTmp< 0 >.

◆ clear_inactive_dofs()

virtual MoFEMErrorCode MoFEM::CoreInterface::clear_inactive_dofs ( int  verb = DEFAULT_VERBOSITY)
pure virtual

#include <src/interfaces/Interface.hpp>

Clear inactive dofs

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_dofs_by_name_and_ent_begin()

virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_and_ent_begin ( const std::string &  field_name,
const EntityHandle  ent 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get begin iterator of field dofs of given name and ent(instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,ENT,IT)

for(IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP(MFIELD,NAME,ENT,IT)) { ... }

Parameters
field_name

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_dofs_by_name_and_ent_end()

virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_and_ent_end ( const std::string &  field_name,
const EntityHandle  ent 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get end iterator of field dofs of given name and ent (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,ENT,IT)

for(IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP(MFIELD,NAME,ENT,IT)) { ... }

Parameters
field_nameName of the field
entEntity handle to get DOFs for
Returns
DofEntityByUId::iterator End iterator for field DOFs on entity

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_dofs_by_name_and_type_begin()

virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_and_type_begin ( const std::string &  field_name,
const EntityType  type 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get begin iterator of field dofs of given name and ent type (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,TYPE,IT)

for(IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP(MFIELD,NAME,TYPE,IT)) { ... }

Parameters
field_nameName of the field
typeEntity type to filter DOFs by
Returns
DofEntityByUId::iterator Begin iterator for field DOFs of specified type

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_dofs_by_name_and_type_end()

virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_and_type_end ( const std::string &  field_name,
const EntityType  type 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get end iterator of field dofs of given name and ent type(instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,TYPE,IT)

for(IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP(MFIELD,NAME,TYPE,IT)) { ... }

Parameters
field_nameName of the field
typeEntity type to filter DOFs by
Returns
DofEntityByUId::iterator End iterator for field DOFs of specified type

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_dofs_by_name_begin()

virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_begin ( const std::string &  field_name) const
pure virtual

#include <src/interfaces/Interface.hpp>

get begin iterator of field dofs of given name (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)

for(IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)) { ... }

Parameters
field_name

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_dofs_by_name_end()

virtual DofEntityByUId::iterator MoFEM::CoreInterface::get_dofs_by_name_end ( const std::string &  field_name) const
pure virtual

#include <src/interfaces/Interface.hpp>

get begin iterator of field dofs of given name (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)

for(IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)) { ... }

Parameters
field_name

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_ent_field_by_name_begin()

virtual FieldEntityByUId::iterator MoFEM::CoreInterface::get_ent_field_by_name_begin ( const std::string &  field_name) const
pure virtual

#include <src/interfaces/Interface.hpp>

get begin iterator of field ents of given name (instead you can use IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)

for(IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)) { ... }

Parameters
field_nameName of the field to get iterator for
Returns
FieldEntityByUId::iterator Begin iterator for field entities

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_ent_field_by_name_end()

virtual FieldEntityByUId::iterator MoFEM::CoreInterface::get_ent_field_by_name_end ( const std::string &  field_name) const
pure virtual

#include <src/interfaces/Interface.hpp>

get end iterator of field ents of given name (instead you can use IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)

for(IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT)) { ... }

Parameters
field_nameName of the field to get iterator for
Returns
FieldEntityByUId::iterator End iterator for field entities

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_field_entities_by_dimension()

virtual MoFEMErrorCode MoFEM::CoreInterface::get_field_entities_by_dimension ( const std::string  name,
int  dim,
Range ents 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get entities in the field by dimension

Parameters
nameField name
dimDimension of entities to retrieve
entsRange object to store the retrieved entities
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_field_entities_by_handle()

virtual MoFEMErrorCode MoFEM::CoreInterface::get_field_entities_by_handle ( const std::string  name,
Range ents 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get entities in the field by handle

Parameters
nameField name
entsRange object to store all entities in the field
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_field_entities_by_type()

virtual MoFEMErrorCode MoFEM::CoreInterface::get_field_entities_by_type ( const std::string  name,
EntityType  type,
Range ents 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get entities in the field by type

Parameters
nameField name
typeEntity type (MBVERTEX, MBEDGE, MBTRI, MBTET, etc.)
entsRange object to store the retrieved entities
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

Examples
mofem/users_modules/adolc-plasticity/adolc_plasticity.cpp.

◆ get_field_structure()

virtual const Field * MoFEM::CoreInterface::get_field_structure ( const std::string &  name,
enum MoFEMTypes  bh = MF_EXIST 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get field structure

If field is not found throw error if bh == MF_EXIST, or return nullptr if bh == MF_ZERO, i.e. otherwise

Parameters
nameField name to retrieve
bhControls behaviour when field is not found
Returns
const Field* Pointer to field structure, or nullptr if not found and bh==MF_ZERO

Implemented in MoFEM::CoreTmp< 0 >.

Examples
mofem/atom_tests/forces_and_sources_testing_users_base.cpp, and mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp.

◆ get_finite_element_entities_by_dimension()

virtual MoFEMErrorCode MoFEM::CoreInterface::get_finite_element_entities_by_dimension ( const std::string  name,
int  dim,
Range ents 
) const
pure virtual

◆ get_finite_element_entities_by_handle()

virtual MoFEMErrorCode MoFEM::CoreInterface::get_finite_element_entities_by_handle ( const std::string  name,
Range ents 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get entities in the finite element by handle

Parameters
namefinite element name
entsents
Returns
error code

Implemented in MoFEM::CoreTmp< 0 >.

◆ get_finite_element_entities_by_type()

virtual MoFEMErrorCode MoFEM::CoreInterface::get_finite_element_entities_by_type ( const std::string  name,
EntityType  type,
Range ents 
) const
pure virtual

#include <src/interfaces/Interface.hpp>

get entities in the finite element by type

Parameters
namefinite element name
typeentity type
entsents
Returns
error code

Implemented in MoFEM::CoreTmp< 0 >.

◆ list_dofs_by_field_name()

virtual MoFEMErrorCode MoFEM::CoreInterface::list_dofs_by_field_name ( const std::string &  name) const
pure virtual

#include <src/interfaces/Interface.hpp>

list dofs

Implemented in MoFEM::CoreTmp< 0 >.

◆ list_fields()

virtual MoFEMErrorCode MoFEM::CoreInterface::list_fields ( ) const
pure virtual

#include <src/interfaces/Interface.hpp>

list entities in the field

Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

◆ loop_dofs()

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

#include <src/interfaces/Interface.hpp>

Make a loop over dofs.

Parameters
field_nameName of the field containing DOFs to loop over
methodUser-defined method to execute on each DOF
verbVerbosity level (default: DEFAULT_VERBOSITY)
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

◆ loop_entities() [1/4]

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

#include <src/interfaces/Interface.hpp>

Loop over field entities in the problem.

Parameters
problem_ptrPointer to problem structure
field_nameName of the field containing entities to loop over
rcRow/column data specification
methodUser-defined method to execute on each entity
lower_rankLower processor rank range (inclusive)
upper_rankUpper processor rank range (inclusive)
verbVerbosity level (default: DEFAULT_VERBOSITY)
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

◆ loop_entities() [2/4]

virtual MoFEMErrorCode MoFEM::CoreInterface::loop_entities ( const std::string  field_name,
EntityMethod method,
Range const *const  ents = nullptr,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Loop over field entities.

Parameters
field_nameName of the field containing entities to loop over
methodUser-defined method to execute on each entity
entsIf provided, loop only over subset of entities in the field (default: nullptr for all entities)
verbVerbosity level (default: DEFAULT_VERBOSITY)
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

Examples
mofem/atom_tests/field_blas.cpp, mofem/atom_tests/field_blas_axpy.cpp, and mofem/atom_tests/loop_entities.cpp.

◆ loop_entities() [3/4]

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

#include <src/interfaces/Interface.hpp>

Loop over field entities in the problem.

Parameters
problem_name
field_name
rc
method
lower_rank
upper_rank
verb
Returns
MoFEMErrorCode

Implemented in MoFEM::CoreTmp< 0 >.

◆ loop_entities() [4/4]

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

#include <src/interfaces/Interface.hpp>

Loop over field entities in the problem.

Parameters
problem_name
field_name
rc
method
verb
Returns
MoFEMErrorCode

Implemented in MoFEM::CoreTmp< 0 >.

◆ remove_ents_from_field() [1/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field ( const Range  ents,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

remove entities from all fields

Note
not collective
Parameters
entsRange of entities to remove from all fields
verbVerbosity level (default: DEFAULT_VERBOSITY)
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

◆ remove_ents_from_field() [2/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field ( const std::string  name,
const EntityHandle  meshset,
const EntityType  type,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

remove entities from field

Note
not collective
Parameters
nameName of the field
meshsetMeshset containing entities to remove
typeType of entities to remove
verbVerbosity level (default: DEFAULT_VERBOSITY)
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

Examples
mofem/tools/mesh_smoothing.cpp.

◆ remove_ents_from_field() [3/3]

virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field ( const std::string  name,
const Range  ents,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

remove entities from field

Note
not collective
Parameters
nameName of the field
entsRange of entities to remove
verbVerbosity level (default: DEFAULT_VERBOSITY)
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

◆ remove_ents_from_field_by_bit_ref()

virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field_by_bit_ref ( const BitRefLevel  bit,
const BitRefLevel  mask,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

remove entities from field

Note
not collective
Parameters
bitBit level to select entities
maskMask for bit level selection
verbVerbosity level (default: DEFAULT_VERBOSITY)
Returns
MoFEMErrorCode Error code indicating success or failure

Implemented in MoFEM::CoreTmp< 0 >.

◆ set_field_order() [1/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::set_field_order ( const EntityHandle  meshset,
const EntityType  type,
const std::string &  name,
const ApproximationOrder  order,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Set order approximation of the entities in the field.

Note
not collective
Parameters
meshsetcontaining set of the entities (use 0 for all the entities in the meshset)
typeselected type of the entities f.e. MBTET, MBTRI, MBEDGE, MBVERTEX, see moab documentation
orderapproximation order

Implemented in MoFEM::CoreTmp< 0 >.

Examples
mofem/atom_tests/build_composite_problem.cpp, mofem/atom_tests/build_large_problem.cpp, mofem/atom_tests/build_problems.cpp, mofem/atom_tests/continuity_check_on_contact_prism_side_ele.cpp, mofem/atom_tests/continuity_check_on_skeleton_3d.cpp, mofem/atom_tests/dm_build_partitioned_mesh.cpp, mofem/atom_tests/dm_create_subdm.cpp, mofem/atom_tests/dm_partitioned_no_field.cpp, mofem/atom_tests/field_blas.cpp, mofem/atom_tests/field_blas_axpy.cpp, mofem/atom_tests/forces_and_sources_testing_edge_element.cpp, mofem/atom_tests/forces_and_sources_testing_flat_prism_element.cpp, mofem/atom_tests/forces_and_sources_testing_users_base.cpp, mofem/atom_tests/hcurl_divergence_operator_2d.cpp, mofem/atom_tests/mesh_insert_interface_atom.cpp, mofem/atom_tests/prism_elements_from_surface.cpp, mofem/atom_tests/prism_polynomial_approximation.cpp, mofem/atom_tests/quad_polynomial_approximation.cpp, mofem/atom_tests/remove_entities_from_problem.cpp, mofem/atom_tests/remove_entities_from_problem_not_partitioned.cpp, mofem/tools/mesh_smoothing.cpp, mofem/tutorials/cor-0to1/src/UnsaturatedFlow.hpp, mofem/tutorials/cor-10/navier_stokes.cpp, mofem/tutorials/cor-7/elasticity_mixed_formulation.cpp, mofem/tutorials/max-0/src/MagneticElement.hpp, mofem/tutorials/mix-0/mixed_poisson.cpp, mofem/tutorials/vec-7/adjoint.cpp, mofem/users_modules/basic_finite_elements/elasticity/elasticity.cpp, mofem/users_modules/basic_finite_elements/nonlinear_elasticity/nonlinear_dynamics.cpp, mofem/users_modules/bone_remodelling/src/impl/Remodeling.cpp, mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp, and mofem/users_modules/minimal_surface_equation/minimal_surface_area.cpp.

◆ set_field_order() [2/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::set_field_order ( const Range ents,
const std::string &  name,
const ApproximationOrder  order,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Set order approximation of the entities in the field.

Note
not collective
Parameters
entities
typeselected type of the entities f.e. MBTET, MBTRI, MBEDGE, MBVERTEX, see moab documentation
orderapproximation order

Implemented in MoFEM::CoreTmp< 0 >.

◆ set_field_order_by_entity_type_and_bit_ref()

virtual MoFEMErrorCode MoFEM::CoreInterface::set_field_order_by_entity_type_and_bit_ref ( const BitRefLevel bit,
const BitRefLevel mask,
const EntityType  type,
const std::string &  name,
const ApproximationOrder  order,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

#include <src/interfaces/Interface.hpp>

Set order approximation of the entities in the field.

Note
not collective
Parameters
bitrefinement level
maskbit mask
typeselected type of the entities f.e. MBTET, MBTRI, MBEDGE, MBVERTEX, see moab documentation
orderapproximation order

Implemented in MoFEM::CoreTmp< 0 >.

◆ synchronise_field_entities()

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::synchronise_field_entities ( const std::string &  name,
int  verb = DEFAULT_VERBOSITY 
)

#include <src/interfaces/DeprecatedCoreInterface.hpp>

synchronize entity range on processors (collective)

collective - need to be run on all processors in communicator

Parameters
namefield
verboselevel
Deprecated:
Use CommInterface
Examples
mofem/users_modules/bone_remodelling/src/impl/Remodeling.cpp.

Definition at line 47 of file DeprecatedCoreInterface.cpp.

48 {
49 return getInterface<CommInterface>()->synchroniseFieldEntities(name, verb);
50}

◆ synchroniseFieldEntities()

MoFEMErrorCode MoFEM::CommInterface::synchroniseFieldEntities ( const std::string  name,
int  verb = DEFAULT_VERBOSITY 
)

#include <src/interfaces/CommInterface.hpp>

synchronize entity range on processors (collective)

Note
collective - need to be run on all processors in communicator
Parameters
namefield
verboselevel

Definition at line 237 of file CommInterface.cpp.

238 {
239 MoFEM::Interface &m_field = cOre;
241 EntityHandle idm = m_field.get_field_meshset(name);
242 Range ents;
243 CHKERR m_field.get_moab().get_entities_by_handle(idm, ents, false);
244 CHKERR synchroniseEntities(ents, nullptr, verb);
245 CHKERR m_field.get_moab().add_entities(idm, ents);
247}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
MoFEMErrorCode synchroniseEntities(Range &ent, std::map< int, Range > *received_ents, int verb=DEFAULT_VERBOSITY)
synchronize entity range on processors (collective)
virtual moab::Interface & get_moab()=0
virtual EntityHandle get_field_meshset(const std::string name) const =0
get field meshset
Deprecated interface functions.