v0.14.0
DofsMultiIndices.hpp
Go to the documentation of this file.
1 /** \file DofsMultiIndices.hpp
2  * \ingroup dof_multi_indices
3  * \brief Multi-Index contains, data structures for mofem dofs and other
4  * low-level functions
5  */
6 
7 #ifndef __DOFSMULTIINDICES_HPP__
8 #define __DOFSMULTIINDICES_HPP__
9 
10 namespace MoFEM {
11 
12 /**
13  * \brief keeps information about DOF on the entity
14  * \ingroup dof_multi_indices
15  */
16 struct DofEntity : public interface_FieldEntity<FieldEntity> {
17 
18  virtual ~DofEntity() = default;
19 
23 
24  static inline ShortId
26  const boost::shared_ptr<FieldEntity> &ent_ptr) {
27  return static_cast<ShortId>(dof) |
28  (static_cast<ShortId>(ent_ptr->getBitNumber()) << 9);
29  }
30 
31  DofEntity(const boost::shared_ptr<FieldEntity> &entity_ptr,
32  const ApproximationOrder dof_order,
33  const FieldCoefficientsNumber dof_rank, const DofIdx dof);
34 
35  /// @return get dof index on entity
36  inline DofIdx getEntDofIdx() const { return std::abs(dof); }
37 
38  /// @return get field data on dof
39  inline FieldData &getFieldData() const {
40  return const_cast<FieldData &>(
41  (*this->sPtr->getEntFieldDataPtr())[getEntDofIdx()]);
42  }
43 
44  /// @return get entity unique dof id
45  inline const UId &getEntLocalUniqueId() const {
46  return this->sPtr->getLocalUniqueId();
47  }
48 
49  /// @return get entity unique dof id
50  inline const UId getEntGlobalUniqueId() const {
51  return this->sPtr->getGlobalUniqueId();
52  }
53 
54  static inline UId getUniqueIdCalculate(const DofIdx dof, UId ent_uid) {
55  return ent_uid | dof;
56  }
57 
58  static inline UId
60  const boost::shared_ptr<FieldEntity> &ent_ptr) {
61  return getUniqueIdCalculate(dof, ent_ptr->getLocalUniqueId());
62  }
63 
64  /// @return get unique dof id
65  inline UId getLocalUniqueId() const {
66  return getUniqueIdCalculate(std::abs(dof), this->sPtr->getLocalUniqueId());
67  }
68 
70  const EntityHandle ent) {
73  }
74 
76  const EntityHandle ent) {
79  }
80 
81  /**
82  * \brief Calculate UId for DOF
83  *
84  * UId is constructed such that all DOFs are ordered by processor, entity,
85  * field and dof index on entity, On entity dofs index is constructed such
86  * that coefficient number and dofs increase with dofs index on entity.
87  *
88  * @param dof dof index on entity
89  * @param ent_ptr pointer to field entity
90  * @return UId
91  */
92  static inline UId
94  const boost::shared_ptr<FieldEntity> &ent_ptr) {
95  return getUniqueIdCalculate(dof, ent_ptr->getGlobalUniqueId());
96  }
97 
98  /// @return get unique dof id
99  inline UId getGlobalUniqueId() const {
100  return getUniqueIdCalculate(std::abs(dof), this->sPtr->getGlobalUniqueId());
101  }
102 
103  /** \brief get short uid it is unique in combination with entity handle
104  *
105  * EntityHandle are controlled by MOAB, which is unique in
106  * MOAB instance. However two MOAB instances, can have attached different
107  * EntityHandles to the same entity.
108  *
109  * Relation between MoAB EntityHandle can be handled by saving entity handle
110  * data into tag, see MB_TYPE_HANDLE. MOAB at time of file reading or
111  * creating new MOAB instance, substitute tag value by approbate entity
112  * handle.
113  *
114  * ShortId is created to handle problems related to saving data series, and
115  * reading those data using different MoAB instances.
116  *
117  */
120  }
121 
122  /// @return get dof entity handle
123  inline EntityHandle getEnt() const { return this->sPtr->getEnt(); }
124 
125  /// @return get dof approximation order
127  return getDofOrderMap()[getEntDofIdx()];
128  }
129 
130  /// @return get dof coefficient index
132  return getEntDofIdx() % getNbOfCoeffs();
133  }
134 
135  /// @return return true if dof us active
136  inline char getActive() const { return dof < 0 ? 0 : 1; }
137 
138  friend std::ostream &operator<<(std::ostream &os, const DofEntity &e);
139 
140 private:
142 
143  friend struct DofEntity_active_change;
144 };
145 
146 /**
147  * \brief Interface to DofEntity
148  *
149  * In MoFEM DOFs classes (and Ent and Finite Element classes) are derived by
150  * interface, i.e. not class is derived but interface to it.
151  *
152  * \ingroup dof_multi_indices
153  */
154 template <typename T>
156 
157  virtual ~interface_DofEntity() = default;
158 
159  interface_DofEntity(const boost::shared_ptr<T> &sptr)
160  : interface_FieldEntity<T>(sptr) {}
161 
162  /// @return return dof unique id
163  inline UId getGlobalUniqueId() const {
164  return this->sPtr->getGlobalUniqueId();
165  }
166 
167  /// @return return entity unique id
168  inline const UId &getEntGlobalUniqueId() const {
169  return this->sPtr->getEntGlobalUniqueId();
170  }
171 
172  /// @return return dof unique id
173  inline UId getLocalUniqueId() const { return this->sPtr->getLocalUniqueId(); }
174 
175  /// @return return entity unique id
176  inline const UId &getEntLocalUniqueId() const {
177  return this->sPtr->getEntLocalUniqueId();
178  }
179 
180  /// @return return short id (used by data recorder)
182  return this->sPtr->getNonNonuniqueShortId();
183  }
184 
185  /// @return return index of dof on the entity
186  inline DofIdx getEntDofIdx() const { return this->sPtr->getEntDofIdx(); }
187 
188  /// @return return data on dof
189  inline FieldData &getFieldData() const { return this->sPtr->getFieldData(); }
190 
191  /// @return return entity handle
192  inline EntityHandle getEnt() const { return this->sPtr->getEnt(); }
193 
194  /// @return get dof approximation order
196  return this->sPtr->getDofOrder();
197  }
198 
199  /// @return get dof coefficient index
201  return this->sPtr->getDofCoeffIdx();
202  }
203 
204  /// @return return true if dof is active
205  inline char getActive() const { return this->sPtr->getActive(); }
206 
207  /// @return get pointer to dof data structure
208  inline boost::shared_ptr<DofEntity> &getDofEntityPtr() const {
209  return this->sPtr;
210  }
211 
212  /// @return get pioneer do dof's entity data structure
213  inline boost::shared_ptr<FieldEntity> &getFieldEntityPtr() const {
214  return this->sPtr->getFieldEntityPtr();
215  }
216 };
217 
218 /**
219  * \brief keeps information about indexed dofs for the problem
220  * \ingroup dof_multi_indices
221  *
222  * FIXME: Is too many iterator, this has to be manage more efficiently, some
223  * iterators could be moved to multi_indices views.
224  *
225  */
226 struct NumeredDofEntity : public interface_DofEntity<DofEntity> {
227 
228  virtual ~NumeredDofEntity() = default;
229 
234 
238  unsigned int pArt;
239 
240  /// @return MoFEM DoF index
241  inline DofIdx getDofIdx() const { return dofIdx; }
242 
243  /// @return PETSc global DoF index
244  inline DofIdx getPetscGlobalDofIdx() const { return petscGloablDofIdx; }
245 
246  /// @return PETSc local DoF index
247  inline DofIdx getPetscLocalDofIdx() const { return petscLocalDofIdx; }
248 
249  /// @return Owning partition (i.e. process/processor)
250  inline unsigned int getPart() const { return pArt; }
251 
252  /// @return True if local index is set
253  inline bool getHasLocalIndex() const {
254  return !std::signbit(petscLocalDofIdx);
255  }
256 
257  NumeredDofEntity(const boost::shared_ptr<DofEntity> &dof_entity_ptr,
258  const int dof_idx = -1, const int petsc_gloabl_dof_idx = -1,
259  const int petsc_local_dof_idx = -1, const int part = -1);
260  friend std::ostream &operator<<(std::ostream &os, const NumeredDofEntity &e);
261 };
262 
263 /**
264  * \brief keeps information about indexed dofs for the finite element
265  * \ingroup dof_multi_indices
266  */
267 struct FEDofEntity : public DofEntity {
268 
269  FEDofEntity() = delete;
270 
271 private:
272  using DofEntity::DofEntity;
273 
274  // DO NOT MAKE ANY MAMBER DATA HARE !!!
275 
276  friend std::ostream &operator<<(std::ostream &os, const FEDofEntity &e);
277 };
278 
279 /**
280  * \brief keeps information about indexed dofs for the finite element
281  * \ingroup dof_multi_indices
282  */
284 
285  FENumeredDofEntity() = delete;
286 
287 private:
289 
290  // DO NOT MAKE ANY MAMBER DATA HARE !!!
291 
292  friend std::ostream &operator<<(std::ostream &os,
293  const FENumeredDofEntity &e);
294 };
295 
296 std::ostream &operator<<(std::ostream &os, const FENumeredDofEntity &e);
297 
298 /**
299  * @relates multi_index_container
300  * \brief MultiIndex container keeps DofEntity
301  * \ingroup dof_multi_indices
302  */
303 typedef multi_index_container<
304  boost::shared_ptr<DofEntity>,
305  indexed_by<
306  // unique
307  ordered_unique<
308  tag<Unique_mi_tag>,
309  const_mem_fun<DofEntity, UId, &DofEntity::getLocalUniqueId>>,
310 
311  // non_unique
312  ordered_non_unique<
313  tag<Ent_mi_tag>,
314  const_mem_fun<DofEntity, EntityHandle, &DofEntity::getEnt>>
315 
316  >>
318 
320 
321 /** \brief Dof multi-index by entity
322  *
323  * \ingroup dof_multi_indices
324  */
326 
327 /** \brief multi-index view on DofEntity by uid
328  \ingroup dof_multi_indices
329 */
331  multi_index_container<boost::shared_ptr<DofEntity>,
332  indexed_by<
333 
334  ordered_unique<const_mem_fun<
336 
337  >>;
338 
339 /** \brief multi-index view on DofEntity by uid
340  \ingroup dof_multi_indices
341 */
342 using DofEntity_multiIndex_global_uid_view = multi_index_container<
343  boost::shared_ptr<DofEntity>,
344  indexed_by<
345 
346  ordered_unique<
347  const_mem_fun<DofEntity, UId, &DofEntity::getGlobalUniqueId>>
348 
349  >>;
350 
351 /** \brief vector view on DofEntity by uid
352  \ingroup dof_multi_indices
353 */
354 typedef std::vector<boost::weak_ptr<DofEntity>> DofEntity_vector_view;
355 
356 /** \brief multi-index view on DofEntity activity
357  \ingroup dof_multi_indices
358 */
359 typedef multi_index_container<
360  boost::shared_ptr<DofEntity>,
361  indexed_by<
362 
363  ordered_unique<
364  const_mem_fun<DofEntity, UId, &DofEntity::getLocalUniqueId>>,
365 
366  ordered_non_unique<
367  const_mem_fun<DofEntity, char, &DofEntity::getActive>>
368 
369  >>
371 
372 /**
373  * @relates multi_index_container
374  * \brief MultiIndex container keeps FEDofEntity
375  * \ingroup dof_multi_indices
376 
377  */
378 typedef multi_index_container<
379  boost::shared_ptr<FEDofEntity>,
380  indexed_by<
381 
382  ordered_unique<tag<Unique_mi_tag>,
383  const_mem_fun<FEDofEntity::DofEntity, UId,
385 
386  ordered_non_unique<tag<Ent_mi_tag>,
387  const_mem_fun<FEDofEntity::DofEntity, EntityHandle,
389 
390  >>
392 
393 /** \brief Dof entity multi-index by UId and entity
394  *
395  * \ingroup dof_multi_indices
396  */
398 
399 /**
400  * @relates multi_index_container
401  * \brief MultiIndex container keeps FENumeredDofEntity
402 
403  * \ingroup dof_multi_indices
404  */
405 typedef multi_index_container<
406  boost::shared_ptr<FENumeredDofEntity>,
407  indexed_by<ordered_unique<
408  tag<Unique_mi_tag>,
411  ordered_non_unique<
412  tag<Ent_mi_tag>,
415 
416  >>
418 
419 /** \brief Dof entity multi-index by UId
420  *
421  * \ingroup dof_multi_indices
422  */
425 
426 /** \brief Numbered DoF multi-index by entity
427  *
428  * \ingroup dof_multi_indices
429  */
432 
433 /**
434  * @relates multi_index_container
435  * \brief MultiIndex container keeps NumeredDofEntity
436  * \ingroup dof_multi_indices
437  */
438 typedef multi_index_container<
439  boost::shared_ptr<NumeredDofEntity>,
440 
441  // unique
442  indexed_by<
443  ordered_unique<tag<Unique_mi_tag>,
446 
447  // non unique
448  ordered_non_unique<
449  tag<Part_mi_tag>,
450  member<NumeredDofEntity, unsigned int, &NumeredDofEntity::pArt>>,
451 
452  ordered_non_unique<tag<Idx_mi_tag>, member<NumeredDofEntity, DofIdx,
454 
455  ordered_non_unique<tag<PetscGlobalIdx_mi_tag>,
456  member<NumeredDofEntity, DofIdx,
458 
459  ordered_non_unique<tag<PetscLocalIdx_mi_tag>,
460  member<NumeredDofEntity, DofIdx,
462 
463  ordered_non_unique<
464  tag<Ent_mi_tag>,
467 
468  >>
470 
471 /** \brief Numbered DoF multi-index by UId
472  *
473  * \ingroup dof_multi_indices
474  */
475 using NumeredDofEntityByUId =
477 
478 /** \brief Numbered DoF multi-index by local index
479  *
480  * \ingroup dof_multi_indices
481  */
484 
485 /** \brief Numbered DoF multi-index by entity
486  *
487  * \ingroup dof_multi_indices
488  */
489 using NumeredDofEntityByEnt =
491 
493  multi_index_container<boost::shared_ptr<NumeredDofEntity>,
494  indexed_by<
495 
496  ordered_unique<const_mem_fun<
497 
500 
501  >>
502 
503  >>;
504 
505 using NumeredDofEntity_multiIndex_idx_view_hashed = multi_index_container<
506  boost::shared_ptr<NumeredDofEntity>,
507  indexed_by<hashed_unique<const_mem_fun<NumeredDofEntity, DofIdx,
509 
511  multi_index_container<boost::shared_ptr<NumeredDofEntity>,
512  indexed_by<ordered_non_unique<const_mem_fun<
515 
517  multi_index_container<
518  boost::shared_ptr<NumeredDofEntity>,
519  indexed_by<ordered_non_unique<const_mem_fun<
522 
523 /**
524  * Activate or deactivate dofs (multi-index modifier)
525  * \ingroup dof_multi_indices
526  */
528  bool aCtive;
529  DofEntity_active_change(bool active);
530  void operator()(boost::shared_ptr<DofEntity> &dof);
531 };
532 
533 /**
534  * Change part and global pestc index (multi-index modifier)
535  * \ingroup dof_multi_indices
536  */
538  const unsigned int pArt;
541  const DofIdx petsc_gloabl_dof_idx)
542  : pArt(part), petscGloablDofIdx(petsc_gloabl_dof_idx){};
543  inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
544  dof->pArt = pArt;
545  dof->petscGloablDofIdx = petscGloablDofIdx;
546  }
547 };
548 
550  const unsigned int pArt;
554  const unsigned int part, const DofIdx mofem_dof_idx,
555  const DofIdx petsc_gloabl_dof_idx)
556  : pArt(part), mofemDofIdx(mofem_dof_idx),
557  petscGloablDofIdx(petsc_gloabl_dof_idx){};
558  inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
559  dof->pArt = pArt;
560  dof->petscGloablDofIdx = petscGloablDofIdx;
561  }
562 };
563 
565  const unsigned int pArt;
569  const DofIdx petsc_gloabl_dof_idx,
570  const DofIdx petsc_local_dof_idx)
571  : pArt(part), petscGloablDofIdx(petsc_gloabl_dof_idx),
572  petscLocalDofIdx(petsc_local_dof_idx){};
573  inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
574  dof->pArt = pArt;
575  dof->petscGloablDofIdx = petscGloablDofIdx;
576  dof->petscLocalDofIdx = petscLocalDofIdx;
577  }
578 };
579 
580 /**
581  * Change part and local pestc index (multi-index modifier)
582  * \ingroup dof_multi_indices
583  */
586  NumeredDofEntity_local_idx_change(const DofIdx petsc_local_dof_idx)
587  : petscLocalDofIdx(petsc_local_dof_idx){};
588  inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
589  dof->petscLocalDofIdx = petscLocalDofIdx;
590  }
591 };
592 
593 /**
594  * Change part and mofem index (multi-index modifier)
595  * \ingroup dof_multi_indices
596  */
600  : mofemIdx(mofem_idx){};
601  inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
602  dof->dofIdx = mofemIdx;
603  }
604 };
605 
606 /**
607  * Change part and mofem/pestc global and local index (multi-index modifier)
608  * \ingroup dof_multi_indices
609  */
611  const unsigned int pArt;
616  const unsigned int part, const DofIdx mofem_idx,
617  const DofIdx petsc_gloabl_dof_idx, const DofIdx petsc_local_dof_idx)
618  : pArt(part), mofemIdx(mofem_idx),
619  petscGloablDofIdx(petsc_gloabl_dof_idx),
620  petscLocalDofIdx(petsc_local_dof_idx){};
621  inline void operator()(boost::shared_ptr<NumeredDofEntity> &dof) const {
622  dof->pArt = pArt;
623  dof->dofIdx = mofemIdx;
624  dof->petscGloablDofIdx = petscGloablDofIdx;
625  dof->petscLocalDofIdx = petscLocalDofIdx;
626  }
627 };
628 
629 } // namespace MoFEM
630 #endif // __DOFSMULTIINDICES_HPP__
631 
632 /**
633  * \defgroup dof_multi_indices Dofs structures and multi-indices
634  * \ingroup mofem
635  **/
MoFEM::DofEntity::DofEntity
DofEntity(const boost::shared_ptr< FieldEntity > &entity_ptr, const ApproximationOrder dof_order, const FieldCoefficientsNumber dof_rank, const DofIdx dof)
Definition: DofsMultiIndices.cpp:10
MoFEM::NumeredDofEntity_part_and_indices_change::NumeredDofEntity_part_and_indices_change
NumeredDofEntity_part_and_indices_change(const unsigned int part, const DofIdx petsc_gloabl_dof_idx, const DofIdx petsc_local_dof_idx)
Definition: DofsMultiIndices.hpp:568
MoFEM::operator<<
std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
Definition: EntitiesFieldData.cpp:240
MoFEM::NumeredDofEntity::petscLocalDofIdx
DofIdx petscLocalDofIdx
Definition: DofsMultiIndices.hpp:237
MoFEM::DofEntity_active_change::aCtive
bool aCtive
Definition: DofsMultiIndices.hpp:528
MoFEM::DofEntity::operator<<
friend std::ostream & operator<<(std::ostream &os, const DofEntity &e)
Definition: DofsMultiIndices.cpp:39
MoFEM::DofEntity::getEnt
EntityHandle getEnt() const
Definition: DofsMultiIndices.hpp:123
MoFEM::DofEntity::getNonNonuniqueShortId
static ShortId getNonNonuniqueShortId(const DofIdx dof, const boost::shared_ptr< FieldEntity > &ent_ptr)
Definition: DofsMultiIndices.hpp:25
MoFEM::NumeredDofEntity_part_and_mofem_glob_idx_change
Definition: DofsMultiIndices.hpp:549
MoFEM::NumeredDofEntity_part_and_indices_change::petscGloablDofIdx
const DofIdx petscGloablDofIdx
Definition: DofsMultiIndices.hpp:566
EntityHandle
MoFEM::NumeredDofEntity::pArt
unsigned int pArt
Definition: DofsMultiIndices.hpp:238
MoFEM::NumeredDofEntity_part_and_glob_idx_change::pArt
const unsigned int pArt
Definition: DofsMultiIndices.hpp:538
MoFEM::interface_DofEntity::getEntGlobalUniqueId
const UId & getEntGlobalUniqueId() const
Definition: DofsMultiIndices.hpp:168
MoFEM::NumeredDofEntity_part_and_indices_change::operator()
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
Definition: DofsMultiIndices.hpp:573
MoFEM::NumeredDofEntityByEnt
NumeredDofEntity_multiIndex::index< Ent_mi_tag >::type NumeredDofEntityByEnt
Numbered DoF multi-index by entity.
Definition: DofsMultiIndices.hpp:490
MoFEM::DofEntity
keeps information about DOF on the entity
Definition: DofsMultiIndices.hpp:16
MoFEM::FieldEntity::getLoFieldEntityUId
static UId getLoFieldEntityUId(const UId &uid)
Definition: FieldEntsMultiIndices.hpp:236
MoFEM::NumeredDofEntity_part_and_glob_idx_change::NumeredDofEntity_part_and_glob_idx_change
NumeredDofEntity_part_and_glob_idx_change(const unsigned int part, const DofIdx petsc_gloabl_dof_idx)
Definition: DofsMultiIndices.hpp:540
MoFEM::NumeredDofEntity_part_and_indices_change::petscLocalDofIdx
const DofIdx petscLocalDofIdx
Definition: DofsMultiIndices.hpp:567
MoFEM::NumeredDofEntity::getPetscLocalDofIdx
DofIdx getPetscLocalDofIdx() const
Definition: DofsMultiIndices.hpp:247
MoFEM::DofEntity::getUniqueIdCalculate
static UId getUniqueIdCalculate(const DofIdx dof, UId ent_uid)
Definition: DofsMultiIndices.hpp:54
MoFEM::NumeredDofEntity_part_and_mofem_glob_idx_change::mofemDofIdx
const DofIdx mofemDofIdx
Definition: DofsMultiIndices.hpp:551
MoFEM::FENumeredDofEntity
keeps information about indexed dofs for the finite element
Definition: DofsMultiIndices.hpp:283
MoFEM::NumeredDofEntity_part_and_indices_change
Definition: DofsMultiIndices.hpp:564
MoFEM::FENumeredDofEntity::operator<<
friend std::ostream & operator<<(std::ostream &os, const FENumeredDofEntity &e)
Definition: DofsMultiIndices.cpp:93
MoFEM::NumeredDofEntity_part_and_all_indices_change::mofemIdx
const DofIdx mofemIdx
Definition: DofsMultiIndices.hpp:612
MoFEM::DofEntity_vector_view
std::vector< boost::weak_ptr< DofEntity > > DofEntity_vector_view
vector view on DofEntity by uid
Definition: DofsMultiIndices.hpp:354
MoFEM::DofEntity::getDofCoeffIdx
FieldCoefficientsNumber getDofCoeffIdx() const
Definition: DofsMultiIndices.hpp:131
MoFEM::NumeredDofEntity_part_and_glob_idx_change
Definition: DofsMultiIndices.hpp:537
MoFEM::NumeredDofEntity::dofIdx
DofIdx dofIdx
Definition: DofsMultiIndices.hpp:235
MoFEM::NumeredDofEntity::interface_type_DofEntity
interface_DofEntity< DofEntity > interface_type_DofEntity
Definition: DofsMultiIndices.hpp:232
MoFEM::NumeredDofEntity_part_and_all_indices_change
Definition: DofsMultiIndices.hpp:610
MoFEM::DofEntity::~DofEntity
virtual ~DofEntity()=default
MoFEM::interface_RefEntity< FieldEntity >::sPtr
boost::shared_ptr< FieldEntity > sPtr
Definition: RefEntsMultiIndices.hpp:711
MoFEM::NumeredDofEntity_part_and_mofem_glob_idx_change::pArt
const unsigned int pArt
Definition: DofsMultiIndices.hpp:550
MoFEM::DofEntity::getEntDofIdx
DofIdx getEntDofIdx() const
Definition: DofsMultiIndices.hpp:36
MoFEM::NumeredDofEntity::getPart
unsigned int getPart() const
Definition: DofsMultiIndices.hpp:250
MoFEM::DofEntity_active_change
Definition: DofsMultiIndices.hpp:527
MoFEM::interface_FieldEntity
Interface to FieldEntity.
Definition: FieldEntsMultiIndices.hpp:319
MoFEM::NumeredDofEntityByLocalIdx
NumeredDofEntity_multiIndex::index< PetscLocalIdx_mi_tag >::type NumeredDofEntityByLocalIdx
Numbered DoF multi-index by local index.
Definition: DofsMultiIndices.hpp:483
MoFEM::DofEntity::getGlobalUniqueIdCalculate
static UId getGlobalUniqueIdCalculate(const DofIdx dof, const boost::shared_ptr< FieldEntity > &ent_ptr)
Calculate UId for DOF.
Definition: DofsMultiIndices.hpp:93
MoFEM::DofEntity_active_change::DofEntity_active_change
DofEntity_active_change(bool active)
Definition: DofsMultiIndices.cpp:47
MoFEM::FENumeredDofEntityByEnt
FENumeredDofEntity_multiIndex::index< Ent_mi_tag >::type FENumeredDofEntityByEnt
Numbered DoF multi-index by entity.
Definition: DofsMultiIndices.hpp:431
MoFEM::FEDofEntityByUId
FEDofEntity_multiIndex::index< Unique_mi_tag >::type FEDofEntityByUId
Dof entity multi-index by UId and entity.
Definition: DofsMultiIndices.hpp:397
MoFEM::NumeredDofEntity::operator<<
friend std::ostream & operator<<(std::ostream &os, const NumeredDofEntity &e)
Definition: DofsMultiIndices.cpp:77
MoFEM::interface_RefEntity< FieldEntity >
MoFEM::DofEntityByUId
DofEntity_multiIndex::index< Unique_mi_tag >::type DofEntityByUId
Definition: DofsMultiIndices.hpp:319
MoFEM::FieldEntity::getHiFieldEntityUId
static UId getHiFieldEntityUId(const UId &uid)
Definition: FieldEntsMultiIndices.hpp:240
MoFEM::NumeredDofEntity_part_and_mofem_glob_idx_change::petscGloablDofIdx
const DofIdx petscGloablDofIdx
Definition: DofsMultiIndices.hpp:552
MoFEM::DofEntity_multiIndex_active_view
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > >, ordered_non_unique< const_mem_fun< DofEntity, char, &DofEntity::getActive > > > > DofEntity_multiIndex_active_view
multi-index view on DofEntity activity
Definition: DofsMultiIndices.hpp:370
MoFEM::DofEntity_multiIndex_uid_view
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > > > > DofEntity_multiIndex_uid_view
multi-index view on DofEntity by uid
Definition: DofsMultiIndices.hpp:337
MoFEM::NumeredDofEntity_part_and_indices_change::pArt
const unsigned int pArt
Definition: DofsMultiIndices.hpp:565
MoFEM::NumeredDofEntity_part_and_mofem_glob_idx_change::NumeredDofEntity_part_and_mofem_glob_idx_change
NumeredDofEntity_part_and_mofem_glob_idx_change(const unsigned int part, const DofIdx mofem_dof_idx, const DofIdx petsc_gloabl_dof_idx)
Definition: DofsMultiIndices.hpp:553
MoFEM::NumeredDofEntity_multiIndex_petsc_local_dof_view_ordered_non_unique
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_non_unique< const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getPetscLocalDofIdx > >> > NumeredDofEntity_multiIndex_petsc_local_dof_view_ordered_non_unique
Definition: DofsMultiIndices.hpp:514
MoFEM::interface_DofEntity::getNonNonuniqueShortId
ShortId getNonNonuniqueShortId() const
Definition: DofsMultiIndices.hpp:181
NumeredDofEntity_multiIndex
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, UId, &NumeredDofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Part_mi_tag >, member< NumeredDofEntity, unsigned int, &NumeredDofEntity::pArt > >, ordered_non_unique< tag< Idx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::dofIdx > >, ordered_non_unique< tag< PetscGlobalIdx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::petscGloablDofIdx > >, ordered_non_unique< tag< PetscLocalIdx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::petscLocalDofIdx > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle, &NumeredDofEntity::getEnt > > > > NumeredDofEntity_multiIndex
MultiIndex container keeps NumeredDofEntity.
Definition: DofsMultiIndices.hpp:469
MoFEM::NumeredDofEntityByUId
NumeredDofEntity_multiIndex::index< Unique_mi_tag >::type NumeredDofEntityByUId
Numbered DoF multi-index by UId.
Definition: DofsMultiIndices.hpp:476
MoFEM::FEDofEntity::FEDofEntity
FEDofEntity()=delete
MoFEM::interface_DofEntity::getDofCoeffIdx
FieldCoefficientsNumber getDofCoeffIdx() const
Definition: DofsMultiIndices.hpp:200
MoFEM::DofEntity::getLocalUniqueIdCalculate
static UId getLocalUniqueIdCalculate(const DofIdx dof, const boost::shared_ptr< FieldEntity > &ent_ptr)
Definition: DofsMultiIndices.hpp:59
MoFEM::interface_FieldEntity< FieldEntity >::getFieldEntityPtr
boost::shared_ptr< FieldEntity > & getFieldEntityPtr() const
Definition: FieldEntsMultiIndices.hpp:363
MoFEM::interface_DofEntity::~interface_DofEntity
virtual ~interface_DofEntity()=default
MoFEM::NumeredDofEntity_mofem_index_change::operator()
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
Definition: DofsMultiIndices.hpp:601
MoFEM::NumeredDofEntity_local_idx_change::NumeredDofEntity_local_idx_change
NumeredDofEntity_local_idx_change(const DofIdx petsc_local_dof_idx)
Definition: DofsMultiIndices.hpp:586
MoFEM::NumeredDofEntity
keeps information about indexed dofs for the problem
Definition: DofsMultiIndices.hpp:226
MoFEM::NumeredDofEntity_local_idx_change
Definition: DofsMultiIndices.hpp:584
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::interface_DofEntity::getDofEntityPtr
boost::shared_ptr< DofEntity > & getDofEntityPtr() const
Definition: DofsMultiIndices.hpp:208
MoFEM::Types::ShortId
int ShortId
Unique Id in the field.
Definition: Types.hpp:32
MoFEM::DofEntity::getDofOrder
ApproximationOrder getDofOrder() const
Definition: DofsMultiIndices.hpp:126
MoFEM::DofEntity::dof
DofIdx dof
Definition: DofsMultiIndices.hpp:141
MoFEM::Types::UId
uint128_t UId
Unique Id.
Definition: Types.hpp:31
MoFEM::DofEntity::getLocalUniqueId
UId getLocalUniqueId() const
Definition: DofsMultiIndices.hpp:65
double
bit
auto bit
set bit
Definition: hanging_node_approx.cpp:75
MoFEM::Types::FieldCoefficientsNumber
int FieldCoefficientsNumber
Number of field coefficients.
Definition: Types.hpp:27
MoFEM::interface_FieldImpl< FieldEntity, FieldEntity >
convert.type
type
Definition: convert.py:64
MoFEM::FieldEntity::getLocalUniqueIdCalculate
UId getLocalUniqueIdCalculate()
Get the Local Unique Id Calculate object.
Definition: FieldEntsMultiIndices.hpp:136
MoFEM::FENumeredDofEntityByUId
FENumeredDofEntity_multiIndex::index< Unique_mi_tag >::type FENumeredDofEntityByUId
Dof entity multi-index by UId.
Definition: DofsMultiIndices.hpp:424
MoFEM::interface_DofEntity::getEnt
EntityHandle getEnt() const
Definition: DofsMultiIndices.hpp:192
MoFEM::NumeredDofEntity::petscGloablDofIdx
DofIdx petscGloablDofIdx
Definition: DofsMultiIndices.hpp:236
MoFEM::NumeredDofEntity_multiIndex_uid_view_ordered
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, UId, &NumeredDofEntity::getLocalUniqueId > > > > NumeredDofEntity_multiIndex_uid_view_ordered
Definition: DofsMultiIndices.hpp:503
MoFEM::NumeredDofEntity_mofem_index_change::NumeredDofEntity_mofem_index_change
NumeredDofEntity_mofem_index_change(const DofIdx mofem_idx)
Definition: DofsMultiIndices.hpp:599
MoFEM::NumeredDofEntity_part_and_all_indices_change::petscGloablDofIdx
const DofIdx petscGloablDofIdx
Definition: DofsMultiIndices.hpp:613
MoFEM::NumeredDofEntity::getHasLocalIndex
bool getHasLocalIndex() const
Definition: DofsMultiIndices.hpp:253
MoFEM::FEDofEntity::operator<<
friend std::ostream & operator<<(std::ostream &os, const FEDofEntity &e)
Definition: DofsMultiIndices.cpp:84
MoFEM::NumeredDofEntity::getDofIdx
DofIdx getDofIdx() const
Definition: DofsMultiIndices.hpp:241
MoFEM::NumeredDofEntity::getPetscGlobalDofIdx
DofIdx getPetscGlobalDofIdx() const
Definition: DofsMultiIndices.hpp:244
MoFEM::NumeredDofEntity_mofem_index_change
Definition: DofsMultiIndices.hpp:597
MoFEM::DofEntity_active_change::operator()
void operator()(boost::shared_ptr< DofEntity > &dof)
Definition: DofsMultiIndices.cpp:49
MoFEM::NumeredDofEntity_part_and_glob_idx_change::petscGloablDofIdx
const DofIdx petscGloablDofIdx
Definition: DofsMultiIndices.hpp:539
MoFEM::DofEntity::getActive
char getActive() const
Definition: DofsMultiIndices.hpp:136
MoFEM::NumeredDofEntity::~NumeredDofEntity
virtual ~NumeredDofEntity()=default
MoFEM::FENumeredDofEntity::FENumeredDofEntity
FENumeredDofEntity()=delete
MoFEM::interface_Field< FieldEntity, FieldEntity >::getNbOfCoeffs
FieldCoefficientsNumber getNbOfCoeffs() const
Definition: FieldMultiIndices.hpp:381
MoFEM::interface_DofEntity::getLocalUniqueId
UId getLocalUniqueId() const
Definition: DofsMultiIndices.hpp:173
MoFEM::DofEntity::getNonNonuniqueShortId
ShortId getNonNonuniqueShortId() const
get short uid it is unique in combination with entity handle
Definition: DofsMultiIndices.hpp:118
MoFEM::DofEntity_multiIndex_global_uid_view
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getGlobalUniqueId > > > > DofEntity_multiIndex_global_uid_view
multi-index view on DofEntity by uid
Definition: DofsMultiIndices.hpp:349
MoFEM::DofEntity::getLoFieldEntityUId
static UId getLoFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
Definition: DofsMultiIndices.hpp:69
MoFEM::NumeredDofEntity::NumeredDofEntity
NumeredDofEntity(const boost::shared_ptr< DofEntity > &dof_entity_ptr, const int dof_idx=-1, const int petsc_gloabl_dof_idx=-1, const int petsc_local_dof_idx=-1, const int part=-1)
Definition: DofsMultiIndices.cpp:66
MoFEM::interface_DofEntity::getFieldData
FieldData & getFieldData() const
Definition: DofsMultiIndices.hpp:189
MoFEM::NumeredDofEntity_local_idx_change::petscLocalDofIdx
const DofIdx petscLocalDofIdx
Definition: DofsMultiIndices.hpp:585
MoFEM::interface_DofEntity::getFieldEntityPtr
boost::shared_ptr< FieldEntity > & getFieldEntityPtr() const
Definition: DofsMultiIndices.hpp:213
FEDofEntity_multiIndex
multi_index_container< boost::shared_ptr< FEDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< FEDofEntity::DofEntity, UId, &FEDofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FEDofEntity::DofEntity, EntityHandle, &FEDofEntity::getEnt > > > > FEDofEntity_multiIndex
MultiIndex container keeps FEDofEntity.
Definition: DofsMultiIndices.hpp:391
MoFEM::Types::ApproximationOrder
int ApproximationOrder
Approximation on the entity.
Definition: Types.hpp:26
MoFEM::interface_DofEntity::getDofOrder
ApproximationOrder getDofOrder() const
Definition: DofsMultiIndices.hpp:195
MoFEM::DofEntity::getHiFieldEntityUId
static UId getHiFieldEntityUId(const FieldBitNumber bit, const EntityHandle ent)
Definition: DofsMultiIndices.hpp:75
MoFEM::NumeredDofEntity_part_and_all_indices_change::operator()
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
Definition: DofsMultiIndices.hpp:621
MoFEM::NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_non_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, FieldCoefficientsNumber, &NumeredDofEntity::getDofCoeffIdx > >> > NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique
Definition: DofsMultiIndices.hpp:521
MoFEM::interface_DofEntity::interface_DofEntity
interface_DofEntity(const boost::shared_ptr< T > &sptr)
Definition: DofsMultiIndices.hpp:159
MoFEM::DofEntity::getEntGlobalUniqueId
const UId getEntGlobalUniqueId() const
Definition: DofsMultiIndices.hpp:50
MoFEM::NumeredDofEntity_mofem_index_change::mofemIdx
const DofIdx mofemIdx
Definition: DofsMultiIndices.hpp:598
MoFEM::Types::FieldBitNumber
char FieldBitNumber
Field bit number.
Definition: Types.hpp:28
MoFEM::DofEntityByEnt
DofEntity_multiIndex::index< Ent_mi_tag >::type DofEntityByEnt
Dof multi-index by entity.
Definition: DofsMultiIndices.hpp:325
MoFEM::DofEntity::getEntLocalUniqueId
const UId & getEntLocalUniqueId() const
Definition: DofsMultiIndices.hpp:45
MoFEM::NumeredDofEntity_part_and_glob_idx_change::operator()
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
Definition: DofsMultiIndices.hpp:543
MoFEM::interface_DofEntity::getGlobalUniqueId
UId getGlobalUniqueId() const
Definition: DofsMultiIndices.hpp:163
MoFEM::DofEntity::getGlobalUniqueId
UId getGlobalUniqueId() const
Definition: DofsMultiIndices.hpp:99
MoFEM::NumeredDofEntity_part_and_all_indices_change::NumeredDofEntity_part_and_all_indices_change
NumeredDofEntity_part_and_all_indices_change(const unsigned int part, const DofIdx mofem_idx, const DofIdx petsc_gloabl_dof_idx, const DofIdx petsc_local_dof_idx)
Definition: DofsMultiIndices.hpp:615
MoFEM::NumeredDofEntity_part_and_all_indices_change::pArt
const unsigned int pArt
Definition: DofsMultiIndices.hpp:611
MoFEM::NumeredDofEntity_local_idx_change::operator()
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
Definition: DofsMultiIndices.hpp:588
MoFEM::NumeredDofEntity_part_and_all_indices_change::petscLocalDofIdx
const DofIdx petscLocalDofIdx
Definition: DofsMultiIndices.hpp:614
DofEntity_multiIndex
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt > > > > DofEntity_multiIndex
MultiIndex container keeps DofEntity.
Definition: DofsMultiIndices.hpp:317
MoFEM::NumeredDofEntity_multiIndex_idx_view_hashed
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< hashed_unique< const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getDofIdx > >> > NumeredDofEntity_multiIndex_idx_view_hashed
Definition: DofsMultiIndices.hpp:508
MoFEM::FEDofEntity
keeps information about indexed dofs for the finite element
Definition: DofsMultiIndices.hpp:267
MoFEM::interface_FieldEntity< 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
FENumeredDofEntity_multiIndex
multi_index_container< boost::shared_ptr< FENumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, UId, &FENumeredDofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, EntityHandle, &FENumeredDofEntity::getEnt > > > > FENumeredDofEntity_multiIndex
MultiIndex container keeps FENumeredDofEntity.
Definition: DofsMultiIndices.hpp:417
MoFEM::NumeredDofEntity_part_and_mofem_glob_idx_change::operator()
void operator()(boost::shared_ptr< NumeredDofEntity > &dof) const
Definition: DofsMultiIndices.hpp:558
MoFEM::interface_DofEntity::getEntLocalUniqueId
const UId & getEntLocalUniqueId() const
Definition: DofsMultiIndices.hpp:176
MoFEM::interface_DofEntity
Interface to DofEntity.
Definition: DofsMultiIndices.hpp:155
MoFEM::DofEntity::getFieldData
FieldData & getFieldData() const
Definition: DofsMultiIndices.hpp:39
MoFEM::interface_DofEntity::getEntDofIdx
DofIdx getEntDofIdx() const
Definition: DofsMultiIndices.hpp:186
MoFEM::Types::DofIdx
int DofIdx
Index of DOF.
Definition: Types.hpp:18
MoFEM::interface_DofEntity::getActive
char getActive() const
Definition: DofsMultiIndices.hpp:205