v0.8.16
Fields

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

Collaboration diagram for Fields:

Updating entities (DO NOT USE THIS USE BitRefManager interface)

DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::update_field_meshset_by_entities_children (const BitRefLevel &child_bit, int verb=-1)
 update fields meshesets by child entities More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::update_field_meshset_by_entities_children (const std::string name, const BitRefLevel &child_bit, int verb=-1)
 update field mesheset by child entities More...
 

Build problems (DEPRECATED SHOULD NOT USE THIS)

DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::partition_ghost_dofs (const std::string &name, int verb=-1)
 determine ghost nodes More...
 

Clear and remove

DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_VERTICEs (const Range &nodes, const std::string &name, int verb=-1)
 set field entities on verticesThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_VERTICEs (const EntityHandle meshset, const std::string &name, int verb=-1)
 set field entities on verticesThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_EDGEs (const Range &edges, const std::string &name, int verb=-1)
 set field entities form adjacencies of edgesThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_EDGEs (const EntityHandle meshset, const std::string &name, int verb=-1)
 set field entities form adjacencies of edgesThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_TRIs (const EntityHandle meshset, const std::string &name, int verb=-1)
 set field entities form adjacencies of trianglesThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_TRIs (const Range &tris, const std::string &name, int verb=-1)
 set field entities form adjacencies of trianglesThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_TETs (const EntityHandle meshset, const std::string &name, int verb=-1)
 set field entities from adjacencies of tetrahedronThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_TETs (const Range &tets, const std::string &name, int verb=-1)
 set field entities from adjacencies of tetrahedronThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_QUADs (const Range &quads, const std::string &name, int verb=-1)
 set field entities from adjacencies of quadsThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_QUADs (EntityHandle meshset, const std::string &name, int verb=-1)
 set field entities from adjacencies of quadsThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_PRISMs (const Range &prisms, const std::string &name, int verb=-1)
 set field entities from adjacencies of prismsThe lower dimension entities are added depending on the space type More...
 
DEPRECATED MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_PRISMs (EntityHandle meshset, const std::string &name, int verb=-1)
 set field entities from adjacencies of prismsThe lower dimension entities are added depending on the space type More...
 

Synchronize

virtual MoFEMErrorCode MoFEM::CoreInterface::synchronise_field_entities (const BitFieldId id, int verb=DEFAULT_VERBOSITY)=0
 
virtual MoFEMErrorCode MoFEM::CoreInterface::synchronise_field_entities (const std::string &name, int verb=DEFAULT_VERBOSITY)=0
 

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. More...
 
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. More...
 
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 meshsetcollective. More...
 
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. More...
 
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 More...
 
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 More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field (const std::string &name, const Range &ents, int verb=DEFAULT_VERBOSITY)=0
 remove entities from field More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::remove_ents_from_field (const Range &ents, int verb=DEFAULT_VERBOSITY)=0
 remove entities from all fields More...
 
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. More...
 
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. More...
 
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. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::list_fields () const =0
 list entities in the field More...
 
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 More...
 
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 More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::get_field_entities_by_handle (const std::string name, Range &ents) const =0
 get entities in the field by handle More...
 
virtual bool MoFEM::CoreInterface::check_field (const std::string &name) const =0
 check if field is in database More...
 
virtual const FieldMoFEM::CoreInterface::get_field_structure (const std::string &name)=0
 get field structure More...
 

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 More...
 
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 More...
 
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 More...
 

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. More...
 
virtual MoFEMErrorCode MoFEM::CoreInterface::loop_entities (const std::string &field_name, EntityMethod &method, int verb=DEFAULT_VERBOSITY)=0
 Make a loop over entities. More...
 

Get pointers to multi-index database

virtual FieldEntityByFieldName::iterator MoFEM::CoreInterface::get_ent_field_by_name_begin (const std::string &field_name) const =0
 get begin iterator of filed ents of given name (instead you can use IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,IT) More...
 
virtual FieldEntityByFieldName::iterator MoFEM::CoreInterface::get_ent_field_by_name_end (const std::string &field_name) const =0
 get begin iterator of filed dofs 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)) { ... } More...
 
virtual DofEntityByFieldName::iterator MoFEM::CoreInterface::get_dofs_by_name_begin (const std::string &field_name) const =0
 get begin iterator of filed 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)) { ... } More...
 
