v0.14.0
AdjacencyMultiIndices.hpp
Go to the documentation of this file.
1 /** \file AdjacencyMultiIndices.hpp
2  * \brief Myltindex containes, data structures for mofem adjacencies and other
3  * low-level functions
4  */
5 
6 
7 
8 #ifndef __ADJACENCYMULTIINDICES_HPP__
9 #define __ADJACENCYMULTIINDICES_HPP__
10 
11 namespace MoFEM {
12 
13 /**
14  * \brief FieldEntityEntFiniteElementAdjacencyMap of mofem finite element and
15  * entities
16  *
17  */
19  unsigned int byWhat; ///< see options \ref ByWhat
20  const boost::shared_ptr<FieldEntity> entFieldPtr; ///< field entity
21  const boost::shared_ptr<EntFiniteElement> entFePtr; ///< finite element entity
23  const boost::shared_ptr<FieldEntity> &ent_field_ptr,
24  const boost::shared_ptr<EntFiniteElement> &ent_fe_ptr);
25 
26  virtual ~FieldEntityEntFiniteElementAdjacencyMap() = default;
27 
28  /**
29  * \brief get unique iD of finite element entity
30  */
31  inline UId getFeUniqueId() const { return entFePtr->getLocalUniqueId(); }
32 
33  /**
34  * \brief get meshset of finite element
35  */
36  inline EntityHandle getFeMeshset() const { return entFePtr->getMeshset(); }
37 
38  /**
39  * \brief get finite element handle
40  */
41  inline EntityHandle getFeHandle() const { return entFePtr->getEnt(); }
42 
43  /**
44  * \brief get unique iD of entity on field
45  */
46  inline UId getEntUniqueId() const { return entFieldPtr->getLocalUniqueId(); }
47 
48  /**
49  * \brief get entity meshset carrying its field
50  */
51  inline EntityHandle getEntMeshset() const {
52  return entFieldPtr->getMeshset();
53  }
54 
55  /**
56  * \brief get entity handle
57  */
58  inline EntityHandle getEntHandle() const { return entFieldPtr->getEnt(); }
59 
60  /**
61  * \brief get field iD
62  */
63  BitFieldId getEntId() const { return entFieldPtr->getId(); }
64 
65  /**
66  * \brief get finite element iD
67  */
68  BitFEId getBitFEId() const { return entFePtr->getId(); }
69 
70  friend std::ostream &
71  operator<<(std::ostream &os,
73 };
74 
75 /**
76  * @relates multi_index_container
77  * \brief MultiIndex container keeps Adjacencies Element and dof entities
78  adjacencies and vice versa.
79 
80  */
81 typedef multi_index_container<
82  FieldEntityEntFiniteElementAdjacencyMap,
83  indexed_by<
84  ordered_unique<
85  tag<Composite_Unique_mi_tag>,
86  composite_key<
87  FieldEntityEntFiniteElementAdjacencyMap,
88  const_mem_fun<
89  FieldEntityEntFiniteElementAdjacencyMap, UId,
91  const_mem_fun<
92  FieldEntityEntFiniteElementAdjacencyMap, UId,
94  ordered_non_unique<
95  tag<Unique_mi_tag>,
96  const_mem_fun<
97  FieldEntityEntFiniteElementAdjacencyMap, UId,
99  ordered_non_unique<
100  tag<FE_Unique_mi_tag>,
101  const_mem_fun<
102  FieldEntityEntFiniteElementAdjacencyMap, UId,
104  ordered_non_unique<
105  tag<FEEnt_mi_tag>,
106  const_mem_fun<
107  FieldEntityEntFiniteElementAdjacencyMap, EntityHandle,
109  ordered_non_unique<
110  tag<Ent_mi_tag>,
111  const_mem_fun<
112  FieldEntityEntFiniteElementAdjacencyMap, EntityHandle,
115 
117  int bY;
119  : bY(by) {}
121  e.byWhat |= bY;
122  }
123 };
124 
125 } // namespace MoFEM
126 
127 #endif // __ADJACENCYMULTIINDICES_HPP__
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::getBitFEId
BitFEId getBitFEId() const
get finite element iD
Definition: AdjacencyMultiIndices.hpp:68
FieldEntityEntFiniteElementAdjacencyMap_multiIndex
multi_index_container< FieldEntityEntFiniteElementAdjacencyMap, indexed_by< ordered_unique< tag< Composite_Unique_mi_tag >, composite_key< FieldEntityEntFiniteElementAdjacencyMap, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getEntUniqueId >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getFeUniqueId > > >, ordered_non_unique< tag< Unique_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getEntUniqueId > >, ordered_non_unique< tag< FE_Unique_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getFeUniqueId > >, ordered_non_unique< tag< FEEnt_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, EntityHandle, &FieldEntityEntFiniteElementAdjacencyMap::getFeHandle > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, EntityHandle, &FieldEntityEntFiniteElementAdjacencyMap::getEntHandle > > > > FieldEntityEntFiniteElementAdjacencyMap_multiIndex
MultiIndex container keeps Adjacencies Element and dof entities adjacencies and vice versa.
Definition: AdjacencyMultiIndices.hpp:114
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::byWhat
unsigned int byWhat
see options ByWhat
Definition: AdjacencyMultiIndices.hpp:19
EntityHandle
MoFEM::Types::BitFieldId
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:42
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::~FieldEntityEntFiniteElementAdjacencyMap
virtual ~FieldEntityEntFiniteElementAdjacencyMap()=default
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::getFeHandle
EntityHandle getFeHandle() const
get finite element handle
Definition: AdjacencyMultiIndices.hpp:41
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::getFeUniqueId
UId getFeUniqueId() const
get unique iD of finite element entity
Definition: AdjacencyMultiIndices.hpp:31
MoFEM::Types::BitFEId
std::bitset< BITFEID_SIZE > BitFEId
Finite element Id.
Definition: Types.hpp:43
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::getFeMeshset
EntityHandle getFeMeshset() const
get meshset of finite element
Definition: AdjacencyMultiIndices.hpp:36
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::operator<<
friend std::ostream & operator<<(std::ostream &os, const FieldEntityEntFiniteElementAdjacencyMap &e)
Definition: FieldMultiIndices.cpp:566
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::Types::UId
uint128_t UId
Unique Id.
Definition: Types.hpp:31
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::getEntUniqueId
UId getEntUniqueId() const
get unique iD of entity on field
Definition: AdjacencyMultiIndices.hpp:46
MoFEM::FieldEntityEntFiniteElementAdjacencyMap_change_ByWhat::FieldEntityEntFiniteElementAdjacencyMap_change_ByWhat
FieldEntityEntFiniteElementAdjacencyMap_change_ByWhat(const int by)
Definition: AdjacencyMultiIndices.hpp:118
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::entFePtr
const boost::shared_ptr< EntFiniteElement > entFePtr
finite element entity
Definition: AdjacencyMultiIndices.hpp:21
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::getEntId
BitFieldId getEntId() const
get field iD
Definition: AdjacencyMultiIndices.hpp:63
MoFEM::FieldEntityEntFiniteElementAdjacencyMap
FieldEntityEntFiniteElementAdjacencyMap of mofem finite element and entities.
Definition: AdjacencyMultiIndices.hpp:18
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::FieldEntityEntFiniteElementAdjacencyMap
FieldEntityEntFiniteElementAdjacencyMap(const boost::shared_ptr< FieldEntity > &ent_field_ptr, const boost::shared_ptr< EntFiniteElement > &ent_fe_ptr)
Definition: FieldMultiIndices.cpp:561
MoFEM::FieldEntityEntFiniteElementAdjacencyMap_change_ByWhat::operator()
void operator()(FieldEntityEntFiniteElementAdjacencyMap &e)
Definition: AdjacencyMultiIndices.hpp:120
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::entFieldPtr
const boost::shared_ptr< FieldEntity > entFieldPtr
field entity
Definition: AdjacencyMultiIndices.hpp:20
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::getEntMeshset
EntityHandle getEntMeshset() const
get entity meshset carrying its field
Definition: AdjacencyMultiIndices.hpp:51
MoFEM::FieldEntityEntFiniteElementAdjacencyMap::getEntHandle
EntityHandle getEntHandle() const
get entity handle
Definition: AdjacencyMultiIndices.hpp:58
MoFEM::FieldEntityEntFiniteElementAdjacencyMap_change_ByWhat::bY
int bY
Definition: AdjacencyMultiIndices.hpp:117
MoFEM::FieldEntityEntFiniteElementAdjacencyMap_change_ByWhat
Definition: AdjacencyMultiIndices.hpp:116