v0.14.0
Public Member Functions | Protected Attributes | List of all members
MoFEM::ParentFiniteElementAdjacencyFunctionSkeleton< DIM > Struct Template Reference

Create adjacency to parent skeleton elements. More...

#include <src/finite_elements/MeshProjectionDataOperators.hpp>

Inheritance diagram for MoFEM::ParentFiniteElementAdjacencyFunctionSkeleton< DIM >:
[legend]
Collaboration diagram for MoFEM::ParentFiniteElementAdjacencyFunctionSkeleton< DIM >:
[legend]

Public Member Functions

 ParentFiniteElementAdjacencyFunctionSkeleton (BitRefLevel bit_parent, BitRefLevel bit_parent_mask, BitRefLevel bit_ent, BitRefLevel bit_ent_mask)
 
MoFEMErrorCode operator() (moab::Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
 Function setting adjacencies to DOFs of parent element. More...
 
- Public Member Functions inherited from MoFEM::ParentFiniteElementAdjacencyFunction< DIM >
 ParentFiniteElementAdjacencyFunction (BitRefLevel bit_parent, BitRefLevel bit_parent_mask, BitRefLevel bit_ent, BitRefLevel bit_ent_mask)
 
MoFEMErrorCode operator() (moab::Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
 Function setting adjacencies to DOFs of parent element. More...
 

Protected Attributes

std::vector< EntityHandlebrideAdjacencyEdge
 
- Protected Attributes inherited from MoFEM::ParentFiniteElementAdjacencyFunction< DIM >
BitRefLevel bitParent
 
BitRefLevel bitParentMask
 
BitRefLevel bitEnt
 
BitRefLevel bitEntMask
 
std::vector< EntityHandleadjTmp
 

Additional Inherited Members

- Protected Member Functions inherited from MoFEM::ParentFiniteElementAdjacencyFunction< DIM >
MoFEMErrorCode getParent (EntityHandle fe, std::vector< EntityHandle > &parents, moab::Interface &moab, Tag th_parent_handle, Tag th_bit_level)
 
MoFEMErrorCode getParentsAdjacencies (const Field &field, moab::Interface &moab, std::vector< EntityHandle > &parents, std::vector< EntityHandle > &adjacency)
 
MoFEMErrorCode getDefaultAdjacencies (moab::Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
 

Detailed Description

template<int DIM>
struct MoFEM::ParentFiniteElementAdjacencyFunctionSkeleton< DIM >

Create adjacency to parent skeleton elements.

That class is used during entity finite element construction.

Template Parameters
DIMdimension of parent element

Definition at line 313 of file MeshProjectionDataOperators.hpp.

Constructor & Destructor Documentation

◆ ParentFiniteElementAdjacencyFunctionSkeleton()

template<int DIM>
MoFEM::ParentFiniteElementAdjacencyFunctionSkeleton< DIM >::ParentFiniteElementAdjacencyFunctionSkeleton ( BitRefLevel  bit_parent,
BitRefLevel  bit_parent_mask,
BitRefLevel  bit_ent,
BitRefLevel  bit_ent_mask 
)
inline

Definition at line 316 of file MeshProjectionDataOperators.hpp.

320  : ParentFiniteElementAdjacencyFunction<DIM>(bit_parent, bit_parent_mask,
321  bit_ent, bit_ent_mask) {}

Member Function Documentation

◆ operator()()

template<int DIM>
MoFEMErrorCode MoFEM::ParentFiniteElementAdjacencyFunctionSkeleton< DIM >::operator() ( moab::Interface &  moab,
const Field field,
const EntFiniteElement fe,
std::vector< EntityHandle > &  adjacency 
)
inline

Function setting adjacencies to DOFs of parent element.

Note
elements form child, see dofs from parent, so DOFs located on adjacencies of parent entity has adjacent to dofs of child.
Template Parameters
DIMdimension of the element entity
Parameters
moab
field
fe
adjacency
Returns
MoFEMErrorCode

Definition at line 336 of file MeshProjectionDataOperators.hpp.

338  {
340 
341  adjacency.clear();
342  CHKERR this->getDefaultAdjacencies(moab, field, fe, adjacency);
343 
344  if (field.getSpace() != NOFIELD) {
345 
346  const auto fe_ent = fe.getEnt();
347  brideAdjacencyEdge.clear();
348  CHKERR moab.get_adjacencies(&fe_ent, 1, DIM + 1, false,
350 
351  std::vector<EntityHandle> parents;
352 
353  if (this->bitParent.any()) {
354  auto basic_entity_data_ptr = fe.getBasicDataPtr();
355  auto th_parent_handle = basic_entity_data_ptr->th_RefParentHandle;
356  auto th_bit_level = basic_entity_data_ptr->th_RefBitLevel;
357  parents.reserve(BITREFLEVEL_SIZE);
358  for (auto bridge_fe : brideAdjacencyEdge) {
359  CHKERR this->getParent(bridge_fe, parents, moab, th_parent_handle,
360  th_bit_level);
361  };
362  parents.insert(parents.end(), brideAdjacencyEdge.begin(),
363  brideAdjacencyEdge.end());
364  } else {
365  parents.swap(brideAdjacencyEdge);
366  }
367 
368  CHKERR this->getParentsAdjacencies(field, moab, parents, adjacency);
369 
370  std::sort(adjacency.begin(), adjacency.end());
371  auto it = std::unique(adjacency.begin(), adjacency.end());
372  adjacency.resize(std::distance(adjacency.begin(), it));
373 
374  for (auto e : adjacency) {
375  auto &side_table = fe.getSideNumberTable();
376  if (side_table.find(e) == side_table.end())
377  const_cast<SideNumber_multiIndex &>(side_table)
378  .insert(
379  boost::shared_ptr<SideNumber>(new SideNumber(e, -1, 0, 0)));
380  }
381  }
382 
384  }

Member Data Documentation

◆ brideAdjacencyEdge

template<int DIM>
std::vector<EntityHandle> MoFEM::ParentFiniteElementAdjacencyFunctionSkeleton< DIM >::brideAdjacencyEdge
protected

Definition at line 387 of file MeshProjectionDataOperators.hpp.


The documentation for this struct was generated from the following file:
MoFEM::ParentFiniteElementAdjacencyFunctionSkeleton::brideAdjacencyEdge
std::vector< EntityHandle > brideAdjacencyEdge
Definition: MeshProjectionDataOperators.hpp:387
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::ParentFiniteElementAdjacencyFunction::getParent
MoFEMErrorCode getParent(EntityHandle fe, std::vector< EntityHandle > &parents, moab::Interface &moab, Tag th_parent_handle, Tag th_bit_level)
Definition: MeshProjectionDataOperators.hpp:198
MoFEM::ParentFiniteElementAdjacencyFunction::getDefaultAdjacencies
MoFEMErrorCode getDefaultAdjacencies(moab::Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
Definition: MeshProjectionDataOperators.hpp:282
SideNumber_multiIndex
multi_index_container< boost::shared_ptr< SideNumber >, indexed_by< ordered_unique< member< SideNumber, EntityHandle, &SideNumber::ent > >, ordered_non_unique< composite_key< SideNumber, const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType >, member< SideNumber, signed char, &SideNumber::side_number > > > > > SideNumber_multiIndex
SideNumber_multiIndex for SideNumber.
Definition: RefEntsMultiIndices.hpp:101
BITREFLEVEL_SIZE
#define BITREFLEVEL_SIZE
max number of refinements
Definition: definitions.h:232
MoFEM::ParentFiniteElementAdjacencyFunction::bitParent
BitRefLevel bitParent
Definition: MeshProjectionDataOperators.hpp:296
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
MoFEM::ParentFiniteElementAdjacencyFunction::getParentsAdjacencies
MoFEMErrorCode getParentsAdjacencies(const Field &field, moab::Interface &moab, std::vector< EntityHandle > &parents, std::vector< EntityHandle > &adjacency)
Definition: MeshProjectionDataOperators.hpp:243
NOFIELD
@ NOFIELD
scalar or vector of scalars describe (no true field)
Definition: definitions.h:84