v0.13.1
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
11namespace 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
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 */
81typedef 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__
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.
std::bitset< BITFEID_SIZE > BitFEId
Finite element Id.
Definition: Types.hpp:43
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:42
uint128_t UId
Unique Id.
Definition: Types.hpp:31
implementation of Data Operators for Forces and Sources
Definition: MoFEM.hpp:24
void operator()(FieldEntityEntFiniteElementAdjacencyMap &e)
FieldEntityEntFiniteElementAdjacencyMap of mofem finite element and entities.
friend std::ostream & operator<<(std::ostream &os, const FieldEntityEntFiniteElementAdjacencyMap &e)
UId getFeUniqueId() const
get unique iD of finite element entity
EntityHandle getFeHandle() const
get finite element handle
EntityHandle getEntMeshset() const
get entity meshset carrying its field
const boost::shared_ptr< FieldEntity > entFieldPtr
field entity
FieldEntityEntFiniteElementAdjacencyMap(const boost::shared_ptr< FieldEntity > &ent_field_ptr, const boost::shared_ptr< EntFiniteElement > &ent_fe_ptr)
UId getEntUniqueId() const
get unique iD of entity on field
EntityHandle getEntHandle() const
get entity handle
EntityHandle getFeMeshset() const
get meshset of finite element
const boost::shared_ptr< EntFiniteElement > entFePtr
finite element entity
BitFEId getBitFEId() const
get finite element iD