virtual DofEntityByFieldName::iterator MoFEM::CoreInterface::get_dofs_by_name_end (const std::string &field_name) const =0
 get begin iterator of filed 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)) { ... } More...
 
virtual DofEntityByNameAndEnt::iterator MoFEM::CoreInterface::get_dofs_by_name_and_ent_begin (const std::string &field_name, const EntityHandle ent) const =0
 get begin iterator of filed dofs of given name and ent(instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,ENT,IT) More...
 
virtual DofEntityByNameAndEnt::iterator MoFEM::CoreInterface::get_dofs_by_name_and_ent_end (const std::string &field_name, const EntityHandle ent) const =0
 get begin iterator of filed 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)) { ... } More...
 
template<typename DIT >
MoFEMErrorCode MoFEM::CoreInterface::get_field_dof_data (const std::string &name, const EntityHandle *ent, const int num_ents, DIT dit, int *count=NULL)
 get field data from entity and fieldthis function is not recommended to be used in finite element implementation More...
 
template<typename DIT >
MoFEMErrorCode MoFEM::CoreInterface::get_field_dof_data (const std::string &name, const Range &ents, DIT dit, int *count=NULL)
 get field data from entity and fieldthis function is not recommended to be used in finite element implementation More...
 
virtual DofEntityByNameAndType::iterator MoFEM::CoreInterface::get_dofs_by_name_and_type_begin (const std::string &field_name, const EntityType type) const =0
 get begin iterator of filed dofs of given name and ent type (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,TYPE,IT) More...
 
virtual DofEntityByNameAndType::iterator MoFEM::CoreInterface::get_dofs_by_name_and_type_end (const std::string &field_name, const EntityType type) const =0
 get begin iterator of filed dofs of given name end ent type(instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP(MFIELD,NAME,TYPE,IT) More...
 
#define _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT)
 loop over all dofs from a moFEM field and particular field More...
 
#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 More...
 
#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 More...
 
#define _IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT)
 loop over all finite elements from a moFEM field and FE More...
 

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 
)
Value:
DofEntityByNameAndEnt::iterator IT = \
(MFIELD).get_dofs_by_name_and_ent_begin(NAME, ENT); \
IT != (MFIELD).get_dofs_by_name_and_ent_end(NAME, ENT); \
IT++

loop over all dofs from a moFEM field and particular field

Definition at line 1756 of file Interface.hpp.

◆ _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 
)
Value:
DofEntityByNameAndType::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 1850 of file Interface.hpp.

◆ _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_

#define _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_ (   MFIELD,
  NAME,
  IT 
)
Value:
DofEntityByFieldName::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 1717 of file Interface.hpp.

◆ _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_

#define _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_ (   MFIELD,
  NAME,
  IT 
)
Value:
FieldEntityByFieldName::iterator 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:
mesh_smoothing.cpp.

Definition at line 1680 of file Interface.hpp.

◆ _IT_GET_FES_BY_NAME_FOR_LOOP_

#define _IT_GET_FES_BY_NAME_FOR_LOOP_ (   MFIELD,
  NAME,
  IT 
)
Value:
EntFiniteElementByName::iterator 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 1889 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 Range &  ents,
const int  dim,
const std::string &  name,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

Add entities to field meshset.

Note
not collective

The lower dimension entities are added depending on the space type

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

Implemented in MoFEM::Core.

