v0.14.0
Loading...
Searching...
No Matches
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 }
#define BITREFLEVEL_SIZE
max number of refinements
Definition: definitions.h:219
@ NOFIELD
scalar or vector of scalars describe (no true field)
Definition: definitions.h:84
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
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.
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)

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: