v0.14.0
FieldEntsMultiIndices.hpp
Go to the documentation of this file.
1 /** \file FieldEntsMultiIndices.hpp
2  * \brief Multi-index contains, for mofem entities data structures and other
3  * low-level functions
4  */
5 
6 
7 
8 #ifndef __FIELD_ENTSMULTIINDICES_HPP__
9 #define __FIELD_ENTSMULTIINDICES_HPP__
10 
11 namespace MoFEM {
12 
13 struct EntityCacheDofs;
14 struct EntityCacheNumeredDofs;
15 
16 struct EntityStorage {
17  virtual ~EntityStorage() = default;
18 };
19 
20 /**
21  * \brief Struct keeps handle to entity in the field.
22  * \ingroup ent_multi_indices
23  */
24 struct FieldEntity : public interface_Field<Field, RefEntity> {
25 
28 
29  /**
30  * @brief Local unique id for this entity. Unique on CPU partition.
31  *
32  * @note Global UId use entity handle from owning processor, so is unique
33  * across all CPUs. Local UId, uses local entity handle. Local id is
34  * convenient to use, is easley accessible from MOAB.
35  *
36  */
38 
39  FieldEntity(const boost::shared_ptr<Field> field_ptr,
40  const boost::shared_ptr<RefEntity> ref_ents_ptr,
41  boost::shared_ptr<double *const> field_data_adaptor_ptr,
42  boost::shared_ptr<const int> t_max_order_ptr);
43 
44  virtual ~FieldEntity() = default;
45 
46  /**
47  * \brief Get number of active DOFs on entity
48  * @return Number of DOFs
49  */
50  inline int getNbDofsOnEnt() const {
51  return getOrderNbDofs(getMaxOrder()) * this->getNbOfCoeffs();
52  }
53 
54  /**
55  * @brief Return shared pointer to entity field data vector adaptor
56  *
57  * @return boost::shared_ptr<VectorAdaptor>
58  */
59  static boost::shared_ptr<FieldData *const> makeSharedFieldDataAdaptorPtr(
60  const boost::shared_ptr<Field> &field_ptr,
61  const boost::shared_ptr<RefEntity> &ref_ents_ptr);
62 
63  /**
64  * @brief Get shared ptr to vector adaptor pointing to the field tag data on
65  * entity
66  *
67  * @return boost::shared_ptr<VectorAdaptor>&
68  */
69  inline boost::shared_ptr<FieldData *const> &getEntFieldDataPtr() const {
70  return fieldDataAdaptorPtr;
71  }
72 
73  /**
74  * \brief Get vector of DOFs active values on entity
75  * @return Vector of DOFs values
76  */
77  inline VectorAdaptor getEntFieldData() const {
79  }
80 
81  /**
82  * \brief Get number of DOFs on entity for given order of approximation
83  * @param order Order of approximation
84  * @return Number of DOFs
85  */
87  return (this->getFieldRawPtr()->forderTable[this->getEntType()])(order);
88  }
89 
90  /**
91  * \brief Get difference of number of DOFs between order and order-1
92  * @param order Approximation order
93  * @return Difference number of DOFs
94  */
97  }
98 
99  /**
100  * \brief Get pinter to Tag keeping approximation order
101  * @return Pointer to Tag
102  */
103  inline const ApproximationOrder *getMaxOrderPtr() const {
104  return tagMaxOrderPtr.get();
105  }
106 
107  /**
108  * \brief Get order set to the entity (Allocated tag size for such number)
109  * @return Approximation order
110  */
112  return *tagMaxOrderPtr.get();
113  }
114 
115  /**
116  * @brief Get the Local Unique Id Calculate
117  *
118  * @param bit_number
119  * @param handle
120  * @return UId
121  */
122  static inline UId getLocalUniqueIdCalculate(const char bit_number,
123  const EntityHandle handle) {
124  return
125 
126  (static_cast<UId>(handle) << proc_shift | static_cast<UId>(bit_number)
127  << proc_shift + ent_shift)
128  << dof_shift;
129  }
130 
131  /**
132  * @brief Get the Local Unique Id Calculate object
133  *
134  * @return UId
135  */
137  return getLocalUniqueIdCalculate(this->getBitNumber(), this->getEnt());
138  }
139 
140  /**
141  * \brief Get global unique id
142  * @return Global UId
143  */
145 
146  /**
147  * \brief Get global unique id
148  * @return Global UId
149  */
150  const UId &getLocalUniqueId() const { return localUId; }
151 
152  /**
153  * \brief Calculate UId for field entity
154  *
155  * UId is constructed such that all DOFs are ordered by processor, entity,
156  * field.
157  *
158  * UId is 128 bit
159  *
160  * @param owner_proc owning processor
161  * @param bit_number field bit number
162  * @param moab_owner_handle entity handle on owning processor
163  * meshes
164  * @return UId
165  */
166  static inline UId
167  getGlobalUniqueIdCalculate(const int owner_proc, const char bit_number,
168  const EntityHandle moab_owner_handle) {
169  return
170 
171  (static_cast<UId>(owner_proc) |
172  static_cast<UId>(moab_owner_handle) << proc_shift |
173  static_cast<UId>(bit_number) << proc_shift + ent_shift)
174  << dof_shift;
175  }
176 
177  static inline auto getOwnerFromUniqueId(const UId uid) {
178  constexpr int proc_mask = MAX_PROCESSORS_NUMBER - 1;
179  return static_cast<int>(
180 
181  (uid & getGlobalUniqueIdCalculate(proc_mask, 0, 0)) >> dof_shift
182 
183  );
184  };
185 
186  /**
187  * @brief Get the Handle From Unique Id
188  *
189  * @param uid
190  * @return EntityHandle
191  */
192  static inline auto getHandleFromUniqueId(const UId uid) {
193  constexpr EntityHandle handle_mask = ~(EntityHandle(0));
194  return static_cast<EntityHandle>(
195  (uid & getGlobalUniqueIdCalculate(0, 0, handle_mask)) >> proc_shift >>
196  dof_shift);
197  };
198 
199  /**
200  * @brief Get the Field Bit Number From Unique Id
201  *
202  * @param uid
203  * @return FieldId
204  */
205  static inline auto getFieldBitNumberFromUniqueId(const UId uid) {
206  constexpr int bit_field_mask = ~(char(0));
207  return static_cast<char>(
208  (uid & getGlobalUniqueIdCalculate(0, bit_field_mask, 0)) >>
210  };
211 
212  /**
213  * \brief Calculate global UId
214  * @return Global UId
215  */
218  this->getBitNumber(),
219  this->getRefEntityPtr()->getOwnerEnt());
220  }
221 
222  static inline UId getLoBitNumberUId(const FieldBitNumber bit_number) {
223  return
224 
225  static_cast<UId>(bit_number) << dof_shift + ent_shift + proc_shift;
226  }
227 
228  static inline UId getHiBitNumberUId(const FieldBitNumber bit_number) {
229  return static_cast<UId>(MAX_DOFS_ON_ENTITY - 1) |
230  static_cast<UId>(MAX_PROCESSORS_NUMBER - 1) << dof_shift |
231  static_cast<UId>(std::numeric_limits<EntityHandle>::max())
232  << dof_shift + proc_shift |
233  static_cast<UId>(bit_number) << dof_shift + ent_shift + proc_shift;
234  }
235 
236  static inline UId getLoFieldEntityUId(const UId &uid) {
237  return ((~static_cast<UId>(MAX_DOFS_ON_ENTITY - 1)) & uid);
238  }
239 
240  static inline UId getHiFieldEntityUId(const UId &uid) {
241  return getLoFieldEntityUId(uid) | static_cast<UId>(MAX_DOFS_ON_ENTITY - 1);
242  }
243 
244  template <typename T> void getLoFieldEntityUId(T &uid) = delete;
245  template <typename T> void getHiFieldEntityUId(T &uid) = delete;
246 
247  static inline UId getLoLocalEntityBitNumber(const char bit_number,
248  const EntityHandle ent) {
250 
251  bit_number,
252 
253  ent
254 
255  );
256  }
257 
258  static inline UId getHiLocalEntityBitNumber(const char bit_number,
259  const EntityHandle ent) {
260  return getLoLocalEntityBitNumber(bit_number, ent) |
261  static_cast<UId>(MAX_DOFS_ON_ENTITY - 1);
262  }
263 
264  /**
265  * \brief get hash-map relating dof index on entity with its order
266  *
267  * DOFs of given field are indexed on entity
268  * of the same type, same space, approximation base and number of
269  * coefficients, are sorted in the way.
270  *
271  */
272  inline const std::array<int, MAX_DOFS_ON_ENTITY> &getDofOrderMap() const {
273  return this->getFieldRawPtr()->getDofOrderMap(this->getEntType());
274  }
275 
276  friend std::ostream &operator<<(std::ostream &os, const FieldEntity &e);
277 
278  mutable boost::weak_ptr<EntityCacheDofs> entityCacheDataDofs;
279  mutable boost::weak_ptr<EntityCacheNumeredDofs> entityCacheRowDofs;
280  mutable boost::weak_ptr<EntityCacheNumeredDofs> entityCacheColDofs;
281 
282  /**
283  * @brief Get the Weak Storage pointer
284  *
285  * @return boost::weak_ptr<EntityStorage>&
286  */
287  template <typename T = EntityStorage>
288  inline boost::shared_ptr<T> getSharedStoragePtr() const {
289  return boost::dynamic_pointer_cast<T>(weakStoragePtr.lock());
290  }
291 
292  inline boost::weak_ptr<EntityStorage> &getWeakStoragePtr() const {
293  return weakStoragePtr;
294  }
295 
296  mutable boost::weak_ptr<EntityStorage> weakStoragePtr;
297 
298 private:
299  mutable boost::shared_ptr<const ApproximationOrder> tagMaxOrderPtr;
300  mutable boost::shared_ptr<FieldData *const> fieldDataAdaptorPtr;
301  static constexpr int dof_shift = 9; // Maximal number of DOFs on entity
302  static constexpr int ent_shift = 64; // EntityHandle size
303  static constexpr int proc_shift = 10; // Maximal number of 1024 processors
304 };
305 
306 template <>
307 inline boost::shared_ptr<EntityStorage>
308 FieldEntity::getSharedStoragePtr<EntityStorage>() const {
309  return weakStoragePtr.lock();
310 }
311 
312 /**
313  * \brief Interface to FieldEntity
314  * \ingroup ent_multi_indices
315  *
316  * interface to FieldEntity
317  */
318 template <typename T>
319 struct interface_FieldEntity : public interface_Field<T, T> {
320 
321  interface_FieldEntity(const boost::shared_ptr<T> &sptr)
322  : interface_Field<T, T>(sptr) {}
323 
324  /// @return get number of dofs on entity
325  inline int getNbDofsOnEnt() const { return this->sPtr->getNbDofsOnEnt(); }
326 
327  /// @return get field data on entity
329  return this->sPtr->getEntFieldData();
330  }
331 
332  /// @return get number of DOFs for given order
334  return this->sPtr->getOrderNbDofs(order);
335  }
336 
337  /// @return get increase of DOFs by increase to this order
339  return this->sPtr->getOrderNbDofsDiff(order);
340  }
341 
342  /// @return get maximal order on entity
344  return this->sPtr->getMaxOrder();
345  }
346 
347  /// @return get entity UId
348  inline UId getGlobalUniqueId() const {
349  return this->sPtr->getGlobalUniqueId();
350  }
351 
352  /// @return get entity UId
353  inline UId &getLocalUniqueId() const {
354  return this->sPtr->getLocalUniqueId();
355  }
356 
357  /// @return return pointer to reference entity data structure
358  inline boost::shared_ptr<RefEntity> &getRefEntityPtr() const {
359  return this->sPtr->getRefEntityPtr();
360  }
361 
362  /// @return get pointer to mofem entity data structure
363  inline boost::shared_ptr<FieldEntity> &getFieldEntityPtr() const {
364  return this->sPtr;
365  };
366 
367  /**
368  * \brief get hash-map relating dof index on entity with its order
369  *
370  * DOFs of given field are indexed on entity
371  * of the same type, same space, approximation base and number of
372  * coefficients, are sorted in the way.
373  *
374  */
375  inline const std::array<int, MAX_DOFS_ON_ENTITY> &getDofOrderMap() const {
376  return this->sPtr->getDofOrderMap();
377  }
378 
379  /// @copydoc FieldEntity::getSharedStoragePtr
380  template <typename S = EntityStorage>
381  inline boost::shared_ptr<S> getSharedStoragePtr() const {
382  return this->sPtr->template getSharedStoragePtr<S>();
383  }
384 
385  inline boost::weak_ptr<EntityStorage> &getWeakStoragePtr() const {
386  return this->sPtr->getWeakStoragePtr();
387  }
388 };
389 
390 /**
391  * \brief structure to change FieldEntity order
392  * \ingroup ent_multi_indices
393  */
395 
397  const bool reduce_tag_size = false)
398  : order(order), reduceTagSize(reduce_tag_size) {}
399  inline void operator()(boost::shared_ptr<FieldEntity> &e) {
400  (*this)(e.get());
401  }
402  void operator()(FieldEntity *e);
403 
404 private:
406  const bool reduceTagSize;
407  std::vector<FieldData> data;
408 };
409 
410 /**
411  * @relates multi_index_container
412  * \brief MultiIndex container keeps FieldEntity
413  * \ingroup ent_multi_indices
414  *
415  */
416 using FieldEntity_multiIndex = multi_index_container<
417  boost::shared_ptr<FieldEntity>,
418  indexed_by<
419  ordered_unique<tag<Unique_mi_tag>,
420  member<FieldEntity, UId, &FieldEntity::localUId>>,
421  ordered_non_unique<tag<Ent_mi_tag>,
424 
425  >>;
426 
427 /** \brief Entity index by field name
428  *
429  * \ingroup ent_multi_indices
430  */
432 
433 /** \brief multi-index view on DofEntity by uid
434  \ingroup dof_multi_indices
435 */
436 using FieldEntity_multiIndex_global_uid_view = multi_index_container<
437  boost::shared_ptr<FieldEntity>,
438  indexed_by<
439 
440  ordered_unique<
441  tag<Unique_mi_tag>,
442  const_mem_fun<FieldEntity, UId, &FieldEntity::getGlobalUniqueId>>
443 
444  >>;
445 
446 using FieldEntity_multiIndex_ent_view = multi_index_container<
447  boost::shared_ptr<FieldEntity>,
448  indexed_by<
449 
450  sequenced<>,
451 
452  ordered_non_unique<tag<Ent_mi_tag>,
455 
456  >>;
457 
458 using FieldEntity_multiIndex_spaceType_view = multi_index_container<
459  boost::shared_ptr<FieldEntity>,
460  indexed_by<
461 
462  sequenced<>,
463 
464  ordered_non_unique<
465  tag<Composite_EntType_and_Space_mi_tag>,
466  composite_key<FieldEntity,
467 
469  EntityType, &FieldEntity::getEntType>,
470 
471  const_mem_fun<FieldEntity::interface_type_Field,
473 
474  >>
475 
476  >>;
477 
478 typedef std::vector<boost::weak_ptr<FieldEntity>> FieldEntity_vector_view;
479 
480 using FieldEntity_multiIndex = multi_index_container<
481  boost::shared_ptr<FieldEntity>,
482  indexed_by<
483  ordered_unique<tag<Unique_mi_tag>,
484  member<FieldEntity, UId, &FieldEntity::localUId>>,
485  ordered_non_unique<tag<Ent_mi_tag>,
488 
489  >>;
490 
491 } // namespace MoFEM
492 
493 #endif // __FIELD_ENTSMULTIINDICES_HPP__
494 
495 /**
496  * \defgroup ent_multi_indices Entities structures and multi-indices
497  * \ingroup mofem
498  **/
MoFEM::FieldEntity::getGlobalUniqueIdCalculate
UId getGlobalUniqueIdCalculate() const
Calculate global UId.
Definition: FieldEntsMultiIndices.hpp:216
MoFEM::interface_Field< Field, RefEntity >::getBitNumber
FieldBitNumber getBitNumber() const
Definition: FieldMultiIndices.hpp:347
MoFEM::FieldEntity::~FieldEntity
virtual ~FieldEntity()=default
MoFEM::FieldEntity::getEntFieldData
VectorAdaptor getEntFieldData() const
Get vector of DOFs active values on entity.
Definition: FieldEntsMultiIndices.hpp:77
MoFEM::FieldEntity_multiIndex_ent_view
multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< sequenced<>, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntity::interface_type_RefEntity, EntityHandle, &FieldEntity::getEnt > > > > FieldEntity_multiIndex_ent_view
Definition: FieldEntsMultiIndices.hpp:456
EntityHandle
MoFEM::Field::getDofOrderMap
const std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
get hash-map relating dof index on entity with its order
Definition: FieldMultiIndices.hpp:254
MoFEM::FieldEntity_change_order::FieldEntity_change_order
FieldEntity_change_order(const ApproximationOrder order, const bool reduce_tag_size=false)
Definition: FieldEntsMultiIndices.hpp:396
MoFEM::FieldEntity::getOrderNbDofs
int getOrderNbDofs(ApproximationOrder order) const
Get number of DOFs on entity for given order of approximation.
Definition: FieldEntsMultiIndices.hpp:86
MoFEM::FieldEntity::getLoLocalEntityBitNumber
static UId getLoLocalEntityBitNumber(const char bit_number, const EntityHandle ent)
Definition: FieldEntsMultiIndices.hpp:247
MoFEM::FieldEntity::getLoFieldEntityUId
static UId getLoFieldEntityUId(const UId &uid)
Definition: FieldEntsMultiIndices.hpp:236
MoFEM::interface_FieldEntity::getSharedStoragePtr
boost::shared_ptr< S > getSharedStoragePtr() const
Get the Weak Storage pointer.
Definition: FieldEntsMultiIndices.hpp:381
MoFEM::FieldEntity_vector_view
std::vector< boost::weak_ptr< FieldEntity > > FieldEntity_vector_view
Definition: FieldEntsMultiIndices.hpp:478
MoFEM::interface_RefEntity< RefEntity >::getRefEntityPtr
boost::shared_ptr< RefEntity > & getRefEntityPtr() const
Definition: RefEntsMultiIndices.hpp:709
MoFEM::FieldEntity_change_order::order
const ApproximationOrder order
Definition: FieldEntsMultiIndices.hpp:405
MoFEM::interface_RefEntity::sPtr
boost::shared_ptr< T > sPtr
Definition: RefEntsMultiIndices.hpp:711
MoFEM::FieldEntity_change_order
structure to change FieldEntity order
Definition: FieldEntsMultiIndices.hpp:394
MoFEM::interface_FieldEntity
Interface to FieldEntity.
Definition: FieldEntsMultiIndices.hpp:319
MoFEM::interface_RefEntity< RefEntity >::getEnt
EntityHandle getEnt() const
Get the entity handle.
Definition: RefEntsMultiIndices.hpp:603
MoFEM::FieldEntity::interface_type_RefEntity
interface_RefEntity< RefEntity > interface_type_RefEntity
Definition: FieldEntsMultiIndices.hpp:27
MoFEM::FieldEntity::getGlobalUniqueIdCalculate
static UId getGlobalUniqueIdCalculate(const int owner_proc, const char bit_number, const EntityHandle moab_owner_handle)
Calculate UId for field entity.
Definition: FieldEntsMultiIndices.hpp:167
MoFEM::interface_FieldEntity::getGlobalUniqueId
UId getGlobalUniqueId() const
Definition: FieldEntsMultiIndices.hpp:348
MoFEM::interface_RefEntity< RefEntity >
MoFEM::FieldEntity::getLocalUniqueIdCalculate
static UId getLocalUniqueIdCalculate(const char bit_number, const EntityHandle handle)
Get the Local Unique Id Calculate.
Definition: FieldEntsMultiIndices.hpp:122
MoFEM::FieldEntity::getEntFieldDataPtr
boost::shared_ptr< FieldData *const > & getEntFieldDataPtr() const
Get shared ptr to vector adaptor pointing to the field tag data on entity.
Definition: FieldEntsMultiIndices.hpp:69
MoFEM::FieldEntity::getHiFieldEntityUId
static UId getHiFieldEntityUId(const UId &uid)
Definition: FieldEntsMultiIndices.hpp:240
order
constexpr int order
Definition: dg_projection.cpp:18
MoFEM::FieldEntity_multiIndex_spaceType_view
multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< sequenced<>, ordered_non_unique< tag< Composite_EntType_and_Space_mi_tag >, composite_key< FieldEntity, const_mem_fun< FieldEntity::interface_type_RefEntity, EntityType, &FieldEntity::getEntType >, const_mem_fun< FieldEntity::interface_type_Field, FieldSpace, &FieldEntity::getSpace > > > > > FieldEntity_multiIndex_spaceType_view
Definition: FieldEntsMultiIndices.hpp:476
MoFEM::EntityStorage::~EntityStorage
virtual ~EntityStorage()=default
FieldSpace
FieldSpace
approximation spaces
Definition: definitions.h:82
MoFEM::FieldEntity_change_order::reduceTagSize
const bool reduceTagSize
Definition: FieldEntsMultiIndices.hpp:406
MoFEM::interface_FieldEntity::getFieldEntityPtr
boost::shared_ptr< FieldEntity > & getFieldEntityPtr() const
Definition: FieldEntsMultiIndices.hpp:363
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::EntityStorage
Definition: FieldEntsMultiIndices.hpp:16
MAX_PROCESSORS_NUMBER
#define MAX_PROCESSORS_NUMBER
Maximal number of processors.
Definition: definitions.h:237
MoFEM::getVectorAdaptor
auto getVectorAdaptor(T1 ptr, const size_t n)
Get Vector adaptor.
Definition: Templates.hpp:31
MoFEM::FieldEntity::getHandleFromUniqueId
static auto getHandleFromUniqueId(const UId uid)
Get the Handle From Unique Id.
Definition: FieldEntsMultiIndices.hpp:192
MoFEM::Types::UId
uint128_t UId
Unique Id.
Definition: Types.hpp:31
MoFEM::FieldEntity::makeSharedFieldDataAdaptorPtr
static boost::shared_ptr< FieldData *const > makeSharedFieldDataAdaptorPtr(const boost::shared_ptr< Field > &field_ptr, const boost::shared_ptr< RefEntity > &ref_ents_ptr)
Return shared pointer to entity field data vector adaptor.
Definition: FieldEntsMultiIndices.cpp:35
convert.type
type
Definition: convert.py:64
MoFEM::FieldEntity::getLocalUniqueIdCalculate
UId getLocalUniqueIdCalculate()
Get the Local Unique Id Calculate object.
Definition: FieldEntsMultiIndices.hpp:136
MoFEM::FieldEntity::getLoBitNumberUId
static UId getLoBitNumberUId(const FieldBitNumber bit_number)
Definition: FieldEntsMultiIndices.hpp:222
MoFEM::FieldEntity::tagMaxOrderPtr
boost::shared_ptr< const ApproximationOrder > tagMaxOrderPtr
Definition: FieldEntsMultiIndices.hpp:299
MoFEM::interface_FieldEntity::getRefEntityPtr
boost::shared_ptr< RefEntity > & getRefEntityPtr() const
Definition: FieldEntsMultiIndices.hpp:358
MoFEM::FieldEntityByUId
FieldEntity_multiIndex::index< Unique_mi_tag >::type FieldEntityByUId
Entity index by field name.
Definition: FieldEntsMultiIndices.hpp:431
MoFEM::FieldEntity
Struct keeps handle to entity in the field.
Definition: FieldEntsMultiIndices.hpp:24
MoFEM::interface_FieldEntity::getNbDofsOnEnt
int getNbDofsOnEnt() const
Definition: FieldEntsMultiIndices.hpp:325
MoFEM::interface_RefEntity< RefEntity >::getOwnerProc
int getOwnerProc() const
Definition: RefEntsMultiIndices.hpp:675
MoFEM::FieldEntity::getGlobalUniqueId
UId getGlobalUniqueId() const
Get global unique id.
Definition: FieldEntsMultiIndices.hpp:144
MoFEM::FieldEntity_multiIndex_global_uid_view
multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< FieldEntity, UId, &FieldEntity::getGlobalUniqueId > > > > FieldEntity_multiIndex_global_uid_view
multi-index view on DofEntity by uid
Definition: FieldEntsMultiIndices.hpp:444
MoFEM::FieldEntity::FieldEntity
FieldEntity(const boost::shared_ptr< Field > field_ptr, const boost::shared_ptr< RefEntity > ref_ents_ptr, boost::shared_ptr< double *const > field_data_adaptor_ptr, boost::shared_ptr< const int > t_max_order_ptr)
Definition: FieldEntsMultiIndices.cpp:15
MoFEM::interface_Field< Field, RefEntity >::getNbOfCoeffs
FieldCoefficientsNumber getNbOfCoeffs() const
Definition: FieldMultiIndices.hpp:342
MoFEM::Types::VectorAdaptor
VectorShallowArrayAdaptor< double > VectorAdaptor
Definition: Types.hpp:115
MoFEM::FieldEntity::entityCacheColDofs
boost::weak_ptr< EntityCacheNumeredDofs > entityCacheColDofs
Definition: FieldEntsMultiIndices.hpp:280
MoFEM::FieldEntity_multiIndex
multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, member< FieldEntity, UId, &FieldEntity::localUId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntity::interface_type_RefEntity, EntityHandle, &FieldEntity::getEnt > > > > FieldEntity_multiIndex
Definition: FieldEntsMultiIndices.hpp:489
MoFEM::FieldEntity::entityCacheRowDofs
boost::weak_ptr< EntityCacheNumeredDofs > entityCacheRowDofs
Definition: FieldEntsMultiIndices.hpp:279
MoFEM::FieldEntity::proc_shift
static constexpr int proc_shift
Definition: FieldEntsMultiIndices.hpp:303
MoFEM::FieldEntity::fieldDataAdaptorPtr
boost::shared_ptr< FieldData *const > fieldDataAdaptorPtr
Definition: FieldEntsMultiIndices.hpp:300
MoFEM::interface_FieldEntity::getOrderNbDofs
int getOrderNbDofs(ApproximationOrder order) const
Definition: FieldEntsMultiIndices.hpp:333
MoFEM::FieldEntity::getDofOrderMap
const std::array< int, MAX_DOFS_ON_ENTITY > & getDofOrderMap() const
get hash-map relating dof index on entity with its order
Definition: FieldEntsMultiIndices.hpp:272
MoFEM::FieldEntity::interface_type_Field
interface_Field< Field, RefEntity > interface_type_Field
Definition: FieldEntsMultiIndices.hpp:26
MAX_DOFS_ON_ENTITY
#define MAX_DOFS_ON_ENTITY
Maximal number of DOFs on entity.
Definition: definitions.h:236
MoFEM::FieldEntity_change_order::operator()
void operator()(boost::shared_ptr< FieldEntity > &e)
Definition: FieldEntsMultiIndices.hpp:399
MoFEM::FieldEntity::entityCacheDataDofs
boost::weak_ptr< EntityCacheDofs > entityCacheDataDofs
Definition: FieldEntsMultiIndices.hpp:278
MoFEM::interface_FieldEntity::getEntFieldData
VectorAdaptor getEntFieldData() const
Definition: FieldEntsMultiIndices.hpp:328
MoFEM::FieldEntity::getMaxOrder
ApproximationOrder getMaxOrder() const
Get order set to the entity (Allocated tag size for such number)
Definition: FieldEntsMultiIndices.hpp:111
MoFEM::FieldEntity::getSharedStoragePtr
boost::shared_ptr< T > getSharedStoragePtr() const
Get the Weak Storage pointer.
Definition: FieldEntsMultiIndices.hpp:288
MoFEM::Types::ApproximationOrder
int ApproximationOrder
Approximation on the entity.
Definition: Types.hpp:26
MoFEM::interface_FieldEntity::getOrderNbDofsDiff
int getOrderNbDofsDiff(ApproximationOrder order) const
Definition: FieldEntsMultiIndices.hpp:338
MoFEM::interface_FieldEntity::getWeakStoragePtr
boost::weak_ptr< EntityStorage > & getWeakStoragePtr() const
Definition: FieldEntsMultiIndices.hpp:385
MoFEM::FieldEntity::ent_shift
static constexpr int ent_shift
Definition: FieldEntsMultiIndices.hpp:302
MoFEM::FieldEntity::dof_shift
static constexpr int dof_shift
Definition: FieldEntsMultiIndices.hpp:301
MoFEM::Types::FieldBitNumber
char FieldBitNumber
Field bit number.
Definition: Types.hpp:28
MoFEM::interface_FieldEntity::interface_FieldEntity
interface_FieldEntity(const boost::shared_ptr< T > &sptr)
Definition: FieldEntsMultiIndices.hpp:321
MoFEM::FieldEntity::getMaxOrderPtr
const ApproximationOrder * getMaxOrderPtr() const
Get pinter to Tag keeping approximation order.
Definition: FieldEntsMultiIndices.hpp:103
MoFEM::FieldEntity::getHiBitNumberUId
static UId getHiBitNumberUId(const FieldBitNumber bit_number)
Definition: FieldEntsMultiIndices.hpp:228
MoFEM::FieldEntity::operator<<
friend std::ostream & operator<<(std::ostream &os, const FieldEntity &e)
Definition: FieldEntsMultiIndices.cpp:54
MoFEM::FieldEntity::getNbDofsOnEnt
int getNbDofsOnEnt() const
Get number of active DOFs on entity.
Definition: FieldEntsMultiIndices.hpp:50
MoFEM::FieldEntity::getHiLocalEntityBitNumber
static UId getHiLocalEntityBitNumber(const char bit_number, const EntityHandle ent)
Definition: FieldEntsMultiIndices.hpp:258
MoFEM::interface_RefEntity< RefEntity >::getEntType
EntityType getEntType() const
Get entity type.
Definition: RefEntsMultiIndices.hpp:643
MoFEM::FieldEntity_change_order::data
std::vector< FieldData > data
Definition: FieldEntsMultiIndices.hpp:407
MoFEM::interface_Field< Field, RefEntity >::getSpace
FieldSpace getSpace() const
Definition: FieldMultiIndices.hpp:332
MoFEM::interface_FieldEntity::getMaxOrder
ApproximationOrder getMaxOrder() const
Definition: FieldEntsMultiIndices.hpp:343
MoFEM::interface_Field< Field, RefEntity >::getFieldRawPtr
const Field * getFieldRawPtr() const
Definition: FieldMultiIndices.hpp:364
MoFEM::interface_FieldEntity::getDofOrderMap
const std::array< int, MAX_DOFS_ON_ENTITY > & getDofOrderMap() const
get hash-map relating dof index on entity with its order
Definition: FieldEntsMultiIndices.hpp:375
MoFEM::FieldEntity::getFieldBitNumberFromUniqueId
static auto getFieldBitNumberFromUniqueId(const UId uid)
Get the Field Bit Number From Unique Id.
Definition: FieldEntsMultiIndices.hpp:205
MoFEM::interface_FieldEntity::getLocalUniqueId
UId & getLocalUniqueId() const
Definition: FieldEntsMultiIndices.hpp:353
MoFEM::FieldEntity::weakStoragePtr
boost::weak_ptr< EntityStorage > weakStoragePtr
Definition: FieldEntsMultiIndices.hpp:296
MoFEM::interface_RefEntity< RefEntity >::getOwnerEnt
EntityHandle getOwnerEnt() const
Definition: RefEntsMultiIndices.hpp:665
MoFEM::interface_Field
Definition: FieldMultiIndices.hpp:301
MoFEM::FieldEntity::localUId
UId localUId
Local unique id for this entity. Unique on CPU partition.
Definition: FieldEntsMultiIndices.hpp:37
MoFEM::FieldEntity::getWeakStoragePtr
boost::weak_ptr< EntityStorage > & getWeakStoragePtr() const
Definition: FieldEntsMultiIndices.hpp:292
MoFEM::FieldEntity::getLocalUniqueId
const UId & getLocalUniqueId() const
Get global unique id.
Definition: FieldEntsMultiIndices.hpp:150
MoFEM::FieldEntity::getOwnerFromUniqueId
static auto getOwnerFromUniqueId(const UId uid)
Definition: FieldEntsMultiIndices.hpp:177
MoFEM::FieldEntity::getOrderNbDofsDiff
int getOrderNbDofsDiff(ApproximationOrder order) const
Get difference of number of DOFs between order and order-1.
Definition: FieldEntsMultiIndices.hpp:95