◆ add_ents_to_field_by_dim() [2/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

Add entities to field meshsetcollective.

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::Core.

◆ add_ents_to_field_by_EDGEs() [1/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_EDGEs ( const Range &  edges,
const std::string &  name,
int  verb = -1 
)

set field entities form adjacencies of edgesThe lower dimension entities are added depending on the space type

Parameters
rangecontains set edges
nameof the field

Definition at line 499 of file DeprecatedCoreInterface.cpp.

500  {
501  return add_ents_to_field_by_type(edges, MBEDGE, name, verb);
502 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_EDGEs() [2/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_EDGEs ( const EntityHandle  meshset,
const std::string &  name,
int  verb = -1 
)

set field entities form adjacencies of edgesThe lower dimension entities are added depending on the space type

Parameters
meshsetcontains set edges
nameof the field

Definition at line 503 of file DeprecatedCoreInterface.cpp.

504  {
505  return add_ents_to_field_by_type(meshset, MBEDGE, name, true, verb);
506 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_PRISMs() [1/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_PRISMs ( const Range &  prisms,
const std::string &  name,
int  verb = -1 
)

set field entities from adjacencies of prismsThe lower dimension entities are added depending on the space type

Deprecated:
use add_ents_to_field_by_type
Parameters
prismsrange contains set prisms
nameof the field

Definition at line 539 of file DeprecatedCoreInterface.cpp.

540  {
541  return add_ents_to_field_by_type(prisms, MBPRISM, name, verb);
542 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_PRISMs() [2/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_PRISMs ( EntityHandle  meshset,
const std::string &  name,
int  verb = -1 
)

set field entities from adjacencies of prismsThe lower dimension entities are added depending on the space type

Deprecated:
use add_ents_to_field_by_type
Parameters
meshsetcontains set prisms
nameof the field

Definition at line 543 of file DeprecatedCoreInterface.cpp.

544  {
545  return add_ents_to_field_by_type(meshset, MBPRISM, name, true, verb);
546 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_QUADs() [1/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_QUADs ( const Range &  quads,
const std::string &  name,
int  verb = -1 
)

set field entities from adjacencies of quadsThe lower dimension entities are added depending on the space type

Deprecated:
use add_ents_to_field_by_type
Parameters
quadsrange contains set quads
nameof the field

Definition at line 531 of file DeprecatedCoreInterface.cpp.

532  {
533  return add_ents_to_field_by_type(quads, MBQUAD, name, verb);
534 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_QUADs() [2/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_QUADs ( EntityHandle  meshset,
const std::string &  name,
int  verb = -1 
)

set field entities from adjacencies of quadsThe lower dimension entities are added depending on the space type

Deprecated:
use add_ents_to_field_by_type
Parameters
meshsetcontains set quads
nameof the field

Definition at line 535 of file DeprecatedCoreInterface.cpp.

536  {
537  return add_ents_to_field_by_type(meshset, MBQUAD, name, true, verb);
538 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_TETs() [1/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_TETs ( const EntityHandle  meshset,
const std::string &  name,
int  verb = -1 
)

set field entities from adjacencies of tetrahedronThe lower dimension entities are added depending on the space type

Parameters
meshsetcontains set tetrahedron
nameof the field

Definition at line 527 of file DeprecatedCoreInterface.cpp.

528  {
529  return add_ents_to_field_by_type(meshset, MBTET, name, true, verb);
530 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_TETs() [2/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_TETs ( const Range &  tets,
const std::string &  name,
int  verb = -1 
)

set field entities from adjacencies of tetrahedronThe lower dimension entities are added depending on the space type

Parameters
rangecontains set tetrahedron
nameof the field

Definition at line 523 of file DeprecatedCoreInterface.cpp.

524  {
525  return add_ents_to_field_by_type(tets, MBTET, name, verb);
526 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_TRIs() [1/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_TRIs ( const EntityHandle  meshset,
const std::string &  name,
int  verb = -1 
)

set field entities form adjacencies of trianglesThe lower dimension entities are added depending on the space type

Parameters
meshsetcontains set triangles
nameof the field

Definition at line 507 of file DeprecatedCoreInterface.cpp.

508  {
509  return add_ents_to_field_by_type(meshset, MBTRI, name, true, verb);
510 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_TRIs() [2/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_TRIs ( const Range &  tris,
const std::string &  name,
int  verb = -1 
)

set field entities form adjacencies of trianglesThe lower dimension entities are added depending on the space type

Parameters
rangetriangles
nameof the field

Definition at line 511 of file DeprecatedCoreInterface.cpp.

512  {
513  return add_ents_to_field_by_type(tris, MBTRI, name, verb);
514 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_type() [1/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

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::Core.

Examples:
cell_forces.cpp, elasticity.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_users_base.cpp, MagneticElement.hpp, mesh_smoothing.cpp, minimal_surface_area.cpp, and UnsaturatedFlow.hpp.

◆ add_ents_to_field_by_type() [2/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

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::Core.

◆ add_ents_to_field_by_VERTICEs() [1/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_VERTICEs ( const Range &  nodes,
const std::string &  name,
int  verb = -1 
)

set field entities on verticesThe lower dimension entities are added depending on the space type

Parameters
nodescontains set vertices
nameof the field

Definition at line 515 of file DeprecatedCoreInterface.cpp.

516  {
517  return add_ents_to_field_by_type(nodes, MBVERTEX, name, verb);
518 }
virtual MoFEMErrorCode 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.

◆ add_ents_to_field_by_VERTICEs() [2/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::add_ents_to_field_by_VERTICEs ( const EntityHandle  meshset,
const std::string &  name,
int  verb = -1 
)

set field entities on verticesThe lower dimension entities are added depending on the space type

Parameters
meshsetcontains set vertices
nameof the field

Definition at line 519 of file DeprecatedCoreInterface.cpp.

520  {
521  return add_ents_to_field_by_type(meshset, MBVERTEX, name, true, verb);
522 }
virtual MoFEMErrorCode 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.

◆ build_fields()

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

◆ check_field()

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

check if field is in database

Parameters
namefield name
Returns
true if field exist

Implemented in MoFEM::Core.

Examples:
elasticity.cpp, and HookeElement.cpp.

◆ clear_dofs_fields() [1/2]

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

Clear dofs by ents

Implemented in MoFEM::Core.

◆ 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

Clear dofs by field name and ents

Implemented in MoFEM::Core.

◆ 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

Clear dofs by bit level

Implemented in MoFEM::Core.

◆ clear_ents_fields() [1/2]

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

Clear entities by field name

Implemented in MoFEM::Core.

◆ 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

Clear entities by field name

Implemented in MoFEM::Core.

◆ 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

Clear ents by bit level

Implemented in MoFEM::Core.

◆ clear_inactive_dofs()

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

Clear inactive dofs

Implemented in MoFEM::Core.

◆ get_dofs_by_name_and_ent_begin()

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

get begin iterator of filed 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::Core.

◆ get_dofs_by_name_and_ent_end()

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

get begin iterator of filed 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::Core.

◆ get_dofs_by_name_and_type_begin()

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

get begin iterator of filed 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_name

Implemented in MoFEM::Core.

◆ get_dofs_by_name_and_type_end()

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

get begin iterator of filed dofs of given name end 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_name

Implemented in MoFEM::Core.

◆ get_dofs_by_name_begin()

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

get begin iterator of filed 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::Core.

◆ get_dofs_by_name_end()

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

get begin iterator of filed 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::Core.

◆ get_ent_field_by_name_begin()

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

get begin iterator of filed 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_name

Implemented in MoFEM::Core.

◆ get_ent_field_by_name_end()

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

get begin iterator of filed dofs 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_name

Implemented in MoFEM::Core.

◆ get_field_dof_data() [1/2]

template<typename DIT >
MoFEMErrorCode MoFEM::CoreInterface::get_field_dof_data ( const std::string &  name,
const EntityHandle ent,
const int  num_ents,
DIT  dit,
int count = NULL 
)

get field data from entity and fieldthis function is not recommended to be used in finite element implementation

Definition at line 1771 of file Interface.hpp.

1773  {
1775  if (count != NULL)
1776  *count = 0;
1777  for (int nn = 0; nn < num_ents; nn++) {
1778  for (_IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_((*this), name, ent[nn],
1779  it)) {
1780  *(dit++) = (*it)->getFieldData();
1781  if (count != NULL)
1782  (*count)++;
1783  }
1784  }
1786  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
#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
Definition: Interface.hpp:1756

◆ get_field_dof_data() [2/2]

template<typename DIT >
MoFEMErrorCode MoFEM::CoreInterface::get_field_dof_data ( const std::string &  name,
const Range &  ents,
DIT  dit,
int count = NULL 
)

get field data from entity and fieldthis function is not recommended to be used in finite element implementation

Definition at line 1797 of file Interface.hpp.

1798  {
1800  if (count != NULL)
1801  *count = 0;
1802  for (Range::const_iterator eit = ents.begin(); eit != ents.end(); eit++) {
1803  for (_IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_((*this), name, *eit,
1804  it)) {
1805  *(dit++) = (*it)->getFieldData();
1806  if (count != NULL)
1807  (*count)++;
1808  }
1809  }
1811  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
#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
Definition: Interface.hpp:1756

◆ 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

get entities in the field by dimension

Parameters
namefield name
dimdim
entsents
Returns
error code

Implemented in MoFEM::Core.

◆ get_field_entities_by_handle()

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

get entities in the field by handle

Parameters
namefield name
entsents
Returns
error code

Implemented in MoFEM::Core.

◆ 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

get entities in the field by type

Parameters
namefield name
typeentity type
entsents
Returns
error code

Implemented in MoFEM::Core.

◆ get_field_structure()

virtual const Field* MoFEM::CoreInterface::get_field_structure ( const std::string &  name)
pure virtual

get field structure

Parameters
namefield name
Returns
const Field*

Implemented in MoFEM::Core.

Examples:
forces_and_sources_testing_users_base.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 entities in the finite element by dimension

Parameters
namefinite element name
dimdim
entsents
Returns
error code

Implemented in MoFEM::Core.

Examples:
testing_jacobian_of_hook_element.cpp.

◆ 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

get entities in the finite element by handle

Parameters
namefinite element name
entsents
Returns
error code

Implemented in MoFEM::Core.

◆ 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

get entities in the finite element by type

Parameters
namefinite element name
typeentity type
entsents
Returns
error code

Implemented in MoFEM::Core.

◆ list_dofs_by_field_name()

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

list dofs

Implemented in MoFEM::Core.

◆ list_fields()

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

list entities in the field

Implemented in MoFEM::Core.

◆ loop_dofs()

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

Make a loop over dofs.

Implemented in MoFEM::Core.

◆ loop_entities()

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

Make a loop over entities.

Implemented in MoFEM::Core.

◆ partition_ghost_dofs()

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::partition_ghost_dofs ( const std::string &  name,
int  verb = -1 
)

determine ghost nodes

Deprecated:
Use ProblemsManager to build and partition problems
Parameters
nameproblem name

Definition at line 461 of file DeprecatedCoreInterface.cpp.

462  {
463  return getInterface<ProblemsManager>()->partitionGhostDofs(name, verb);
464 }

◆ remove_ents_from_field() [1/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

remove entities from field

Note
not collective

Implemented in MoFEM::Core.

Examples:
mesh_smoothing.cpp.

◆ remove_ents_from_field() [2/3]

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

remove entities from field

Note
not collective

Implemented in MoFEM::Core.

◆ remove_ents_from_field() [3/3]

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

remove entities from all fields

Note
not collective

Implemented in MoFEM::Core.

◆ 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

remove entities from field

Note
not collective

Implemented in MoFEM::Core.

◆ 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

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::Core.

Examples:
cell_forces.cpp, elasticity.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_users_base.cpp, MagneticElement.hpp, mesh_smoothing.cpp, minimal_surface_area.cpp, and UnsaturatedFlow.hpp.

◆ 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

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::Core.

◆ 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

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::Core.

◆ synchronise_field_entities() [1/2]

virtual MoFEMErrorCode MoFEM::CoreInterface::synchronise_field_entities ( const BitFieldId  id,
int  verb = DEFAULT_VERBOSITY 
)
pure virtual

synchronize entity range on processors (collective)

collective - need tu be run on all processors in communicator

Parameters
idfield
verboselevel

Implemented in MoFEM::Core.

Examples:
cell_forces.cpp, and mesh_smoothing.cpp.

◆ synchronise_field_entities() [2/2]

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

synchronize entity range on processors (collective)

collective - need tu be run on all processors in communicator

Parameters
namefield
verboselevel

Implemented in MoFEM::Core.

◆ update_field_meshset_by_entities_children() [1/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::update_field_meshset_by_entities_children ( const BitRefLevel child_bit,
int  verb = -1 
)

update fields meshesets by child entities

Deprecated:
do not us this use BitRefManager interface
Todo:
Should be outsourced to separate interface, i.e. BitLevelManage

Definition at line 277 of file DeprecatedCoreInterface.cpp.

278  {
279  return getInterface<BitRefManager>()->updateFieldMeshsetByEntitiesChildren(
280  child_bit, verb);
281 }

◆ update_field_meshset_by_entities_children() [2/2]

MoFEMErrorCode MoFEM::DeprecatedCoreInterface::update_field_meshset_by_entities_children ( const std::string  name,
const BitRefLevel child_bit,
int  verb = -1 
)

update field mesheset by child entities

Deprecated:
do not us this use BitRefManager interface

Definition at line 284 of file DeprecatedCoreInterface.cpp.

285  {
286  return getInterface<BitRefManager>()->updateFieldMeshsetByEntitiesChildren(
287  name, child_bit, verb);
288 }