v0.14.0
RefEntsMultiIndices.hpp
Go to the documentation of this file.
1 /** \file RefEntsMultiIndices.hpp
2  * \brief Multi-index contains, for mofem entities data structures and other
3  * low-level functions
4  */
5 
6 
7 
8 #ifndef __REF_ENTSMULTIINDICES_HPP__
9 #define __REF_ENTSMULTIINDICES_HPP__
10 
11 namespace MoFEM {
12 
13 template <EntityType TYPE> inline EntityHandle get_id_for_max_type() {
14  return (static_cast<EntityHandle>(TYPE) << MB_ID_WIDTH) |
15  (~static_cast<EntityHandle>(MB_TYPE_MASK));
16 };
17 
18 template <EntityType TYPE> inline EntityHandle get_id_for_min_type() {
19  return (static_cast<EntityHandle>(TYPE) << MB_ID_WIDTH);
20 };
21 
22 inline EntityHandle get_id_for_max_type(const EntityType type) {
23  return (static_cast<EntityHandle>(type) << MB_ID_WIDTH) |
24  (~static_cast<EntityHandle>(MB_TYPE_MASK));
25 };
26 
27 inline EntityHandle get_id_for_min_type(const EntityType type) {
28  return (static_cast<EntityHandle>(type) << MB_ID_WIDTH);
29 };
30 
31 /**
32  * @brief Get the tag ptr object
33  *
34  * @param moab
35  * @param th
36  * @param ent
37  * @param tag_size
38  * @return void*
39  */
40 inline void *get_tag_ptr(moab::Interface &moab, Tag th, EntityHandle ent,
41  int *tag_size) {
42  void *ret_val;
43  rval = moab.tag_get_by_ptr(th, &ent, 1, (const void **)&ret_val, tag_size);
44  if (rval != MB_SUCCESS) {
45  if (tag_size)
46  *tag_size = 0;
47  return NULL;
48  } else {
49  return ret_val;
50  }
51 }
52 
53 /**
54  * \brief keeps information about side number for the finite element
55  * \ingroup ent_multi_indices
56  */
57 struct /*__attribute__((__packed__))*/ SideNumber {
59  signed char side_number;
60  signed char sense;
61  signed char offset;
62  signed char brother_side_number;
63 
64  inline EntityType getEntType() const {
65  return static_cast<EntityType>((ent & MB_TYPE_MASK) >> MB_ID_WIDTH);
66  }
67 
68  inline int getEntDimension() const {
69  return moab::CN::Dimension(getEntType());
70  }
71 
72  inline const char *getEntTypeName() const {
73  return moab::CN::EntityTypeName(getEntType());
74  }
75 
78  brother_side_number(-1) {}
79 };
80 
81 /**
82  * @relates multi_index_container
83  * \brief SideNumber_multiIndex for SideNumber
84  * \ingroup ent_multi_indices
85  *
86  */
87 typedef multi_index_container<
88  boost::shared_ptr<SideNumber>,
89  indexed_by<
90  ordered_unique<member<SideNumber, EntityHandle, &SideNumber::ent>>,
91  ordered_non_unique<
92 
93  composite_key<
94  SideNumber,
95  const_mem_fun<SideNumber, EntityType, &SideNumber::getEntType>,
96  member<SideNumber, signed char, &SideNumber::side_number>
97 
98  >>
99 
100  >>
102 
103 /**
104  * \brief PipelineManager data. like access to moab interface and basic tag
105  * handlers.
106  */
109  int pcommID;
113  BasicEntityData(const moab::Interface &mfield,
114  const int pcomm_id = MYPCOMM_INDEX);
115  virtual ~BasicEntityData() = default;
116 };
117 
118 template <int N> struct RefEntityTmp : public RefEntityTmp<N - 1> {
119 
120  using RefEntityTmp<N - 1>::RefEntityTmp;
121 
122  virtual const boost::shared_ptr<BasicEntityData> getBasicDataPtr() const {
123  if (auto ptr = basicDataPtr.lock())
124  return ptr;
125  else
126  return nullptr;
127  }
128 
129  static boost::weak_ptr<BasicEntityData> basicDataPtr;
130 };
131 
132 template <int N> boost::weak_ptr<BasicEntityData> RefEntityTmp<N>::basicDataPtr;
133 
134 struct RefElement;
135 
136 /**
137 * \brief Struct keeps handle to refined handle.
138 * \ingroup ent_multi_indices
139 
140 */
141 template <> struct RefEntityTmp<0> {
142 
143  RefEntityTmp(const boost::shared_ptr<BasicEntityData> &basic_data_ptr,
144  const EntityHandle ent);
145 
146  RefEntityTmp(const boost::shared_ptr<BasicEntityData> &basic_data_ptr,
147  const EntityHandle ent, EntityHandle *ent_parent_tag_ptr);
148 
149  virtual ~RefEntityTmp() = default;
150 
151  /**
152  * @brief Get pointer to basic data struture
153  *
154  * @return const boost::shared_ptr<BasicEntityData>
155  */
156  virtual const boost::shared_ptr<BasicEntityData> getBasicDataPtr() const {
157  if (auto ptr = basicDataPtr.lock())
158  return ptr;
159  else
160  return nullptr;
161  }
162 
163  int getSideNumber() const;
164 
165  /**
166  * @brief Get the Side number
167  *
168  * @return int
169  */
170  boost::shared_ptr<SideNumber> getSideNumberPtr() const;
171 
172  /**
173  * @brief Get the entity handle
174  *
175  * @return EntityHandle
176  */
177  inline EntityHandle getEnt() const { return this->ent; }
178 
179  /** \brief Get entity type
180  */
181  inline EntityType getEntType() const {
182  return type_from_handle(this->ent);
183  }
184 
185  /**
186  * @brief Get the Ent Dimension
187  *
188  * @return int
189  */
190  inline int getEntDimension() const {
191  return dimension_from_handle(this->ent);
192  }
193 
194  /**
195  * @brief Get the Ent Type Name
196  *
197  * @return const char*
198  */
199  inline const char *getEntTypeName() const {
200  return type_name_from_handle(this->ent);
201  }
202 
203  /** \brief get entity id
204  */
205  inline EntityID getEntId() const { return id_from_handle(this->ent); }
206 
207  static inline EntityHandle
209  boost::shared_ptr<BasicEntityData> basic_ent_data) {
210  auto *pcomm =
211  ParallelComm::get_pcomm(&basic_ent_data->moab, basic_ent_data->pcommID);
212 
213  auto get_owner_ent = [&](auto tag) {
214  if (auto owner_ent_ptr = static_cast<EntityHandle *>(
215  MoFEM::get_tag_ptr(basic_ent_data->moab, tag, ent, NULL))) {
216  return owner_ent_ptr[0];
217  } else {
218  return ent;
219  }
220  };
221 
222  if (auto pstat_ptr = static_cast<unsigned char *>(MoFEM::get_tag_ptr(
223  basic_ent_data->moab, pcomm->pstatus_tag(), ent, NULL))) {
224  if (!(*pstat_ptr & PSTATUS_NOT_OWNED)) {
225  return ent;
226  } else if (*pstat_ptr & PSTATUS_MULTISHARED) {
227  return get_owner_ent(pcomm->sharedhs_tag());
228  } else if (*pstat_ptr & PSTATUS_SHARED) {
229  return get_owner_ent(pcomm->sharedh_tag());
230  } else {
231  return ent;
232  }
233  } else {
234  return ent;
235  }
236  }
237 
238  /** \brief Owner handle on this or other processors
239  */
240  inline EntityHandle getOwnerEnt() const {
241  return getOwnerEnt(this->ent, this->getBasicDataPtr());
242  }
243 
244  static inline int
246  boost::shared_ptr<BasicEntityData> basic_ent_data) {
247  auto *pcomm =
248  ParallelComm::get_pcomm(&basic_ent_data->moab, basic_ent_data->pcommID);
249 
250  auto get_owner_proc = [&](auto tag) {
251  if (auto owner_proc = static_cast<int *>(
252  MoFEM::get_tag_ptr(basic_ent_data->moab, tag, ent, NULL))) {
253  return owner_proc[0];
254  } else {
255  return 0;
256  }
257  };
258 
259  if (auto pstat_ptr = static_cast<unsigned char *>(MoFEM::get_tag_ptr(
260  basic_ent_data->moab, pcomm->pstatus_tag(), ent, NULL))) {
261  if (!(*pstat_ptr & PSTATUS_NOT_OWNED)) {
262  return pcomm->rank();
263  } else if (*pstat_ptr & PSTATUS_MULTISHARED) {
264  return get_owner_proc(pcomm->sharedps_tag());
265  } else if (*pstat_ptr & PSTATUS_SHARED) {
266  return get_owner_proc(pcomm->sharedp_tag());
267  } else {
268  return 0;
269  }
270  } else {
271  return 0;
272  }
273  }
274 
275  inline int getOwnerProc() const {
276  return getOwnerProc(this->ent, this->getBasicDataPtr());
277  }
278 
279  static inline int
280  getPartProc(const EntityHandle ent, const Tag th,
281  const boost::shared_ptr<BasicEntityData> &basic_ptr) {
282  if (auto part_ptr = static_cast<int *>(
283  MoFEM::get_tag_ptr(basic_ptr->moab, th, ent, NULL))) {
284  return *part_ptr >= 0 ? *part_ptr : 0;
285  } else
286  return 0;
287  };
288 
289  /** \brief Get processor
290  */
291  inline int getPartProc() const {
292  if (PetscUnlikely(getEntType() == MBENTITYSET)) {
293  return getPartProc(ent, this->getBasicDataPtr()->th_MeshsetPart,
294  this->getBasicDataPtr());
295  } else {
296  auto *pcomm = ParallelComm::get_pcomm(&this->getBasicDataPtr()->moab,
297  this->getBasicDataPtr()->pcommID);
298  return getPartProc(ent, pcomm->partition_tag(), this->getBasicDataPtr());
299  }
300  }
301 
302  /**
303  * @brief Get pointer to partition tag
304  *
305  * @return int*
306  */
307  inline int *getPartProcPtr() const {
308  if (PetscUnlikely(getEntType() == MBENTITYSET)) {
309  return static_cast<int *>(MoFEM::get_tag_ptr(
310  this->getBasicDataPtr()->moab,
311  this->getBasicDataPtr()->th_MeshsetPart, ent, NULL));
312  } else {
313  auto *pcomm = ParallelComm::get_pcomm(&this->getBasicDataPtr()->moab,
314  this->getBasicDataPtr()->pcommID);
315  return static_cast<int *>(MoFEM::get_tag_ptr(
316  this->getBasicDataPtr()->moab, pcomm->partition_tag(), ent, NULL));
317  }
318  }
319 
320  /** \brief get pstatus
321  * This tag stores various aspects of parallel status in bits; see also
322  * define following, to be used in bit mask operations. If an entity is
323  * not shared with any other processors, the pstatus is 0, otherwise it's >
324  * 0
325  *
326  * bit 0: !owned (0=owned, 1=not owned)
327  * bit 1: shared (0=not shared, 1=shared)
328  * bit 2: multishared (shared by > 2 procs; 0=not shared, 1=shared)
329  * bit 3: interface (0=not interface, 1=interface)
330  * bit 4: ghost (0=not ghost, 1=ghost)
331  *
332  */
333  inline unsigned char getPStatus() const {
334  auto *pcomm = ParallelComm::get_pcomm(&this->getBasicDataPtr()->moab,
335  this->getBasicDataPtr()->pcommID);
336  if (auto pstat_ptr = static_cast<unsigned char *>(MoFEM::get_tag_ptr(
337  this->getBasicDataPtr()->moab, pcomm->pstatus_tag(), ent, NULL))) {
338  return *pstat_ptr;
339  } else {
340  return 0;
341  }
342  }
343 
344  /** \brief get shared processors
345 
346  Returning list to shared processors. Lists end with -1. Returns NULL if not
347  sharing processors.
348 
349  DO NOT MODIFY LIST.
350 
351  \code
352  BasicEntity *ent_ptr = BasicEntity(moab,entity_handle);
353  for(int proc = 0; proc<MAX_SHARING_PROCS && -1 !=
354  ent_ptr->getSharingProcsPtr[proc]; proc++) {
355  if(ent_ptr->getSharingProcsPtr[proc] == -1) {
356  // End of the list
357  break;
358  }
359  int sharing_proc = ent_ptr->getSharingProcsPtr[proc];
360  EntityHandle sharing_ent = ent_ptr->getSharingHandlersPtr[proc];
361  if(!(ent_ptr->getPStatus()&PSTATUS_MULTISHARED)) {
362  break;
363  }
364  }
365  \endcode
366 
367  */
368  int *getSharingProcsPtr() const {
369  auto &moab = this->getBasicDataPtr()->moab;
370  int *sharing_procs_ptr = NULL;
371  ParallelComm *pcomm =
372  ParallelComm::get_pcomm(&moab, this->getBasicDataPtr()->pcommID);
373  if (getPStatus() & PSTATUS_MULTISHARED) {
374  // entity is multi shared
375  rval = moab.tag_get_by_ptr(pcomm->sharedps_tag(), &this->ent, 1,
376  (const void **)&sharing_procs_ptr);
377  MOAB_THROW(rval);
378  } else if (getPStatus() & PSTATUS_SHARED) {
379  // shared
380  rval = moab.tag_get_by_ptr(pcomm->sharedp_tag(), &this->ent, 1,
381  (const void **)&sharing_procs_ptr);
382  MOAB_THROW(rval);
383  }
384  return sharing_procs_ptr;
385  }
386 
387  /** \brief get sharid entity handlers
388 
389  Returning list to shared entity handlers. Use it with getSharingProcsPtr()
390 
391  DO NOT MODIFY LIST.
392 
393  \code
394  BasicEntity *ent_ptr = BasicEntity(moab,entity_handle);
395  for(int proc = 0; proc<MAX_SHARING_PROCS && -1 !=
396  ent_ptr->getSharingProcsPtr[proc]; proc++) {
397  if(ent_ptr->getSharingProcsPtr[proc] == -1) {
398  // End of the list
399  break;
400  }
401  int sharing_proc = ent_ptr->getSharingProcsPtr[proc];
402  EntityHandle sharing_ent = ent_ptr->getSharingHandlersPtr[proc];
403  if(!(ent_ptr->getPStatus()&PSTATUS_MULTISHARED)) {
404  break;
405  }
406  }
407  \endcode
408 
409  */
411  EntityHandle *sharing_handlers_ptr = NULL;
412  auto &moab = this->getBasicDataPtr()->moab;
413  ParallelComm *pcomm =
414  ParallelComm::get_pcomm(&moab, this->getBasicDataPtr()->pcommID);
415  if (getPStatus() & PSTATUS_MULTISHARED) {
416  // entity is multi shared
417  rval = moab.tag_get_by_ptr(pcomm->sharedhs_tag(), &this->ent, 1,
418  (const void **)&sharing_handlers_ptr);
419  MOAB_THROW(rval);
420  } else if (getPStatus() & PSTATUS_SHARED) {
421  // shared
422  rval = moab.tag_get_by_ptr(pcomm->sharedh_tag(), &this->ent, 1,
423  (const void **)&sharing_handlers_ptr);
424  MOAB_THROW(rval);
425  }
426  return sharing_handlers_ptr;
427  }
428 
429  static MoFEMErrorCode getParentEnt(Interface &moab, Range ents,
430  std::vector<EntityHandle> vec_patent_ent);
431 
432  static MoFEMErrorCode
434  std::vector<BitRefLevel> &vec_bit_ref_level) {
436  Tag th_ref_bit_level;
437  CHKERR moab.tag_get_handle("_RefBitLevel", th_ref_bit_level);
438  vec_bit_ref_level.resize(ents.size());
439  CHKERR moab.tag_get_data(th_ref_bit_level, ents,
440  &*vec_bit_ref_level.begin());
442  }
443 
444  static MoFEMErrorCode
446  std::vector<const BitRefLevel *> &vec_ptr_bit_ref_level) {
448  Tag th_ref_bit_level;
449  CHKERR moab.tag_get_handle("_RefBitLevel", th_ref_bit_level);
450  vec_ptr_bit_ref_level.resize(ents.size());
451  CHKERR moab.tag_get_by_ptr(
452  th_ref_bit_level, ents,
453  reinterpret_cast<const void **>(&*vec_ptr_bit_ref_level.begin()));
455  }
456 
457  static MoFEMErrorCode
458  getBitRefLevel(Interface &moab, std::vector<EntityHandle> &ents,
459  std::vector<const BitRefLevel *> &vec_ptr_bit_ref_level) {
461  Tag th_ref_bit_level;
462  CHKERR moab.tag_get_handle("_RefBitLevel", th_ref_bit_level);
463  vec_ptr_bit_ref_level.resize(ents.size());
464  CHKERR moab.tag_get_by_ptr(
465  th_ref_bit_level, &*ents.begin(), ents.size(),
466  reinterpret_cast<const void **>(&*vec_ptr_bit_ref_level.begin()));
468  }
469 
470  /**
471  * \brief Get pointer to parent entity tag.
472  *
473  * Each refined entity has his parent. Such information is stored on tags.
474  * This function get pinter to tag.
475  *
476  * @return Pointer to tag on entity
477  */
478  inline EntityHandle *getParentEntPtr() const { return entParentTagPtr; }
479 
480  /**
481  * \brief Get pointer to bit ref level tag
482 
483  * Every entity belongs to some refinement level or levels. Each level is
484  marked
485  * by bit set in BitRefLevel() (bitset) structure.
486  *
487  * See \ref mix_mesh_refinement for explanation.
488 
489  * @return Return pointer to tag.
490  */
492  return static_cast<BitRefLevel *>(
493  get_tag_ptr(this->getBasicDataPtr()->moab,
494  this->getBasicDataPtr()->th_RefBitLevel, this->ent, NULL));
495  }
496 
497  /** \brief Get patent entity
498  */
499  inline EntityType getParentEntType() const {
500  return (EntityType)((getParentEnt() & MB_TYPE_MASK) >> MB_ID_WIDTH);
501  }
502 
503  /** \brief Get parent entity, i.e. entity form one refinement level up
504  */
505  inline EntityHandle getParentEnt() const { return *(getParentEntPtr()); }
506 
507  /** \brief Get entity ref bit refinement signature
508  */
509  inline const BitRefLevel &getBitRefLevel() const {
510  return *getBitRefLevelPtr();
511  }
512 
513  /** \brief Get entity ref bit refinement as ulong
514  */
515  inline unsigned long int getBitRefLevelULong() const {
516  return getBitRefLevel().to_ulong();
517  }
518 
519  friend std::ostream &operator<<(std::ostream &os, const RefEntityTmp &e);
520 
522  static boost::weak_ptr<BasicEntityData> basicDataPtr;
523 
524 private:
525  friend struct EntFiniteElement;
526  friend struct NumeredEntFiniteElement;
527 
528  /**
529  * @brief Get the pointer to reference element
530  *
531  * @return const boost::shared_ptr<RefElement>
532  */
533  inline const boost::shared_ptr<RefElement> getRefElementPtr() const {
534  if (auto ptr = refElementPtr.lock())
535  return ptr;
536  else
537  return nullptr;
538  }
539 
540  static boost::weak_ptr<RefElement> refElementPtr;
541  EntityHandle *entParentTagPtr; ///< Tag ptr to parent entity handle
542 };
543 
544 template <> struct RefEntityTmp<-1> : public RefEntityTmp<0> {
545 
546  RefEntityTmp(const boost::shared_ptr<BasicEntityData> &basic_data_ptr,
547  const EntityHandle ent)
548  : RefEntityTmp<0>(basic_data_ptr, ent), basicDataPtr(basic_data_ptr) {}
549 
550  RefEntityTmp(const boost::shared_ptr<BasicEntityData> &basic_data_ptr,
551  const EntityHandle ent, EntityHandle *ent_parent_tag_ptr)
552  : RefEntityTmp<0>(basic_data_ptr, ent, ent_parent_tag_ptr),
553  basicDataPtr(basic_data_ptr) {}
554 
555  virtual const boost::shared_ptr<BasicEntityData> getBasicDataPtr() const {
556  if (auto ptr = basicDataPtr.lock())
557  return ptr;
558  else
559  return nullptr;
560  }
561 
562 private:
563  mutable boost::weak_ptr<BasicEntityData> basicDataPtr;
564 };
565 
567 
568 /**
569  * \brief interface to RefEntity
570  * \ingroup ent_multi_indices
571  */
572 template <typename T> struct interface_RefEntity {
573 
574  interface_RefEntity(const boost::shared_ptr<T> &sptr) : sPtr(sptr) {}
575 
577  : sPtr(interface.getRefEntityPtr()) {}
578 
579  virtual ~interface_RefEntity() = default;
580 
581  /**
582  * @copydoc MoFEM::RefEntityTmp<0>::getSideNumber
583  */
584  inline int getSideNumber() const { return this->sPtr->getSideNumber(); }
585 
586  /**
587  * @copydoc MoFEM::RefEntityTmp<0>::getSideNumberPtr
588  */
589  inline boost::shared_ptr<SideNumber> getSideNumberPtr() const {
590  return this->sPtr->getSideNumberPtr();
591  }
592 
593  /**
594  * @copydoc MoFEM::RefEntityTmp<0>::getBasicDataPtr
595  */
596  inline const boost::shared_ptr<BasicEntityData> getBasicDataPtr() const {
597  return this->sPtr->getBasicDataPtr();
598  }
599 
600  /**
601  * @copydoc MoFEM::RefEntityTmp<0>::getEnt
602  */
603  inline EntityHandle getEnt() const { return this->sPtr->getEnt(); }
604 
605  /**
606  * @copydoc MoFEM::RefEntityTmp<0>::getParentEntType
607  */
608  inline EntityType getParentEntType() const {
609  return this->sPtr->getParentEntType();
610  };
611 
612  /**
613  * @copydoc MoFEM::RefEntityTmp<0>::getParentEnt
614  */
615  inline EntityHandle getParentEnt() const {
616  return this->sPtr->getParentEnt();
617  }
618 
619  /**
620  * @copydoc MoFEM::RefEntityTmp<0>::getBitRefLevelPtr
621  */
622  inline BitRefLevel *getBitRefLevelPtr() const {
623  return this->sPtr->getBitRefLevelPtr();
624  }
625 
626  /**
627  * @copydoc MoFEM::RefEntityTmp<0>::getBitRefLevel
628  */
629  inline const BitRefLevel &getBitRefLevel() const {
630  return this->sPtr->getBitRefLevel();
631  }
632 
633  /**
634  * @copydoc MoFEM::RefEntityTmp<0>::getBitRefLevelULong
635  */
636  inline unsigned long int getBitRefLevelULong() const {
637  return this->sPtr->getBitRefLevelULong();
638  }
639 
640  /**
641  * @copydoc MoFEM::RefEntityTmp<0>::getEntType
642  */
643  inline EntityType getEntType() const { return this->sPtr->getEntType(); };
644 
645  /**
646  * @copydoc MoFEM::RefEntityTmp<0>::getEntDimension
647  */
648  inline int getEntDimension() const { return this->sPtr->getEntDimension(); }
649 
650  /**
651  * @copydoc MoFEM::RefEntityTmp<0>::getEntTypeName
652  */
653  inline const char *getEntTypeName() const {
654  return this->sPtr->getEntTypeName();
655  }
656 
657  /**
658  * @copydoc MoFEM::RefEntityTmp<0>::getEntId
659  */
660  inline EntityID getEntId() const { return this->sPtr->getEntId(); };
661 
662  /**
663  * @copydoc MoFEM::RefEntityTmp<0>::getOwnerEnt
664  */
665  inline EntityHandle getOwnerEnt() const { return this->sPtr->getOwnerEnt(); }
666 
667  /**
668  * @copydoc MoFEM::RefEntityTmp<0>::getOwnerEnt
669  */
670  inline EntityHandle &getOwnerEnt() { return this->sPtr->getOwnerEnt(); }
671 
672  /**
673  * @copydoc MoFEM::RefEntityTmp<0>::getOwnerProc
674  */
675  inline int getOwnerProc() const { return this->sPtr->getOwnerProc(); }
676 
677  /**
678  * @copydoc MoFEM::RefEntityTmp<0>::getPartProc
679  */
680  inline int getPartProc() const { return this->sPtr->getPartProc(); }
681 
682  /**
683  * @copydoc MoFEM::RefEntityTmp<0>::getPartProcPtr
684  */
685  inline int *getPartProcPtr() const { return this->sPtr->getPartProcPtr(); }
686 
687  /**
688  * @copydoc MoFEM::RefEntityTmp<0>::getPartProc
689  */
690  inline unsigned char getPStatus() const { return this->sPtr->getPStatus(); }
691 
692  /**
693  * @copydoc MoFEM::RefEntityTmp<0>::getSharingProcsPtr
694  */
695  inline int *getSharingProcsPtr() const {
696  return this->sPtr->getSharingProcsPtr();
697  }
698 
699  /**
700  * @copydoc MoFEM::RefEntityTmp<0>::getSharingHandlersPtr
701  */
703  return this->sPtr->getSharingHandlersPtr();
704  }
705 
706  /**
707  * @copydoc MoFEM::RefEntityTmp<0>::getRefEntityPtr
708  */
709  inline boost::shared_ptr<T> &getRefEntityPtr() const { return this->sPtr; }
710 
711  mutable boost::shared_ptr<T> sPtr;
712 };
713 
714 /**
715  * \typedef RefEntity_multiIndex
716  * type multiIndex container for RefEntity
717  * \ingroup ent_multi_indices
718  *
719  * \param hashed_unique Ent_mi_tag
720  * \param ordered_non_unique Ent_Ent_mi_tag
721  * \param ordered_non_unique Composite_EntType_And_ParentEntType_mi_tag
722  * \param ordered_non_unique Composite_ParentEnt_And_EntType_mi_tag
723  */
724 using RefEntity_multiIndex = multi_index_container<
725  boost::shared_ptr<RefEntity>,
726  indexed_by<ordered_unique<
727 
728  tag<Ent_mi_tag>,
729  const_mem_fun<RefEntity, EntityHandle, &RefEntity::getEnt>
730 
731  >,
732 
733  ordered_non_unique<
734 
735  tag<Ent_Ent_mi_tag>, const_mem_fun<RefEntity, EntityHandle,
737 
738  >,
739 
740  ordered_non_unique<
741  tag<Composite_EntType_and_ParentEntType_mi_tag>,
742  composite_key<RefEntity,
743  const_mem_fun<RefEntity, EntityType,
745  const_mem_fun<RefEntity, EntityType,
747 
748  >,
749 
750  ordered_non_unique<
751  tag<Composite_ParentEnt_And_EntType_mi_tag>,
752  composite_key<RefEntity,
753  const_mem_fun<RefEntity, EntityType,
755  const_mem_fun<RefEntity, EntityHandle,
757 
758  >>
759 
760  >;
761 
762 /** \brief multi-index view of RefEntity by parent entity
763 \ingroup ent_multi_indices
764 */
765 using RefEntity_multiIndex_view_by_hashed_parent_entity = multi_index_container<
766  boost::shared_ptr<RefEntity>,
767  indexed_by<
768  hashed_non_unique<
769  const_mem_fun<RefEntity, EntityHandle, &RefEntity::getParentEnt>>,
770  hashed_unique<tag<Composite_EntType_and_ParentEntType_mi_tag>,
771  composite_key<boost::shared_ptr<RefEntity>,
772  const_mem_fun<RefEntity, EntityHandle,
774  const_mem_fun<RefEntity, EntityHandle,
776 
777  >;
778 
780  multi_index_container<
781  boost::shared_ptr<RefEntity>,
782  indexed_by<ordered_non_unique<const_mem_fun<RefEntity, EntityHandle,
784  hashed_unique<
785  tag<Composite_EntType_and_ParentEntType_mi_tag>,
786  composite_key<boost::shared_ptr<RefEntity>,
787  const_mem_fun<RefEntity, EntityHandle,
789  const_mem_fun<RefEntity, EntityHandle,
791 
792  >;
793 
794 using RefEntity_multiIndex_view_sequence_ordered_view = multi_index_container<
795  boost::shared_ptr<RefEntity>,
796  indexed_by<
797  sequenced<>,
798  ordered_unique<tag<Ent_mi_tag>, const_mem_fun<RefEntity, EntityHandle,
800 
801 /** \brief change parent
802 * \ingroup ent_multi_indices
803 *
804 * Use this function with care. Some other multi-indices can deponent on
805 this.
806 
807 Known dependent multi-indices (verify if that list is full):
808 - RefEntity_multiIndex
809 - RefElement_multiIndex
810 
811 */
815  inline void operator()(boost::shared_ptr<RefEntity> &e) {
816  rval = e->getBasicDataPtr()->moab.tag_set_data(
817  e->getBasicDataPtr()->th_RefParentHandle, &e->ent, 1, &pArent);
818  MOAB_THROW(rval);
819  }
820 };
821 
822 /** \brief ref mofem entity, left shift
823  * \ingroup ent_multi_indices
824  */
826  int shift;
828  RefEntity_change_left_shift(const int _shift,
829  const BitRefLevel _mask = BitRefLevel().set())
830  : shift(_shift), mask(_mask) {}
831  inline void operator()(boost::shared_ptr<RefEntity> &e) {
832  BitRefLevel bit = *(e->getBitRefLevelPtr());
833  (*e->getBitRefLevelPtr()) = ((bit & mask) << shift) | (bit & ~mask);
834  };
835 };
836 
837 /** \brief ref mofem entity, right shift
838  * \ingroup ent_multi_indices
839  */
841  int shift;
844  const BitRefLevel _mask = BitRefLevel().set())
845  : shift(_shift), mask(_mask) {}
846  inline void operator()(boost::shared_ptr<RefEntity> &e) {
847  BitRefLevel bit = *(e->getBitRefLevelPtr());
848  *(e->getBitRefLevelPtr()) = ((bit & mask) >> shift) | (bit & ~mask);
849  };
850 };
851 } // namespace MoFEM
852 
853 #endif // __REF_ENTSMULTIINDICES_HPP__
854 
855 /**
856  * \defgroup ent_multi_indices Entities structures and multi-indices
857  * \ingroup mofem
858  **/
MoFEM::RefEntityTmp< 0 >::getPartProcPtr
int * getPartProcPtr() const
Get pointer to partition tag.
Definition: RefEntsMultiIndices.hpp:307
MoFEM::operator<<
std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
Definition: EntitiesFieldData.cpp:240
MoFEM::id_from_handle
auto id_from_handle(const EntityHandle h)
Definition: Templates.hpp:1861
MoFEM::dimension_from_handle
auto dimension_from_handle(const EntityHandle h)
get entity dimension form handle
Definition: Templates.hpp:1885
MoFEM::interface_RefEntity::getSharingProcsPtr
int * getSharingProcsPtr() const
get shared processors
Definition: RefEntsMultiIndices.hpp:695
MoFEM::RefEntityTmp< 0 >::ent
EntityHandle ent
Definition: RefEntsMultiIndices.hpp:521
MoFEM::SideNumber::SideNumber
SideNumber(EntityHandle ent, int side_number, int sense, int offset)
Definition: RefEntsMultiIndices.hpp:76
MoFEM::RefEntityTmp< 0 >::getBitRefLevel
static MoFEMErrorCode getBitRefLevel(Interface &moab, Range ents, std::vector< const BitRefLevel * > &vec_ptr_bit_ref_level)
Definition: RefEntsMultiIndices.hpp:445
MYPCOMM_INDEX
#define MYPCOMM_INDEX
default communicator number PCOMM
Definition: definitions.h:215
MoFEM::get_tag_ptr
void * get_tag_ptr(moab::Interface &moab, Tag th, EntityHandle ent, int *tag_size)
Get the tag ptr object.
Definition: RefEntsMultiIndices.hpp:40
MoFEM::interface_RefEntity::getBitRefLevelULong
unsigned long int getBitRefLevelULong() const
Get entity ref bit refinement as ulong.
Definition: RefEntsMultiIndices.hpp:636
MoFEM::RefEntityTmp< 0 >::getRefElementPtr
const boost::shared_ptr< RefElement > getRefElementPtr() const
Get the pointer to reference element.
Definition: RefEntsMultiIndices.hpp:533
MoFEM::RefEntity_change_parent::pArent
EntityHandle pArent
Definition: RefEntsMultiIndices.hpp:813
EntityHandle
MoFEM::interface_RefEntity::getEntId
EntityID getEntId() const
get entity id
Definition: RefEntsMultiIndices.hpp:660
MoFEM::interface_RefEntity::getParentEntType
EntityType getParentEntType() const
Get patent entity.
Definition: RefEntsMultiIndices.hpp:608
MoFEM::RefEntityTmp< 0 >::getParentEntPtr
EntityHandle * getParentEntPtr() const
Get pointer to parent entity tag.
Definition: RefEntsMultiIndices.hpp:478
MoFEM::RefEntityTmp< 0 >::refElementPtr
static boost::weak_ptr< RefElement > refElementPtr
Definition: RefEntsMultiIndices.hpp:540
MoFEM::RefEntityTmp< 0 >::getOwnerProc
int getOwnerProc() const
Definition: RefEntsMultiIndices.hpp:275
MoFEM::RefEntity_change_right_shift::operator()
void operator()(boost::shared_ptr< RefEntity > &e)
Definition: RefEntsMultiIndices.hpp:846
MoFEM::RefEntityTmp::basicDataPtr
static boost::weak_ptr< BasicEntityData > basicDataPtr
Definition: RefEntsMultiIndices.hpp:129
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::interface_RefEntity::getPartProcPtr
int * getPartProcPtr() const
Get pointer to partition tag.
Definition: RefEntsMultiIndices.hpp:685
MoFEM::interface_RefEntity::getRefEntityPtr
boost::shared_ptr< T > & getRefEntityPtr() const
Definition: RefEntsMultiIndices.hpp:709
MoFEM::RefEntityTmp< 0 >::getBitRefLevel
static MoFEMErrorCode getBitRefLevel(Interface &moab, std::vector< EntityHandle > &ents, std::vector< const BitRefLevel * > &vec_ptr_bit_ref_level)
Definition: RefEntsMultiIndices.hpp:458
MoFEM::RefEntityTmp< 0 >
Struct keeps handle to refined handle.
Definition: RefEntsMultiIndices.hpp:141
MoFEM::interface_RefEntity::sPtr
boost::shared_ptr< T > sPtr
Definition: RefEntsMultiIndices.hpp:711
MoFEM::th
Tag th
Definition: Projection10NodeCoordsOnField.cpp:122
MoFEM::RefEntity_change_left_shift::shift
int shift
Definition: RefEntsMultiIndices.hpp:826
MoFEM::interface_RefEntity::getBitRefLevelPtr
BitRefLevel * getBitRefLevelPtr() const
Get pointer to bit ref level tag.
Definition: RefEntsMultiIndices.hpp:622
MoFEM::interface_RefEntity::getEnt
EntityHandle getEnt() const
Get the entity handle.
Definition: RefEntsMultiIndices.hpp:603
MoFEM::RefEntityTmp< 0 >::getPStatus
unsigned char getPStatus() const
get pstatus This tag stores various aspects of parallel status in bits; see also define following,...
Definition: RefEntsMultiIndices.hpp:333
MoFEM::RefEntityTmp< 0 >::getEntType
EntityType getEntType() const
Get entity type.
Definition: RefEntsMultiIndices.hpp:181
MoFEM::RefEntityTmp<-1 >::basicDataPtr
boost::weak_ptr< BasicEntityData > basicDataPtr
Definition: RefEntsMultiIndices.hpp:563
MOAB_THROW
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:541
MoFEM::EntFiniteElement
Finite element data for entity.
Definition: FEMultiIndices.hpp:501
MoFEM::RefEntity_multiIndex_view_by_ordered_parent_entity
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_non_unique< const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, hashed_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< boost::shared_ptr< RefEntity >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getEnt >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >> > > RefEntity_multiIndex_view_by_ordered_parent_entity
Definition: RefEntsMultiIndices.hpp:792
MoFEM::RefEntityTmp<-1 >::RefEntityTmp
RefEntityTmp(const boost::shared_ptr< BasicEntityData > &basic_data_ptr, const EntityHandle ent, EntityHandle *ent_parent_tag_ptr)
Definition: RefEntsMultiIndices.hpp:550
MoFEM::interface_RefEntity
interface to RefEntity
Definition: FieldMultiIndices.hpp:19
MoFEM::interface_RefEntity::getPStatus
unsigned char getPStatus() const
Definition: RefEntsMultiIndices.hpp:690
MoFEM::RefEntity_multiIndex
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getEnt > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > > >, ordered_non_unique< tag< Composite_ParentEnt_And_EntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex
Definition: RefEntsMultiIndices.hpp:760
MoFEM::interface_RefEntity::getSharingHandlersPtr
EntityHandle * getSharingHandlersPtr() const
get sharid entity handlers
Definition: RefEntsMultiIndices.hpp:702
MoFEM::interface_RefEntity::getParentEnt
EntityHandle getParentEnt() const
Definition: RefEntsMultiIndices.hpp:615
MoFEM::BasicEntityData::th_RefBitLevel
Tag th_RefBitLevel
Definition: RefEntsMultiIndices.hpp:111
MoFEM::RefEntityTmp< 0 >::getBitRefLevel
const BitRefLevel & getBitRefLevel() const
Get entity ref bit refinement signature.
Definition: RefEntsMultiIndices.hpp:509
MoFEM::BasicEntityData::th_RefParentHandle
Tag th_RefParentHandle
Definition: RefEntsMultiIndices.hpp:110
MoFEM::interface_RefEntity::getOwnerEnt
EntityHandle & getOwnerEnt()
Definition: RefEntsMultiIndices.hpp:670
MoFEM::RefEntity_change_left_shift::RefEntity_change_left_shift
RefEntity_change_left_shift(const int _shift, const BitRefLevel _mask=BitRefLevel().set())
Definition: RefEntsMultiIndices.hpp:828
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1975
MoFEM::RefEntityTmp< 0 >::getParentEntType
EntityType getParentEntType() const
Get patent entity.
Definition: RefEntsMultiIndices.hpp:499
MoFEM::interface_RefEntity::getEntTypeName
const char * getEntTypeName() const
Get the Ent Type Name.
Definition: RefEntsMultiIndices.hpp:653
MB_TYPE_MASK
#define MB_TYPE_MASK
Definition: definitions.h:228
MoFEM::RefEntity_change_parent::RefEntity_change_parent
RefEntity_change_parent(EntityHandle parent)
Definition: RefEntsMultiIndices.hpp:814
MoFEM::Exceptions::rval
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
MoFEM::SideNumber::getEntType
EntityType getEntType() const
Definition: RefEntsMultiIndices.hpp:64
MoFEM::interface_RefEntity::getSideNumber
int getSideNumber() const
Definition: RefEntsMultiIndices.hpp:584
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEM::SideNumber::offset
signed char offset
Definition: RefEntsMultiIndices.hpp:61
MoFEM::BasicEntityData::th_MeshsetPart
Tag th_MeshsetPart
Definition: RefEntsMultiIndices.hpp:112
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::RefEntityTmp<-1 >::getBasicDataPtr
virtual const boost::shared_ptr< BasicEntityData > getBasicDataPtr() const
Get pointer to basic data struture.
Definition: RefEntsMultiIndices.hpp:555
MoFEM::RefEntity_multiIndex_view_by_hashed_parent_entity
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< hashed_non_unique< const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, hashed_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< boost::shared_ptr< RefEntity >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getEnt >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >> > > RefEntity_multiIndex_view_by_hashed_parent_entity
multi-index view of RefEntity by parent entity
Definition: RefEntsMultiIndices.hpp:777
MoFEM::RefEntityTmp< 0 >::getOwnerEnt
EntityHandle getOwnerEnt() const
Owner handle on this or other processors.
Definition: RefEntsMultiIndices.hpp:240
MoFEM::RefEntityTmp< 0 >::getBitRefLevelPtr
BitRefLevel * getBitRefLevelPtr() const
Get pointer to bit ref level tag.
Definition: RefEntsMultiIndices.hpp:491
bit
auto bit
set bit
Definition: hanging_node_approx.cpp:75
MoFEM::RefEntityTmp< 0 >::entParentTagPtr
EntityHandle * entParentTagPtr
Tag ptr to parent entity handle.
Definition: RefEntsMultiIndices.hpp:541
convert.type
type
Definition: convert.py:64
MoFEM::RefEntityTmp< 0 >::getParentEnt
EntityHandle getParentEnt() const
Get parent entity, i.e. entity form one refinement level up.
Definition: RefEntsMultiIndices.hpp:505
SideNumber_multiIndex
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.
Definition: RefEntsMultiIndices.hpp:101
MoFEM::SideNumber::getEntDimension
int getEntDimension() const
Definition: RefEntsMultiIndices.hpp:68
MoFEM::BasicEntityData::~BasicEntityData
virtual ~BasicEntityData()=default
MoFEM::RefEntity_change_parent::operator()
void operator()(boost::shared_ptr< RefEntity > &e)
Definition: RefEntsMultiIndices.hpp:815
MoFEM::BasicEntityData
PipelineManager data. like access to moab interface and basic tag handlers.
Definition: RefEntsMultiIndices.hpp:107
MoFEM::RefEntityTmp< 0 >::getOwnerProc
static int getOwnerProc(const EntityHandle ent, boost::shared_ptr< BasicEntityData > basic_ent_data)
Definition: RefEntsMultiIndices.hpp:245
MoFEM::SideNumber::brother_side_number
signed char brother_side_number
Definition: RefEntsMultiIndices.hpp:62
MoFEM::get_id_for_max_type
EntityHandle get_id_for_max_type()
Definition: RefEntsMultiIndices.hpp:13
MoFEM::RefEntityTmp::getBasicDataPtr
virtual const boost::shared_ptr< BasicEntityData > getBasicDataPtr() const
Definition: RefEntsMultiIndices.hpp:122
MoFEM::type_name_from_handle
auto type_name_from_handle(const EntityHandle h)
get entity type name from handle
Definition: Templates.hpp:1893
MoFEM::interface_RefEntity::getOwnerProc
int getOwnerProc() const
Definition: RefEntsMultiIndices.hpp:675
MoFEM::SideNumber::ent
EntityHandle ent
Definition: RefEntsMultiIndices.hpp:58
MoFEM::BasicEntityData::pcommID
int pcommID
Definition: RefEntsMultiIndices.hpp:109
MoFEM::RefEntityTmp< 0 >::getPartProc
int getPartProc() const
Get processor.
Definition: RefEntsMultiIndices.hpp:291
MoFEM::RefElement
keeps data about abstract refined finite element
Definition: RefElementMultiIndices.hpp:16
MoFEM::type_from_handle
auto type_from_handle(const EntityHandle h)
get type from entity handle
Definition: Templates.hpp:1869
MB_ID_WIDTH
#define MB_ID_WIDTH
Definition: definitions.h:227
MoFEM::RefEntityTmp< 0 >::getEntId
EntityID getEntId() const
get entity id
Definition: RefEntsMultiIndices.hpp:205
MoFEM::RefEntityTmp< 0 >::getOwnerEnt
static EntityHandle getOwnerEnt(const EntityHandle ent, boost::shared_ptr< BasicEntityData > basic_ent_data)
Definition: RefEntsMultiIndices.hpp:208
MoFEM::interface_RefEntity::getEntDimension
int getEntDimension() const
Get the Ent Dimension.
Definition: RefEntsMultiIndices.hpp:648
MoFEM::RefEntity
RefEntityTmp< 0 > RefEntity
Definition: RefEntsMultiIndices.hpp:566
MoFEM::RefEntity_change_right_shift::shift
int shift
Definition: RefEntsMultiIndices.hpp:841
MoFEM::SideNumber::getEntTypeName
const char * getEntTypeName() const
Definition: RefEntsMultiIndices.hpp:72
MoFEM::interface_RefEntity::getBasicDataPtr
const boost::shared_ptr< BasicEntityData > getBasicDataPtr() const
Get pointer to basic data struture.
Definition: RefEntsMultiIndices.hpp:596
MoFEM::interface_RefEntity::getBitRefLevel
const BitRefLevel & getBitRefLevel() const
Definition: RefEntsMultiIndices.hpp:629
MoFEM::interface_RefEntity::getSideNumberPtr
boost::shared_ptr< SideNumber > getSideNumberPtr() const
Get the Side number.
Definition: RefEntsMultiIndices.hpp:589
N
const int N
Definition: speed_test.cpp:3
MoFEM::RefEntity_change_right_shift
ref mofem entity, right shift
Definition: RefEntsMultiIndices.hpp:840
Range
MoFEM::SideNumber
keeps information about side number for the finite element
Definition: RefEntsMultiIndices.hpp:57
MoFEM::RefEntity_change_left_shift
ref mofem entity, left shift
Definition: RefEntsMultiIndices.hpp:825
MoFEM::RefEntityTmp< 0 >::getBasicDataPtr
virtual const boost::shared_ptr< BasicEntityData > getBasicDataPtr() const
Get pointer to basic data struture.
Definition: RefEntsMultiIndices.hpp:156
MoFEM::SideNumber::sense
signed char sense
Definition: RefEntsMultiIndices.hpp:60
MoFEM::BasicEntityData::moab
moab::Interface & moab
Definition: RefEntsMultiIndices.hpp:108
MoFEM::interface_RefEntity::~interface_RefEntity
virtual ~interface_RefEntity()=default
MoFEM::RefEntityTmp< 0 >::getEntTypeName
const char * getEntTypeName() const
Get the Ent Type Name.
Definition: RefEntsMultiIndices.hpp:199
MoFEM::RefEntityTmp< 0 >::getEnt
EntityHandle getEnt() const
Get the entity handle.
Definition: RefEntsMultiIndices.hpp:177
MoFEM::interface_RefEntity::interface_RefEntity
interface_RefEntity(const interface_RefEntity< T > &interface)
Definition: RefEntsMultiIndices.hpp:576
MoFEM::RefEntity_change_parent
change parent
Definition: RefEntsMultiIndices.hpp:812
MoFEM::RefEntityTmp< 0 >::getSharingHandlersPtr
EntityHandle * getSharingHandlersPtr() const
get sharid entity handlers
Definition: RefEntsMultiIndices.hpp:410
MoFEM::RefEntity_change_left_shift::operator()
void operator()(boost::shared_ptr< RefEntity > &e)
Definition: RefEntsMultiIndices.hpp:831
MoFEM::SideNumber::side_number
signed char side_number
Definition: RefEntsMultiIndices.hpp:59
MoFEM::interface_RefEntity::interface_RefEntity
interface_RefEntity(const boost::shared_ptr< T > &sptr)
Definition: RefEntsMultiIndices.hpp:574
MoFEM::interface_RefEntity::getEntType
EntityType getEntType() const
Get entity type.
Definition: RefEntsMultiIndices.hpp:643
MoFEM::RefEntityTmp< 0 >::getEntDimension
int getEntDimension() const
Get the Ent Dimension.
Definition: RefEntsMultiIndices.hpp:190
MoFEM::RefEntityTmp< 0 >::getBitRefLevel
static MoFEMErrorCode getBitRefLevel(Interface &moab, Range ents, std::vector< BitRefLevel > &vec_bit_ref_level)
Definition: RefEntsMultiIndices.hpp:433
MoFEM::NumeredEntFiniteElement
Partitioned (Indexed) Finite Element in Problem.
Definition: FEMultiIndices.hpp:728
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
MoFEM::interface_RefEntity::getPartProc
int getPartProc() const
Definition: RefEntsMultiIndices.hpp:680
MoFEM::RefEntity_change_right_shift::RefEntity_change_right_shift
RefEntity_change_right_shift(const int _shift, const BitRefLevel _mask=BitRefLevel().set())
Definition: RefEntsMultiIndices.hpp:843
MoFEM::RefEntityTmp< 0 >::basicDataPtr
static boost::weak_ptr< BasicEntityData > basicDataPtr
Definition: RefEntsMultiIndices.hpp:522
MoFEM::RefEntity_change_right_shift::mask
BitRefLevel mask
Definition: RefEntsMultiIndices.hpp:842
MoFEM::get_id_for_min_type
EntityHandle get_id_for_min_type()
Definition: RefEntsMultiIndices.hpp:18
MoFEM::RefEntityTmp< 0 >::getSharingProcsPtr
int * getSharingProcsPtr() const
get shared processors
Definition: RefEntsMultiIndices.hpp:368
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEM::RefEntityTmp< 0 >::getPartProc
static int getPartProc(const EntityHandle ent, const Tag th, const boost::shared_ptr< BasicEntityData > &basic_ptr)
Definition: RefEntsMultiIndices.hpp:280
MoFEM::interface_RefEntity::getOwnerEnt
EntityHandle getOwnerEnt() const
Definition: RefEntsMultiIndices.hpp:665
MoFEM::RefEntityTmp< 0 >::getBitRefLevelULong
unsigned long int getBitRefLevelULong() const
Get entity ref bit refinement as ulong.
Definition: RefEntsMultiIndices.hpp:515
MoFEM::RefEntity_multiIndex_view_sequence_ordered_view
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< sequenced<>, ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getEnt > >> > RefEntity_multiIndex_view_sequence_ordered_view
Definition: RefEntsMultiIndices.hpp:799
MoFEM::RefEntityTmp
Definition: RefEntsMultiIndices.hpp:118
MoFEM::BasicEntityData::BasicEntityData
BasicEntityData(const moab::Interface &mfield, const int pcomm_id=MYPCOMM_INDEX)
Definition: RefEntsMultiIndices.cpp:11
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
MoFEM::RefEntity_change_left_shift::mask
BitRefLevel mask
Definition: RefEntsMultiIndices.hpp:827
MoFEM::RefEntityTmp<-1 >::RefEntityTmp
RefEntityTmp(const boost::shared_ptr< BasicEntityData > &basic_data_ptr, const EntityHandle ent)
Definition: RefEntsMultiIndices.hpp:546