v0.14.0
FEMultiIndices.hpp
Go to the documentation of this file.
1 /** \file FEMultiIndices.hpp
2  * \brief Multi-index contains, data structures for mofem finite elements and
3  * other low-level functions
4  *
5  * \todo Add proc into feUId to reduce number of keys is multi-index
6  */
7 
8 #ifndef __FEMMULTIINDICES_HPP__
9 #define __FEMMULTIINDICES_HPP__
10 
11 namespace MoFEM {
12 
13 struct EntFiniteElement;
14 
15 /** \brief user adjacency function
16  * \ingroup fe_multi_indices
17  */
18 using ElementAdjacencyFunct = boost::function<MoFEMErrorCode(
19  Interface &moab, const Field &field, const EntFiniteElement &fe,
20  std::vector<EntityHandle> &adjacency)>;
21 
22 /**
23  * \brief Finite element definition
24  * \ingroup fe_multi_indices
25  */
26 struct FiniteElement {
27 
28  EntityHandle meshset; ///< meshset stores FE ents
29  BitFEId *tagId; ///< ptr to tag storing FE id
30  void *tagName; ///< ptr to tag storing FE name
31  int tagNameSize; ///< numer of characters in FE name
32  BitFieldId *tag_BitFieldId_col_data; ///< tag stores col id_id for fields
33  BitFieldId *tag_BitFieldId_row_data; ///< tag stores row id_id for fields
34  BitFieldId *tag_BitFieldId_data; ///< tag stores data id_id for fields
36 
37  FiniteElement(Interface &moab, const EntityHandle _meshset);
38 
39  /**
40  * @brief Get finite element uid
41  *
42  * @return const UId&
43  */
44  inline const UId &getFEUId() const { return feUId; }
45 
46  /**
47  * \brief Get finite element id
48  * @return Finite element Id
49  */
50  inline BitFEId getId() const { return *tagId; }
51 
52  /**
53  * \brief Get meshset containing element entities
54  * @return Meshset
55  */
56  inline EntityHandle getMeshset() const { return meshset; }
57 
58  /**
59  * \brief Get finite element name
60  * @return string_ref
61  */
62  inline boost::string_ref getNameRef() const {
63  return boost::string_ref((char *)tagName, tagNameSize);
64  }
65 
66  /**
67  * \brief Get finite element name
68  * @return string
69  */
70  inline std::string getName() const {
71  return std::string((char *)tagName, tagNameSize);
72  }
73 
74  /**
75  * \brief Get field ids on columns
76  * @return Bit field ids
77  */
78  inline BitFieldId getBitFieldIdCol() const {
80  }
81 
82  /**
83  * \brief Get field ids on rows
84  * @return Bit field ids
85  */
86  inline BitFieldId getBitFieldIdRow() const {
88  }
89 
90  /**
91  * \brief Get field ids on data
92  * @return Bit field ids
93  */
94  inline BitFieldId getBitFieldIdData() const {
95  return *((BitFieldId *)tag_BitFieldId_data);
96  }
97 
98  /**
99  * \brief Get bit identifying this element
100  *
101  * Each element like field is identified by bit set. Each element has unique
102  * bit set, this function returns number of that bit.
103  *
104  * @return Bit number
105  */
106  inline unsigned int getBitNumber() const {
107  return ffsl(((BitFieldId *)tagId)->to_ulong());
108  }
109 
110  /**
111  * \brief Table of functions retrieving adjacencies for finite element
112  * User can alter and change default behavior
113  */
114  std::array<ElementAdjacencyFunct, MBMAXTYPE> elementAdjacencyTable;
115 
116  /**
117  * \brief print finite element
118  */
119  friend std::ostream &operator<<(std::ostream &os, const FiniteElement &e);
120 
121 private:
122  static constexpr int ent_shift = 64; // EntityHandle size
123 };
124 
125 /** \brief default adjacency map
126  * \ingroup fe_multi_indices
127  */
129 
130  static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field,
131  const EntFiniteElement &fe,
132  std::vector<EntityHandle> &adjacency);
133  static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field,
134  const EntFiniteElement &fe,
135  std::vector<EntityHandle> &adjacency);
136  static MoFEMErrorCode defaultFace(Interface &moab, const Field &field,
137  const EntFiniteElement &fe,
138  std::vector<EntityHandle> &adjacency);
139  static MoFEMErrorCode defaultVolume(Interface &moab, const Field &field,
140  const EntFiniteElement &fe,
141  std::vector<EntityHandle> &adjacency);
142  static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field,
143  const EntFiniteElement &fe,
144  std::vector<EntityHandle> &adjacency);
145  static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field,
146  const EntFiniteElement &fe,
147  std::vector<EntityHandle> &adjacency);
148 
149  using DefEntTypeMap = std::array<bool, MBMAXTYPE>;
150 
151  static constexpr DefEntTypeMap defVertexTypeMap = {
152  // clang-format off
153  true, // MBVERTEX
154  false, // MBEDGE
155  false, // MBTRI
156  false, // MBQUAD
157  false, // MBPOLYGON
158  false, // MBTET
159  false, // MBPYRAMID
160  false, // MBPRISM
161  false, // MBKNIFE
162  false, // MBHEX
163  false, // MBPOLYHEDRON
164  false // MBENTITYSET
165  // clang-format on
166  };
167 
168  static constexpr DefEntTypeMap defEdgeTypeMap = {
169  // clang-format off
170  true, // MBVERTEX
171  true, // MBEDGE
172  false, // MBTRI
173  false, // MBQUAD
174  false, // MBPOLYGON
175  false, // MBTET
176  false, // MBPYRAMID
177  false, // MBPRISM
178  false, // MBKNIFE
179  false, // MBHEX
180  false, // MBPOLYHEDRON
181  false // MBENTITYSET
182  // clang-format on
183  };
184 
185  static constexpr DefEntTypeMap defTriTypeMap = {
186  // clang-format off
187  true, // MBVERTEX
188  true, // MBEDGE
189  true, // MBTRI
190  false, // MBQUAD
191  false, // MBPOLYGON
192  false, // MBTET
193  false, // MBPYRAMID
194  false, // MBPRISM
195  false, // MBKNIFE
196  false, // MBHEX
197  false, // MBPOLYHEDRON
198  false // MBENTITYSET
199  // clang-format on
200  };
201 
202  static constexpr DefEntTypeMap defQuadTypeMap = {
203  // clang-format off
204  true, // MBVERTEX
205  true, // MBEDGE
206  false, // MBTRI
207  true, // MBQUAD
208  false, // MBPOLYGON
209  false, // MBTET
210  false, // MBPYRAMID
211  false, // MBPRISM
212  false, // MBKNIFE
213  false, // MBHEX
214  false, // MBPOLYHEDRON
215  false // MBENTITYSET
216  // clang-format on
217  };
218 
219  static constexpr DefEntTypeMap defTetTypeMap = {
220  // clang-format off
221  true, // MBVERTEX
222  true, // MBEDGE
223  true, // MBTRI
224  false, // MBQUAD
225  false, // MBPOLYGON
226  true, // MBTET
227  false, // MBPYRAMID
228  false, // MBPRISM
229  false, // MBKNIFE
230  false, // MBHEX
231  false, // MBPOLYHEDRON
232  false // MBENTITYSET
233  // clang-format on
234  };
235 
236  static constexpr DefEntTypeMap defHexTypeMap = {
237  // clang-format off
238  true, // MBVERTEX
239  true, // MBEDGE
240  false, // MBTRI
241  true, // MBQUAD
242  false, // MBPOLYGON
243  false, // MBTET
244  false, // MBPYRAMID
245  false, // MBPRISM
246  false, // MBKNIFE
247  true, // MBHEX
248  false, // MBPOLYHEDRON
249  false // MBENTITYSET
250  // clang-format on
251  };
252 
253  static constexpr DefEntTypeMap defPrismTypeMap = {
254  // clang-format off
255  true, // MBVERTEX
256  true, // MBEDGE
257  true, // MBTRI
258  true, // MBQUAD
259  false, // MBPOLYGON
260  false, // MBTET
261  false, // MBPYRAMID
262  true, // MBPRISM
263  false, // MBKNIFE
264  false, // MBHEX
265  false, // MBPOLYHEDRON
266  false // MBENTITYSET
267  // clang-format on
268  };
269 
270  static constexpr DefEntTypeMap defMeshsetTypeMap = {
271  // clang-format off
272  true, // MBVERTEX
273  true, // MBEDGE
274  true, // MBTRI
275  true, // MBQUAD
276  true, // MBPOLYGON
277  true, // MBTET
278  true, // MBPYRAMID
279  true, // MBPRISM
280  true, // MBKNIFE
281  true, // MBHEX
282  true, // MBPOLYHEDRON
283  true // MBENTITYSET
284  // clang-format on
285  };
286 
287  static constexpr std::array<const DefEntTypeMap *, MBMAXTYPE> defTypeMap = {
288  // clang-format off
289  &defVertexTypeMap, // MBVERTEX
290  &defEdgeTypeMap, // MBEDGE
291  &defTriTypeMap, // MBTRI
292  &defQuadTypeMap, // MBQUAD
293  nullptr, // MBPOLYGON
294  &defTetTypeMap, // MBTET
295  nullptr, // MBPYRAMID
296  &defPrismTypeMap, // MBPRISM
297  nullptr, // MBKNIFE
298  &defHexTypeMap, // MBHEX
299  nullptr, // MBPOLYHEDRON
300  &defMeshsetTypeMap // MBENTITYSET
301  // clang-format on
302  };
303 
304  static inline bool getDefTypeMap(const EntityType fe_type,
305  const EntityType ent_type) {
306  if (auto ptr = defTypeMap[fe_type])
307  return (*ptr)[ent_type];
308  THROW_MESSAGE("DefTypeMap is not defined by this element. This is propably "
309  "new implementation, and has to be implemented");
310  return false;
311  }
312 };
313 
314 /**
315  * \brief Inetface for FE
316  * \ingroup fe_multi_indices
317  */
318 template <typename FE, typename REFENT>
320 
321  interface_FiniteElementImpl(const boost::shared_ptr<FE> fe_ptr,
322  const boost::shared_ptr<REFENT> ref_ents_ptr)
323  : interface_RefElement<REFENT>(ref_ents_ptr){};
324  virtual ~interface_FiniteElementImpl() = default;
325 };
326 
327 template <typename FE, typename REFENT>
329  interface_FiniteElement(const boost::shared_ptr<FE> fe_ptr,
330  const boost::shared_ptr<REFENT> ref_ents_ptr)
331  : interface_RefElement<REFENT>(ref_ents_ptr), sFiniteElementPtr(fe_ptr){};
332 
333  virtual ~interface_FiniteElement() = default;
334 
335  /**
336  * @copydoc MoFEM::FiniteElement::getFEUId
337  */
338  inline const UId &getFEUId() const {
339  return getFiniteElementPtr()->getFEUId();
340  }
341 
342  /**
343  * @copydoc MoFEM::FiniteElement::getId
344  */
345  inline BitFEId getId() const { return getFiniteElementPtr()->getId(); }
346 
347  /**
348  * @copydoc MoFEM::FiniteElement::getMeshset
349  */
350  inline EntityHandle getMeshset() const {
351  return getFiniteElementPtr()->getMeshset();
352  }
353 
354  /**
355  * @copydoc MoFEM::FiniteElement::getNameRef
356  */
357  inline boost::string_ref getNameRef() const {
358  return getFiniteElementPtr()->getNameRef();
359  }
360 
361  /**
362  * @copydoc MoFEM::FiniteElement::getName
363  */
364  inline std::string getName() const {
365  return getFiniteElementPtr()->getName();
366  }
367 
368  /**
369  * @copydoc MoFEM::FiniteElement::getBitFieldIdCol
370  */
371  inline BitFieldId getBitFieldIdCol() const {
372  return getFiniteElementPtr()->getBitFieldIdCol();
373  }
374 
375  /**
376  * @copydoc MoFEM::FiniteElement::getBitFieldIdRow
377  */
378  inline BitFieldId getBitFieldIdRow() const {
379  return getFiniteElementPtr()->getBitFieldIdRow();
380  }
381 
382  /**
383  * @copydoc MoFEM::FiniteElement::getBitFieldIdData
384  */
385  inline BitFieldId getBitFieldIdData() const {
386  return getFiniteElementPtr()->getBitFieldIdData();
387  }
388 
389  /**
390  * @copydoc MoFEM::FiniteElement::getBitNumber
391  */
392  inline unsigned int getBitNumber() const {
393  return getFiniteElementPtr()->getBitNumber();
394  }
395 
396  inline boost::shared_ptr<FE> &getFiniteElementPtr() const {
397  return sFiniteElementPtr;
398  }
399 
400 private:
401  mutable boost::shared_ptr<FE> sFiniteElementPtr;
402 };
403 
404 template <typename T>
406  : public interface_FiniteElementImpl<T, T> {
407 
408  interface_FiniteElement(const boost::shared_ptr<T> fe_ptr,
409  const boost::shared_ptr<T> ref_ents_ptr)
410  : interface_FiniteElementImpl<T, T>(fe_ptr, ref_ents_ptr) {}
411 
412  /**
413  * @copydoc MoFEM::FiniteElement::getFEUId
414  */
415  inline const UId &getFEUId() const {
416  return getFiniteElementPtr()->getFEUId();
417  }
418 
419  /**
420  * @copydoc MoFEM::FiniteElement::getId
421  */
422  inline BitFEId getId() const { return getFiniteElementPtr()->getId(); }
423 
424  /**
425  * @copydoc MoFEM::FiniteElement::getMeshset
426  */
427  inline EntityHandle getMeshset() const {
428  return getFiniteElementPtr()->getMeshset();
429  }
430 
431  /**
432  * @copydoc MoFEM::FiniteElement::getNameRef
433  */
434  inline boost::string_ref getNameRef() const {
435  return getFiniteElementPtr()->getNameRef();
436  }
437 
438  /**
439  * @copydoc MoFEM::FiniteElement::getName
440  */
441  inline std::string getName() const {
442  return getFiniteElementPtr()->getName();
443  }
444 
445  /**
446  * @copydoc MoFEM::FiniteElement::getBitFieldIdCol
447  */
448  inline BitFieldId getBitFieldIdCol() const {
449  return getFiniteElementPtr()->getBitFieldIdCol();
450  }
451 
452  /**
453  * @copydoc MoFEM::FiniteElement::getBitFieldIdRow
454  */
455  inline BitFieldId getBitFieldIdRow() const {
456  return getFiniteElementPtr()->getBitFieldIdRow();
457  }
458 
459  /**
460  * @copydoc MoFEM::FiniteElement::getBitFieldIdData
461  */
462  inline BitFieldId getBitFieldIdData() const {
463  return getFiniteElementPtr()->getBitFieldIdData();
464  }
465 
466  /**
467  * @copydoc MoFEM::FiniteElement::getBitNumber
468  */
469  inline unsigned int getBitNumber() const {
470  return getFiniteElementPtr()->getBitNumber();
471  }
472 
473  inline boost::shared_ptr<FiniteElement> &getFiniteElementPtr() const {
474  return boost::static_pointer_cast<T>(this->getRefElement())
475  ->getFiniteElementPtr();
476  };
477 };
478 
480  std::array<DofEntity_multiIndex::iterator, 2> loHi;
481 };
482 
484  std::array<NumeredDofEntity_multiIndex::iterator, 2> loHi;
485 };
486 
487 using CacheTuple = std::tuple<
488 
489  std::vector<EntityCacheDofs>, std::vector<EntityCacheNumeredDofs>,
490  std::vector<EntityCacheNumeredDofs>
491 
492  >;
493 
494 using CacheTupleWeakPtr = boost::weak_ptr<CacheTuple>;
495 using CacheTupleSharedPtr = boost::shared_ptr<CacheTuple>;
496 
497 /**
498  * \brief Finite element data for entity
499  * \ingroup fe_multi_indices
500  */
502  : public interface_FiniteElement<FiniteElement, RefElement> {
503 
508 
509  EntFiniteElement(const boost::shared_ptr<RefElement> &ref_finite_element,
510  const boost::shared_ptr<FiniteElement> &fe_ptr);
511  virtual ~EntFiniteElement() = default;
512 
513  /**
514  * \brief Get unique UId for finite element entity
515  * @return UId
516  */
517  inline UId getLocalUniqueId() const { return getLocalUniqueIdCalculate(); }
518 
519  static inline UId getLocalUniqueIdCalculate(const EntityHandle ent,
520  UId fe_uid) {
521  return fe_uid |= ent;
522  }
523 
524  /**
525  * \brief Generate UId for finite element entity
526  * @return finite element entity unique Id
527  */
530  }
531 
532  // TODO: [CORE-61] Get FEDofs by entity type
533 
534  /**
535  * @brief Get the Data Dofs Ptr object
536  *
537  * @return boost::shared_ptr<FEDofEntity_multiIndex>
538  */
539  boost::shared_ptr<FEDofEntity_multiIndex> getDataDofsPtr() const;
540 
541  /**
542  * \brief Get data data dos multi-index structure
543  * @return Reference multi-index FEDofEntity_multiIndex
544  */
545  boost::shared_ptr<std::vector<boost::shared_ptr<FEDofEntity>>>
546  getDataVectorDofsPtr() const;
547 
549  return *getDataFieldEntsPtr();
550  };
551 
552  inline boost::shared_ptr<FieldEntity_vector_view> &
555  return dataFieldEnts;
556  };
557 
559  return *getRowFieldEntsPtr();
560  };
561 
562  inline boost::shared_ptr<FieldEntity_vector_view> &
565  return rowFieldEnts;
566  };
567 
569  return *getColFieldEntsPtr();
570  };
571 
572  inline boost::shared_ptr<FieldEntity_vector_view> &
575  return colFieldEnts;
576  };
577 
578  friend std::ostream &operator<<(std::ostream &os, const EntFiniteElement &e);
579 
580  template <typename FE_ENTS, typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW,
581  typename INSERTER>
582  static MoFEMErrorCode
583  getDofView(const FE_ENTS &fe_ents_view, const MOFEM_DOFS &mofem_dofs,
584  MOFEM_DOFS_VIEW &dofs_view, INSERTER &&inserter) {
586 
587  auto hint = dofs_view.end();
588  using ValType = typename std::remove_reference<decltype(**hint)>::type;
589 
590  for (auto &it : fe_ents_view) {
591  if (auto e = it.lock()) {
592  const auto &uid = e->getLocalUniqueId();
593  auto dit = mofem_dofs.lower_bound(uid);
594  if (dit != mofem_dofs.end()) {
595  const auto hi_dit = mofem_dofs.upper_bound(
596  uid | static_cast<UId>(MAX_DOFS_ON_ENTITY - 1));
597  for (; dit != hi_dit; ++dit)
598  hint = inserter(dofs_view, hint,
599  boost::reinterpret_pointer_cast<ValType>(*dit));
600  }
601  }
602  }
604  }
605 
606  template <typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW>
607  inline MoFEMErrorCode getRowDofView(const MOFEM_DOFS &mofem_dofs,
608  MOFEM_DOFS_VIEW &dofs_view) {
609 
610  auto hint = dofs_view.end();
611  using ValType = typename std::remove_reference<decltype(**hint)>::type;
612  using IndexType = MOFEM_DOFS_VIEW;
613 
614  struct Inserter {
615  using Idx = IndexType;
616  using It = typename Idx::iterator;
617  It operator()(Idx &dofs_view, It &hint,
618  boost::shared_ptr<ValType> &&dof) {
619  return dofs_view.emplace_hint(hint, dof);
620  }
621  };
622 
623  return getDofView(getRowFieldEnts(), mofem_dofs, dofs_view, Inserter());
624  }
625 
626  template <typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW>
627  inline MoFEMErrorCode
628  getColDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view,
629  const int operation_type = moab::Interface::UNION) {
630 
631  auto hint = dofs_view.end();
632  using ValType = typename std::remove_reference<decltype(**hint)>::type;
633  using IndexType = MOFEM_DOFS_VIEW;
634 
635  struct Inserter {
636  using Idx = IndexType;
637  using It = typename Idx::iterator;
638  It operator()(Idx &dofs_view, It &hint,
639  boost::shared_ptr<ValType> &&dof) {
640  return dofs_view.emplace_hint(hint, dof);
641  }
642  };
643 
644  return getDofView(getColFieldEnts(), mofem_dofs, dofs_view, operation_type);
645  }
646 
647  MoFEMErrorCode getElementAdjacency(const boost::shared_ptr<Field> field_ptr,
648  std::vector<EntityHandle> &adjacency);
649 
650 private:
651  mutable boost::shared_ptr<FieldEntity_vector_view> dataFieldEnts;
652  mutable boost::shared_ptr<FieldEntity_vector_view> rowFieldEnts;
653  mutable boost::shared_ptr<FieldEntity_vector_view> colFieldEnts;
654 };
655 
656 /**
657  * \brief interface to EntFiniteElement
658  * \ingroup fe_multi_indices
659  */
660 template <typename T>
662 
663  interface_EntFiniteElement(const boost::shared_ptr<T> &sptr)
664  : interface_FiniteElement<T, T>(sptr, sptr) {}
665  virtual ~interface_EntFiniteElement() = default;
666 
667  inline auto getDataDofsPtr() const { return this->sPtr->getDataDofsPtr(); }
668 
669  inline auto getDataVectorDofsPtr() const {
670  return this->sPtr->getDataVectorDofsPtr();
671  };
672 
674  return this->sPtr->getDataFieldEnts();
675  };
676 
677  inline boost::shared_ptr<FieldEntity_vector_view> &getDataFieldEntsPtr() {
678  return this->sPtr->getDataFieldEntsPtr();
679  };
680 
682  return this->sPtr->getRowFieldEnts();
683  };
684 
685  inline boost::shared_ptr<FieldEntity_vector_view> &
687  return this->sPtr->getRowFieldEntsPtr();
688  }
689 
691  return this->sPtr->getColFieldEnts();
692  };
693 
694  inline boost::shared_ptr<FieldEntity_vector_view> &
696  return this->sPtr->getColFieldEntsPtr();
697  };
698 
699  /**
700  * \brief Get unique UId for finite element entity
701  * @return UId
702  */
703  inline UId getLocalUniqueId() const { return this->sPtr->getLocalUniqueId(); }
704 
706  return this->sPtr->getSideNumberTable();
707  }
708 
709  inline MoFEMErrorCode getElementAdjacency(const Field *field_ptr,
710  Range &adjacency) {
711  return this->getElementAdjacency(field_ptr, adjacency);
712  }
713 
714  inline const boost::shared_ptr<RefElement> &getRefElement() const {
715  return this->sPtr->getRefElement();
716  }
717 };
718 
719 /** \brief Partitioned (Indexed) Finite Element in Problem
720 
721  * This type of structure is used to compose problem. Problem is build from
722  * indexed finite elements. This data structure carry information about
723  * partition, which is specific to problem.
724 
725 
726  * \ingroup fe_multi_indices
727  */
729  : public interface_EntFiniteElement<EntFiniteElement> {
730 
731  virtual ~NumeredEntFiniteElement() = default;
732 
737 
738  unsigned int part; ///< Partition number
739 
740  inline boost::shared_ptr<EntFiniteElement> &getEntFiniteElement() const {
741  return this->sPtr;
742  }
743 
744  /**
745  * \Construct indexed finite element
746  */
747  NumeredEntFiniteElement(const boost::shared_ptr<EntFiniteElement> &sptr);
748 
749  /**
750  * \brief Get partition number
751  * @return [description]
752  */
753  inline unsigned int getPart() const { return part; };
754 
755  /** \brief get FE dof on row
756  * \ingroup mofem_dofs
757  */
758  boost::shared_ptr<FENumeredDofEntity_multiIndex> getRowDofsPtr() const;
759 
760  /** \brief get FE dof on column
761  * \ingroup mofem_dofs
762  */
763  boost::shared_ptr<FENumeredDofEntity_multiIndex> getColDofsPtr() const;
764 
765  /** \brief get FE dof by petsc index
766  * \ingroup mofem_dofs
767  */
768  boost::weak_ptr<FENumeredDofEntity>
769  getRowDofsByPetscGlobalDofIdx(const int idx) const;
770 
771  /** \brief get FE dof by petsc index
772  * \ingroup mofem_dofs
773  */
774  boost::weak_ptr<FENumeredDofEntity>
775  getColDofsByPetscGlobalDofIdx(const int idx) const;
776 
777  friend std::ostream &operator<<(std::ostream &os,
778  const NumeredEntFiniteElement &e);
779 };
780 
781 /**
782  * @relates multi_index_container
783  * \brief MultiIndex container for EntFiniteElement
784  * \ingroup fe_multi_indices
785  *
786  */
787 using EntFiniteElement_multiIndex = multi_index_container<
788  boost::shared_ptr<EntFiniteElement>,
789  indexed_by<
790 
791  ordered_unique<tag<Unique_mi_tag>,
792  const_mem_fun<EntFiniteElement, UId,
794 
795  ordered_non_unique<
796  tag<Ent_mi_tag>,
799 
800  >>;
801 
802 /**
803  @relates multi_index_container
804  \brief MultiIndex for entities for NumeredEntFiniteElement
805  \ingroup fe_multi_indices
806  */
807 using NumeredEntFiniteElement_multiIndex = multi_index_container<
808  boost::shared_ptr<NumeredEntFiniteElement>,
809  indexed_by<
810  ordered_unique<
811  tag<Unique_mi_tag>,
812  const_mem_fun<
815  ordered_non_unique<tag<Part_mi_tag>,
816  member<NumeredEntFiniteElement, unsigned int,
818  ordered_non_unique<
819  tag<Ent_mi_tag>,
822  ordered_non_unique<
823  tag<Composite_Name_And_Part_mi_tag>,
824  composite_key<
825  NumeredEntFiniteElement,
826  const_mem_fun<
828  boost::string_ref, &NumeredEntFiniteElement::getNameRef>,
829  member<NumeredEntFiniteElement, unsigned int,
831 
832 /**
833  @relates multi_index_container
834  \brief MultiIndex for entities for FiniteElement
835  \ingroup fe_multi_indices
836  */
837 typedef multi_index_container<
838  boost::shared_ptr<FiniteElement>,
839  indexed_by<hashed_unique<tag<FiniteElement_Meshset_mi_tag>,
840  member<FiniteElement, EntityHandle,
842  hashed_unique<
843  tag<BitFEId_mi_tag>,
844  const_mem_fun<FiniteElement, BitFEId, &FiniteElement::getId>,
845  HashBit<BitFEId>, EqBit<BitFEId>>,
846  ordered_unique<tag<FiniteElement_name_mi_tag>,
847  const_mem_fun<FiniteElement, boost::string_ref,
850 
851 // modificators
852 
853 /**
854  * \brief Change finite element part
855  *
856  * \ingroup fe_multi_indices
857  */
859  unsigned int pArt;
860  NumeredEntFiniteElement_change_part(unsigned int part) : pArt(part){};
861  void operator()(boost::shared_ptr<NumeredEntFiniteElement> &fe) {
862  fe->part = pArt;
863  }
865 };
866 
867 /**
868  * \brief Add field to column
869  *
870  * \ingroup fe_multi_indices
871  */
875  : fIdCol(f_id_col){};
876  void operator()(boost::shared_ptr<FiniteElement> &fe);
877 };
878 
879 /**
880  * \brief Add field to row
881  *
882  * \ingroup fe_multi_indices
883  */
887  : fIdRow(f_id_row){};
888  void operator()(boost::shared_ptr<FiniteElement> &fe);
889 };
890 
891 /**
892  * \brief Add field to data
893  *
894  * \ingroup fe_multi_indices
895  */
899  : fIdData(f_id_data){};
900  void operator()(boost::shared_ptr<FiniteElement> &fe);
901 };
902 
903 /**
904  * \brief Unset field from column
905  *
906  * \ingroup fe_multi_indices
907  */
911  : fIdCol(f_id_col){};
912  void operator()(boost::shared_ptr<FiniteElement> &fe);
913 };
914 
915 /**
916  * \brief Unset field from row
917  *
918  * \ingroup fe_multi_indices
919  */
923  : fIdRow(f_id_row){};
924  void operator()(boost::shared_ptr<FiniteElement> &fe);
925 };
926 
927 /**
928  * \brief Unset field from data
929  *
930  * \ingroup fe_multi_indices
931  */
935  : fIdData(f_id_data){};
936  void operator()(boost::shared_ptr<FiniteElement> &fe);
937 };
938 
939 /**
940  * \brief Reset field from column
941  *
942  * \ingroup fe_multi_indices
943  */
946  void operator()(boost::shared_ptr<FiniteElement> &fe);
947 };
948 
949 /**
950  * \brief Reset field from row
951  *
952  * \ingroup fe_multi_indices
953  */
956  void operator()(boost::shared_ptr<FiniteElement> &fe);
957 };
958 
959 /**
960  * \brief Reset field from data
961  *
962  * \ingroup fe_multi_indices
963  */
965  FiniteElement_change_bit_reset() = default;
966  void operator()(boost::shared_ptr<FiniteElement> &fe);
967 };
968 
969 } // namespace MoFEM
970 
971 #endif // __FEMMULTIINDICES_HPP__
972 
973 /**
974  * \defgroup fe_multi_indices Finite elements structures and multi-indices
975  * \ingroup mofem
976  **/
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MoFEM::interface_FiniteElement< T, T >::getFiniteElementPtr
boost::shared_ptr< FiniteElement > & getFiniteElementPtr() const
Definition: FEMultiIndices.hpp:473
MoFEM::NumeredEntFiniteElement::getColDofsPtr
boost::shared_ptr< FENumeredDofEntity_multiIndex > getColDofsPtr() const
get FE dof on column
Definition: FEMultiIndices.cpp:603
MoFEM::FiniteElement_change_bit_reset::FiniteElement_change_bit_reset
FiniteElement_change_bit_reset()=default
MoFEM::FiniteElement_row_change_bit_add::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:375
MoFEM::FiniteElement_change_bit_add
Add field to data.
Definition: FEMultiIndices.hpp:896
MoFEM::interface_RefElement< EntFiniteElement >::interface_type_RefEntity
interface_RefEntity< EntFiniteElement > interface_type_RefEntity
Definition: RefElementMultiIndices.hpp:137
MoFEM::FiniteElement_row_change_bit_add
Add field to row.
Definition: FEMultiIndices.hpp:884
MoFEM::DefaultElementAdjacency
default adjacency map
Definition: FEMultiIndices.hpp:128
MoFEM::FiniteElement_change_bit_off::fIdData
BitFieldId fIdData
Definition: FEMultiIndices.hpp:933
EntityHandle
MoFEM::FiniteElement_col_change_bit_add
Add field to column.
Definition: FEMultiIndices.hpp:872
MoFEM::EntFiniteElement::getDataFieldEnts
FieldEntity_vector_view & getDataFieldEnts() const
Definition: FEMultiIndices.hpp:548
MoFEM::EntFiniteElement::getDataVectorDofsPtr
boost::shared_ptr< std::vector< boost::shared_ptr< FEDofEntity > > > getDataVectorDofsPtr() const
Get data data dos multi-index structure.
Definition: FEMultiIndices.cpp:545
MoFEM::FiniteElement::getId
BitFEId getId() const
Get finite element id.
Definition: FEMultiIndices.hpp:50
MoFEM::interface_EntFiniteElement::~interface_EntFiniteElement
virtual ~interface_EntFiniteElement()=default
MoFEM::EntityCacheNumeredDofs
Definition: FEMultiIndices.hpp:483
MoFEM::FiniteElement_row_change_bit_reset
Reset field from row.
Definition: FEMultiIndices.hpp:954
MoFEM::NumeredEntFiniteElement::interface_type_EntFiniteElement
interface_EntFiniteElement< EntFiniteElement > interface_type_EntFiniteElement
Definition: FEMultiIndices.hpp:736
MoFEM::NumeredEntFiniteElement::interface_type_FiniteElement
interface_FiniteElement< EntFiniteElement, EntFiniteElement > interface_type_FiniteElement
Definition: FEMultiIndices.hpp:734
MoFEM::interface_EntFiniteElement::getSideNumberTable
SideNumber_multiIndex & getSideNumberTable() const
Definition: FEMultiIndices.hpp:705
MoFEM::NumeredEntFiniteElement::getPart
unsigned int getPart() const
Get partition number.
Definition: FEMultiIndices.hpp:753
MoFEM::interface_EntFiniteElement::getDataFieldEnts
FieldEntity_vector_view & getDataFieldEnts() const
Definition: FEMultiIndices.hpp:673
MoFEM::FiniteElement_col_change_bit_add::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:370
MoFEM::interface_FiniteElement< T, T >::getId
BitFEId getId() const
Get finite element id.
Definition: FEMultiIndices.hpp:422
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::FieldEntity_vector_view
std::vector< boost::weak_ptr< FieldEntity > > FieldEntity_vector_view
Definition: FieldEntsMultiIndices.hpp:478
MoFEM::interface_FiniteElementImpl::interface_FiniteElementImpl
interface_FiniteElementImpl(const boost::shared_ptr< FE > fe_ptr, const boost::shared_ptr< REFENT > ref_ents_ptr)
Definition: FEMultiIndices.hpp:321
MoFEM::EntityCacheDofs::loHi
std::array< DofEntity_multiIndex::iterator, 2 > loHi
Definition: FEMultiIndices.hpp:480
MoFEM::DefaultElementAdjacency::defaultEdge
static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
Definition: FEMultiIndices.cpp:55
MoFEM::EntFiniteElement::interface_type_RefEntity
interface_RefEntity< RefElement > interface_type_RefEntity
Definition: FEMultiIndices.hpp:504
MoFEM::FiniteElement::elementAdjacencyTable
std::array< ElementAdjacencyFunct, MBMAXTYPE > elementAdjacencyTable
Table of functions retrieving adjacencies for finite element User can alter and change default behavi...
Definition: FEMultiIndices.hpp:114
MoFEM::interface_RefEntity::sPtr
boost::shared_ptr< T > sPtr
Definition: RefEntsMultiIndices.hpp:711
MoFEM::Types::BitFieldId
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:42
MoFEM::FiniteElement::getNameRef
boost::string_ref getNameRef() const
Get finite element name.
Definition: FEMultiIndices.hpp:62
MoFEM::interface_RefEntity< RefElement >::getEnt
EntityHandle getEnt() const
Get the entity handle.
Definition: RefEntsMultiIndices.hpp:603
MoFEM::interface_FiniteElement< T, T >::getMeshset
EntityHandle getMeshset() const
Get meshset containing element entities.
Definition: FEMultiIndices.hpp:427
MoFEM::FiniteElement_change_bit_reset
Reset field from data.
Definition: FEMultiIndices.hpp:964
MoFEM::interface_FiniteElement::getBitNumber
unsigned int getBitNumber() const
Get bit identifying this element.
Definition: FEMultiIndices.hpp:392
MoFEM::EntFiniteElement::getDataDofsPtr
boost::shared_ptr< FEDofEntity_multiIndex > getDataDofsPtr() const
Get the Data Dofs Ptr object.
Definition: FEMultiIndices.cpp:519
MoFEM::EntFiniteElement
Finite element data for entity.
Definition: FEMultiIndices.hpp:501
MoFEM::FiniteElement_col_change_bit_add::FiniteElement_col_change_bit_add
FiniteElement_col_change_bit_add(const BitFieldId f_id_col)
Definition: FEMultiIndices.hpp:874
MoFEM::FiniteElement::tagId
BitFEId * tagId
ptr to tag storing FE id
Definition: FEMultiIndices.hpp:29
MoFEM::interface_FiniteElement< T, T >::getBitFieldIdCol
BitFieldId getBitFieldIdCol() const
Get field ids on columns.
Definition: FEMultiIndices.hpp:448
MoFEM::interface_RefEntity< RefElement >
MoFEM::interface_EntFiniteElement::getDataDofsPtr
auto getDataDofsPtr() const
Definition: FEMultiIndices.hpp:667
MoFEM::NumeredEntFiniteElement_change_part::NumeredEntFiniteElement_change_part
NumeredEntFiniteElement_change_part(unsigned int part)
Definition: FEMultiIndices.hpp:860
MoFEM::interface_FiniteElement::getId
BitFEId getId() const
Get finite element id.
Definition: FEMultiIndices.hpp:345
MoFEM::FiniteElement_row_change_bit_add::fIdRow
BitFieldId fIdRow
Definition: FEMultiIndices.hpp:885
MoFEM::FiniteElement::operator<<
friend std::ostream & operator<<(std::ostream &os, const FiniteElement &e)
print finite element
Definition: FEMultiIndices.cpp:363
MoFEM::Types::BitFEId
std::bitset< BITFEID_SIZE > BitFEId
Finite element Id.
Definition: Types.hpp:43
THROW_MESSAGE
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:574
MoFEM::interface_RefElement
intrface to RefElement
Definition: RefElementMultiIndices.hpp:135
MoFEM::EntFiniteElement::getRowDofView
MoFEMErrorCode getRowDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view)
Definition: FEMultiIndices.hpp:607
MoFEM::NumeredEntFiniteElement::operator<<
friend std::ostream & operator<<(std::ostream &os, const NumeredEntFiniteElement &e)
Definition: FEMultiIndices.cpp:488
MoFEM::Field
Provide data structure for (tensor) field approximation.
Definition: FieldMultiIndices.hpp:51
MoFEM::FiniteElement_col_change_bit_off::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:385
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::FiniteElement_change_bit_off::FiniteElement_change_bit_off
FiniteElement_change_bit_off(const BitFieldId f_id_data)
Definition: FEMultiIndices.hpp:934
MoFEM::FiniteElement::tag_BitFieldId_row_data
BitFieldId * tag_BitFieldId_row_data
tag stores row id_id for fields
Definition: FEMultiIndices.hpp:33
MoFEM::DefaultElementAdjacency::defVertexTypeMap
static constexpr DefEntTypeMap defVertexTypeMap
Definition: FEMultiIndices.hpp:151
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
MoFEM::DefaultElementAdjacency::defTypeMap
static constexpr std::array< const DefEntTypeMap *, MBMAXTYPE > defTypeMap
Definition: FEMultiIndices.hpp:287
MoFEM::FiniteElement_row_change_bit_off
Unset field from row.
Definition: FEMultiIndices.hpp:920
MoFEM::interface_FiniteElementImpl::~interface_FiniteElementImpl
virtual ~interface_FiniteElementImpl()=default
MoFEM::interface_FiniteElement::sFiniteElementPtr
boost::shared_ptr< FE > sFiniteElementPtr
Definition: FEMultiIndices.hpp:401
MoFEM::DefaultElementAdjacency::defaultPrism
static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
Definition: FEMultiIndices.cpp:157
MoFEM::FiniteElement::meshset
EntityHandle meshset
meshset stores FE ents
Definition: FEMultiIndices.hpp:28
MoFEM::interface_EntFiniteElement::getRowFieldEntsPtr
boost::shared_ptr< FieldEntity_vector_view > & getRowFieldEntsPtr() const
Definition: FEMultiIndices.hpp:686
MoFEM::NumeredEntFiniteElement::getColDofsByPetscGlobalDofIdx
boost::weak_ptr< FENumeredDofEntity > getColDofsByPetscGlobalDofIdx(const int idx) const
get FE dof by petsc index
Definition: FEMultiIndices.cpp:470
MoFEM::NumeredEntFiniteElement_change_part
Change finite element part.
Definition: FEMultiIndices.hpp:858
MoFEM::DefaultElementAdjacency::defEdgeTypeMap
static constexpr DefEntTypeMap defEdgeTypeMap
Definition: FEMultiIndices.hpp:168
MoFEM::NumeredEntFiniteElement::getEntFiniteElement
boost::shared_ptr< EntFiniteElement > & getEntFiniteElement() const
Definition: FEMultiIndices.hpp:740
MoFEM::FiniteElement_change_bit_reset::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:410
MoFEM::interface_FiniteElement< T, T >::getName
std::string getName() const
Get finite element name.
Definition: FEMultiIndices.hpp:441
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::interface_EntFiniteElement::getDataFieldEntsPtr
boost::shared_ptr< FieldEntity_vector_view > & getDataFieldEntsPtr()
Definition: FEMultiIndices.hpp:677
MoFEM::DefaultElementAdjacency::defaultVertex
static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
Definition: FEMultiIndices.cpp:28
MoFEM::NumeredEntFiniteElement::getRowDofsPtr
boost::shared_ptr< FENumeredDofEntity_multiIndex > getRowDofsPtr() const
get FE dof on row
Definition: FEMultiIndices.cpp:575
MoFEM::interface_FiniteElement< T, T >::getBitNumber
unsigned int getBitNumber() const
Get bit identifying this element.
Definition: FEMultiIndices.hpp:469
MoFEM::FiniteElement_row_change_bit_off::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:390
MoFEM::DefaultElementAdjacency::defaultMeshset
static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
Definition: FEMultiIndices.cpp:295
MoFEM::Types::UId
uint128_t UId
Unique Id.
Definition: Types.hpp:31
MoFEM::EntFiniteElement::getDataFieldEntsPtr
boost::shared_ptr< FieldEntity_vector_view > & getDataFieldEntsPtr() const
Definition: FEMultiIndices.hpp:553
MoFEM::FiniteElement::feUId
UId feUId
Definition: FEMultiIndices.hpp:35
MoFEM::interface_FiniteElement< T, T >::getNameRef
boost::string_ref getNameRef() const
Get finite element name.
Definition: FEMultiIndices.hpp:434
MoFEM::NumeredEntFiniteElement_change_part::pArt
unsigned int pArt
Definition: FEMultiIndices.hpp:859
MoFEM::interface_FiniteElement::getFiniteElementPtr
boost::shared_ptr< FE > & getFiniteElementPtr() const
Definition: FEMultiIndices.hpp:396
MoFEM::FiniteElement_change_bit_off
Unset field from data.
Definition: FEMultiIndices.hpp:932
convert.type
type
Definition: convert.py:64
MoFEM::NumeredEntFiniteElement_change_part::operator()
void operator()(NumeredEntFiniteElement &fe)
Definition: FEMultiIndices.hpp:864
MoFEM::EntFiniteElement::getLocalUniqueId
UId getLocalUniqueId() const
Get unique UId for finite element entity.
Definition: FEMultiIndices.hpp:517
MoFEM::interface_EntFiniteElement::getRefElement
const boost::shared_ptr< RefElement > & getRefElement() const
Definition: FEMultiIndices.hpp:714
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::EntFiniteElement::getLocalUniqueIdCalculate
UId getLocalUniqueIdCalculate() const
Generate UId for finite element entity.
Definition: FEMultiIndices.hpp:528
MoFEM::FiniteElement_change_bit_add::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:380
MoFEM::DefaultElementAdjacency::defaultVolume
static MoFEMErrorCode defaultVolume(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
Definition: FEMultiIndices.cpp:121
MoFEM::FiniteElement::ent_shift
static constexpr int ent_shift
Definition: FEMultiIndices.hpp:122
MoFEM::FiniteElement::getBitNumber
unsigned int getBitNumber() const
Get bit identifying this element.
Definition: FEMultiIndices.hpp:106
MoFEM::NumeredEntFiniteElement::part
unsigned int part
Partition number.
Definition: FEMultiIndices.hpp:738
MoFEM::FiniteElement_row_change_bit_off::fIdRow
BitFieldId fIdRow
Definition: FEMultiIndices.hpp:921
MoFEM::FiniteElement_col_change_bit_off::fIdCol
BitFieldId fIdCol
Definition: FEMultiIndices.hpp:909
MoFEM::FiniteElement::tag_BitFieldId_col_data
BitFieldId * tag_BitFieldId_col_data
tag stores col id_id for fields
Definition: FEMultiIndices.hpp:32
MoFEM::FiniteElement::tagNameSize
int tagNameSize
numer of characters in FE name
Definition: FEMultiIndices.hpp:31
MoFEM::FiniteElement::getBitFieldIdRow
BitFieldId getBitFieldIdRow() const
Get field ids on rows.
Definition: FEMultiIndices.hpp:86
MoFEM::interface_EntFiniteElement::getDataVectorDofsPtr
auto getDataVectorDofsPtr() const
Definition: FEMultiIndices.hpp:669
MoFEM::DefaultElementAdjacency::defaultFace
static MoFEMErrorCode defaultFace(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
Definition: FEMultiIndices.cpp:87
MoFEM::interface_FiniteElement::~interface_FiniteElement
virtual ~interface_FiniteElement()=default
MoFEM::FiniteElement_row_change_bit_off::FiniteElement_row_change_bit_off
FiniteElement_row_change_bit_off(const BitFieldId f_id_row)
Definition: FEMultiIndices.hpp:922
MoFEM::FiniteElement_col_change_bit_off
Unset field from column.
Definition: FEMultiIndices.hpp:908
MoFEM::interface_EntFiniteElement::getLocalUniqueId
UId getLocalUniqueId() const
Get unique UId for finite element entity.
Definition: FEMultiIndices.hpp:703
MoFEM::interface_EntFiniteElement::interface_EntFiniteElement
interface_EntFiniteElement(const boost::shared_ptr< T > &sptr)
Definition: FEMultiIndices.hpp:663
MoFEM::FiniteElement::tag_BitFieldId_data
BitFieldId * tag_BitFieldId_data
tag stores data id_id for fields
Definition: FEMultiIndices.hpp:34
MoFEM::FiniteElement::getBitFieldIdCol
BitFieldId getBitFieldIdCol() const
Get field ids on columns.
Definition: FEMultiIndices.hpp:78
MoFEM::EntFiniteElement::colFieldEnts
boost::shared_ptr< FieldEntity_vector_view > colFieldEnts
Definition: FEMultiIndices.hpp:653
MoFEM::FiniteElement_col_change_bit_reset::FiniteElement_col_change_bit_reset
FiniteElement_col_change_bit_reset()=default
MoFEM::CacheTupleSharedPtr
boost::shared_ptr< CacheTuple > CacheTupleSharedPtr
Definition: FEMultiIndices.hpp:495
MoFEM::EntFiniteElement::getColFieldEnts
FieldEntity_vector_view & getColFieldEnts() const
Definition: FEMultiIndices.hpp:568
MoFEM::interface_EntFiniteElement::getColFieldEnts
FieldEntity_vector_view & getColFieldEnts() const
Definition: FEMultiIndices.hpp:690
MoFEM::FiniteElement
Finite element definition.
Definition: FEMultiIndices.hpp:26
MoFEM::FiniteElement_change_bit_off::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:395
NumeredEntFiniteElement_multiIndex
multi_index_container< boost::shared_ptr< NumeredEntFiniteElement >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< NumeredEntFiniteElement::interface_type_EntFiniteElement, UId, &NumeredEntFiniteElement::getLocalUniqueId > >, ordered_non_unique< tag< Part_mi_tag >, member< NumeredEntFiniteElement, unsigned int, &NumeredEntFiniteElement::part > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< NumeredEntFiniteElement::interface_type_RefEntity, EntityHandle, &NumeredEntFiniteElement::getEnt > >, ordered_non_unique< tag< Composite_Name_And_Part_mi_tag >, composite_key< NumeredEntFiniteElement, const_mem_fun< NumeredEntFiniteElement::interface_type_FiniteElement, boost::string_ref, &NumeredEntFiniteElement::getNameRef >, member< NumeredEntFiniteElement, unsigned int, &NumeredEntFiniteElement::part > >> >> NumeredEntFiniteElement_multiIndex
MultiIndex for entities for NumeredEntFiniteElement.
Definition: FEMultiIndices.hpp:830
MoFEM::EntFiniteElement::getColFieldEntsPtr
boost::shared_ptr< FieldEntity_vector_view > & getColFieldEntsPtr() const
Definition: FEMultiIndices.hpp:573
MoFEM::FiniteElement::getMeshset
EntityHandle getMeshset() const
Get meshset containing element entities.
Definition: FEMultiIndices.hpp:56
MoFEM::EntFiniteElement::EntFiniteElement
EntFiniteElement(const boost::shared_ptr< RefElement > &ref_finite_element, const boost::shared_ptr< FiniteElement > &fe_ptr)
Definition: FEMultiIndices.cpp:416
MoFEM::FiniteElement_change_bit_add::FiniteElement_change_bit_add
FiniteElement_change_bit_add(const BitFieldId f_id_data)
Definition: FEMultiIndices.hpp:898
MoFEM::DefaultElementAdjacency::DefEntTypeMap
std::array< bool, MBMAXTYPE > DefEntTypeMap
Definition: FEMultiIndices.hpp:149
MoFEM::interface_FiniteElement< T, T >::getBitFieldIdData
BitFieldId getBitFieldIdData() const
Get field ids on data.
Definition: FEMultiIndices.hpp:462
MAX_DOFS_ON_ENTITY
#define MAX_DOFS_ON_ENTITY
Maximal number of DOFs on entity.
Definition: definitions.h:249
MoFEM::interface_FiniteElement::getBitFieldIdCol
BitFieldId getBitFieldIdCol() const
Get field ids on columns.
Definition: FEMultiIndices.hpp:371
MoFEM::FiniteElement::getName
std::string getName() const
Get finite element name.
Definition: FEMultiIndices.hpp:70
MoFEM::NumeredEntFiniteElement::~NumeredEntFiniteElement
virtual ~NumeredEntFiniteElement()=default
MoFEM::interface_EntFiniteElement::getElementAdjacency
MoFEMErrorCode getElementAdjacency(const Field *field_ptr, Range &adjacency)
Definition: FEMultiIndices.hpp:709
MoFEM::interface_FiniteElement::getBitFieldIdData
BitFieldId getBitFieldIdData() const
Get field ids on data.
Definition: FEMultiIndices.hpp:385
MoFEM::ElementAdjacencyFunct
boost::function< MoFEMErrorCode(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)> ElementAdjacencyFunct
user adjacency function
Definition: FEMultiIndices.hpp:20
Range
MoFEM::interface_FiniteElement::interface_FiniteElement
interface_FiniteElement(const boost::shared_ptr< FE > fe_ptr, const boost::shared_ptr< REFENT > ref_ents_ptr)
Definition: FEMultiIndices.hpp:329
MoFEM::interface_FiniteElement::getName
std::string getName() const
Get finite element name.
Definition: FEMultiIndices.hpp:364
MoFEM::EntFiniteElement::getDofView
static MoFEMErrorCode getDofView(const FE_ENTS &fe_ents_view, const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view, INSERTER &&inserter)
Definition: FEMultiIndices.hpp:583
MoFEM::interface_EntFiniteElement::getColFieldEntsPtr
boost::shared_ptr< FieldEntity_vector_view > & getColFieldEntsPtr() const
Definition: FEMultiIndices.hpp:695
MoFEM::EntFiniteElement::getElementAdjacency
MoFEMErrorCode getElementAdjacency(const boost::shared_ptr< Field > field_ptr, std::vector< EntityHandle > &adjacency)
Definition: FEMultiIndices.cpp:432
MoFEM::interface_EntFiniteElement
interface to EntFiniteElement
Definition: FEMultiIndices.hpp:661
MoFEM::NumeredEntFiniteElement::getRowDofsByPetscGlobalDofIdx
boost::weak_ptr< FENumeredDofEntity > getRowDofsByPetscGlobalDofIdx(const int idx) const
get FE dof by petsc index
Definition: FEMultiIndices.cpp:452
MoFEM::FiniteElement::getFEUId
const UId & getFEUId() const
Get finite element uid.
Definition: FEMultiIndices.hpp:44
MoFEM::interface_FiniteElement::getBitFieldIdRow
BitFieldId getBitFieldIdRow() const
Get field ids on rows.
Definition: FEMultiIndices.hpp:378
MoFEM::FiniteElement_change_bit_add::fIdData
BitFieldId fIdData
Definition: FEMultiIndices.hpp:897
MoFEM::DefaultElementAdjacency::defHexTypeMap
static constexpr DefEntTypeMap defHexTypeMap
Definition: FEMultiIndices.hpp:236
MoFEM::EntFiniteElement::rowFieldEnts
boost::shared_ptr< FieldEntity_vector_view > rowFieldEnts
Definition: FEMultiIndices.hpp:652
MoFEM::DefaultElementAdjacency::defMeshsetTypeMap
static constexpr DefEntTypeMap defMeshsetTypeMap
Definition: FEMultiIndices.hpp:270
MoFEM::FiniteElement::getBitFieldIdData
BitFieldId getBitFieldIdData() const
Get field ids on data.
Definition: FEMultiIndices.hpp:94
MoFEM::FiniteElement_row_change_bit_reset::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:405
MoFEM::interface_FiniteElement::getFEUId
const UId & getFEUId() const
Get finite element uid.
Definition: FEMultiIndices.hpp:338
MoFEM::EntityCacheDofs
Definition: FEMultiIndices.hpp:479
MoFEM::CacheTupleWeakPtr
boost::weak_ptr< CacheTuple > CacheTupleWeakPtr
Definition: FEMultiIndices.hpp:494
MoFEM::DefaultElementAdjacency::defTriTypeMap
static constexpr DefEntTypeMap defTriTypeMap
Definition: FEMultiIndices.hpp:185
MoFEM::interface_FiniteElement::getNameRef
boost::string_ref getNameRef() const
Get finite element name.
Definition: FEMultiIndices.hpp:357
MoFEM::interface_FiniteElement
Definition: FEMultiIndices.hpp:328
MoFEM::FiniteElement_col_change_bit_reset::operator()
void operator()(boost::shared_ptr< FiniteElement > &fe)
Definition: FEMultiIndices.cpp:400
MoFEM::EntFiniteElement::operator<<
friend std::ostream & operator<<(std::ostream &os, const EntFiniteElement &e)
Definition: FEMultiIndices.cpp:425
MoFEM::EntityCacheNumeredDofs::loHi
std::array< NumeredDofEntity_multiIndex::iterator, 2 > loHi
Definition: FEMultiIndices.hpp:484
MoFEM::interface_RefElement< REFENT >::getRefElement
boost::shared_ptr< REFENT > & getRefElement() const
Definition: RefElementMultiIndices.hpp:161
FiniteElement_multiIndex
multi_index_container< boost::shared_ptr< FiniteElement >, indexed_by< hashed_unique< tag< FiniteElement_Meshset_mi_tag >, member< FiniteElement, EntityHandle, &FiniteElement::meshset > >, hashed_unique< tag< BitFEId_mi_tag >, const_mem_fun< FiniteElement, BitFEId, &FiniteElement::getId >, HashBit< BitFEId >, EqBit< BitFEId > >, ordered_unique< tag< FiniteElement_name_mi_tag >, const_mem_fun< FiniteElement, boost::string_ref, &FiniteElement::getNameRef > > > > FiniteElement_multiIndex
MultiIndex for entities for FiniteElement.
Definition: FEMultiIndices.hpp:849
MoFEM::NumeredEntFiniteElement
Partitioned (Indexed) Finite Element in Problem.
Definition: FEMultiIndices.hpp:728
MoFEM::EntFiniteElement::getRowFieldEnts
FieldEntity_vector_view & getRowFieldEnts() const
Definition: FEMultiIndices.hpp:558
MoFEM::interface_EntFiniteElement::getRowFieldEnts
FieldEntity_vector_view & getRowFieldEnts() const
Definition: FEMultiIndices.hpp:681
MoFEM::CacheTuple
std::tuple< std::vector< EntityCacheDofs >, std::vector< EntityCacheNumeredDofs >, std::vector< EntityCacheNumeredDofs > > CacheTuple
Definition: FEMultiIndices.hpp:492
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
MoFEM::EntFiniteElement::getLocalUniqueIdCalculate
static UId getLocalUniqueIdCalculate(const EntityHandle ent, UId fe_uid)
Definition: FEMultiIndices.hpp:519
MoFEM::EntFiniteElement::dataFieldEnts
boost::shared_ptr< FieldEntity_vector_view > dataFieldEnts
Definition: FEMultiIndices.hpp:651
MoFEM::DefaultElementAdjacency::defTetTypeMap
static constexpr DefEntTypeMap defTetTypeMap
Definition: FEMultiIndices.hpp:219
MoFEM::DefaultElementAdjacency::defPrismTypeMap
static constexpr DefEntTypeMap defPrismTypeMap
Definition: FEMultiIndices.hpp:253
MoFEM::EntFiniteElement::~EntFiniteElement
virtual ~EntFiniteElement()=default
MoFEM::NumeredEntFiniteElement_change_part::operator()
void operator()(boost::shared_ptr< NumeredEntFiniteElement > &fe)
Definition: FEMultiIndices.hpp:861
MoFEM::FiniteElement_row_change_bit_reset::FiniteElement_row_change_bit_reset
FiniteElement_row_change_bit_reset()=default
MoFEM::FiniteElement_col_change_bit_add::fIdCol
BitFieldId fIdCol
Definition: FEMultiIndices.hpp:873
MoFEM::FiniteElement_row_change_bit_add::FiniteElement_row_change_bit_add
FiniteElement_row_change_bit_add(const BitFieldId f_id_row)
Definition: FEMultiIndices.hpp:886
MoFEM::interface_FiniteElement< T, T >::interface_FiniteElement
interface_FiniteElement(const boost::shared_ptr< T > fe_ptr, const boost::shared_ptr< T > ref_ents_ptr)
Definition: FEMultiIndices.hpp:408
MoFEM::EntFiniteElement::getColDofView
MoFEMErrorCode getColDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view, const int operation_type=moab::Interface::UNION)
Definition: FEMultiIndices.hpp:628
MoFEM::EntFiniteElement::getRowFieldEntsPtr
boost::shared_ptr< FieldEntity_vector_view > & getRowFieldEntsPtr() const
Definition: FEMultiIndices.hpp:563
MoFEM::NumeredEntFiniteElement::NumeredEntFiniteElement
NumeredEntFiniteElement(const boost::shared_ptr< EntFiniteElement > &sptr)
Definition: FEMultiIndices.cpp:447
MoFEM::interface_FiniteElementImpl
Inetface for FE.
Definition: FEMultiIndices.hpp:319
convert.int
int
Definition: convert.py:64
MoFEM::RefEntityTmp
Definition: RefEntsMultiIndices.hpp:118
MoFEM::FiniteElement_col_change_bit_reset
Reset field from column.
Definition: FEMultiIndices.hpp:944
MoFEM::FiniteElement::tagName
void * tagName
ptr to tag storing FE name
Definition: FEMultiIndices.hpp:30
EntFiniteElement_multiIndex
multi_index_container< boost::shared_ptr< EntFiniteElement >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< EntFiniteElement, UId, &EntFiniteElement::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< EntFiniteElement::interface_type_RefEntity, EntityHandle, &EntFiniteElement::getEnt > > > > EntFiniteElement_multiIndex
MultiIndex container for EntFiniteElement.
Definition: FEMultiIndices.hpp:800
MoFEM::interface_FiniteElement::getMeshset
EntityHandle getMeshset() const
Get meshset containing element entities.
Definition: FEMultiIndices.hpp:350
MoFEM::FiniteElement_col_change_bit_off::FiniteElement_col_change_bit_off
FiniteElement_col_change_bit_off(const BitFieldId f_id_col)
Definition: FEMultiIndices.hpp:910
MoFEM::FiniteElement::FiniteElement
FiniteElement(Interface &moab, const EntityHandle _meshset)
Definition: FEMultiIndices.cpp:325
MoFEM::interface_FiniteElement< T, T >::getBitFieldIdRow
BitFieldId getBitFieldIdRow() const
Get field ids on rows.
Definition: FEMultiIndices.hpp:455
MoFEM::interface_FiniteElement< T, T >::getFEUId
const UId & getFEUId() const
Get finite element uid.
Definition: FEMultiIndices.hpp:415
MoFEM::DefaultElementAdjacency::defQuadTypeMap
static constexpr DefEntTypeMap defQuadTypeMap
Definition: FEMultiIndices.hpp:202
MoFEM::DefaultElementAdjacency::getDefTypeMap
static bool getDefTypeMap(const EntityType fe_type, const EntityType ent_type)
Definition: FEMultiIndices.hpp:304