v0.9.1
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 
6 /* MoFEM is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
18  */
19 
20 #ifndef __FEMMULTIINDICES_HPP__
21 #define __FEMMULTIINDICES_HPP__
22 
23 namespace MoFEM {
24 
25 /**
26  * \brief keeps data about abstract refined finite element
27  * \ingroup fe_multi_indices
28  */
29 struct RefElement : public interface_RefEntity<RefEntity> {
30 
32 
34 
36  RefElement(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
37  virtual const BitRefEdges &getBitRefEdges() const { return DummyBitRefEdges; }
38 
39  virtual int getBitRefEdgesUlong() const { return 0; }
40 
42  return const_cast<SideNumber_multiIndex &>(side_number_table);
43  }
44 
45  static const boost::shared_ptr<SideNumber> nullSideNumber;
46 
47  virtual const boost::shared_ptr<SideNumber> &
48  getSideNumberPtr(const EntityHandle ent) const {
49  NOT_USED(ent);
50  return nullSideNumber;
51  };
52 
53  /**
54  * \brief Get pointer to RefEntity
55  */
56  inline boost::shared_ptr<RefEntity> &getRefEntityPtr() const {
57  return this->sPtr;
58  }
59 
60  friend std::ostream &operator<<(std::ostream &os, const RefElement &e);
61 };
62 
63 /**
64  * \brief keeps data about abstract MESHSET finite element
65  * \ingroup fe_multi_indices
66  */
67 struct RefElement_MESHSET : public RefElement {
68  RefElement_MESHSET(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
69  const boost::shared_ptr<SideNumber> &
70  getSideNumberPtr(const EntityHandle ent) const;
71 };
72 /**
73  * \brief keeps data about abstract PRISM finite element
74  * \ingroup fe_multi_indices
75  */
76 struct RefElement_PRISM : public RefElement {
78  RefElement_PRISM(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
79  const boost::shared_ptr<SideNumber> &
80  getSideNumberPtr(const EntityHandle ent) const;
81  const BitRefEdges &getBitRefEdges() const { return *tag_BitRefEdges; }
82  int getBitRefEdgesUlong() const { return getBitRefEdges().to_ulong(); }
83 };
84 
85 /**
86  * \brief keeps data about abstract TET finite element
87  * \ingroup fe_multi_indices
88  */
89 struct RefElement_TET : public RefElement {
91  const int *tag_type_data;
92  RefElement_TET(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
93  const boost::shared_ptr<SideNumber> &
94  getSideNumberPtr(const EntityHandle ent) const;
96  return const_cast<SideNumber_multiIndex &>(side_number_table);
97  };
98  const BitRefEdges &getBitRefEdges() const { return *tag_BitRefEdges; }
99  int getBitRefEdgesUlong() const { return getBitRefEdges().to_ulong(); }
100 };
101 
102 /**
103  * \brief keeps data about abstract TRI finite element
104  * \ingroup fe_multi_indices
105  */
106 struct RefElementFace : public RefElement {
107  RefElementFace(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
108  const boost::shared_ptr<SideNumber> &
109  getSideNumberPtr(const EntityHandle ent) const;
110  friend std::ostream &operator<<(std::ostream &os, const RefElementFace &e);
111 };
112 
113 /**
114  * \brief keeps data about abstract EDGE finite element
115  * \ingroup fe_multi_indices
116  */
117 struct RefElement_EDGE : public RefElement {
118  RefElement_EDGE(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
119  const boost::shared_ptr<SideNumber> &
120  getSideNumberPtr(const EntityHandle ent) const;
121  friend std::ostream &operator<<(std::ostream &os, const RefElement_EDGE &e);
122 };
123 
124 /**
125  * \brief keeps data about abstract VERTEX finite element
126  * \ingroup fe_multi_indices
127  */
128 struct RefElement_VERTEX : public RefElement {
129  RefElement_VERTEX(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
130  const boost::shared_ptr<SideNumber> &
131  getSideNumberPtr(const EntityHandle ent) const;
132  friend std::ostream &operator<<(std::ostream &os, const RefElement_VERTEX &e);
133 };
134 
135 /**
136  * \brief intrface to RefElement
137  * \ingroup fe_multi_indices
138  */
139 template <typename T> struct interface_RefElement : interface_RefEntity<T> {
140 
143 
144  interface_RefElement(const boost::shared_ptr<T> &sptr)
145  : interface_RefEntity<T>(sptr) {}
146 
147  inline int getBitRefEdgesUlong() const {
148  return this->sPtr->getBitRefEdgesUlong();
149  }
150 
152  return this->sPtr->getSideNumberTable();
153  }
154 
155  inline const boost::shared_ptr<SideNumber> &
156  getSideNumberPtr(const EntityHandle ent) const {
157  return this->sPtr->getSideNumberPtr(ent);
158  }
159 
160  inline boost::shared_ptr<RefEntity> &getRefEntityPtr() const {
161  return this->sPtr->getRefEntityPtr();
162  }
163 
164  inline const boost::shared_ptr<T> &getRefElement() const {
165  return this->sPtr;
166  }
167 
169 };
170 
171 /**
172  * \typedef RefElement_multiIndex
173  * type multiIndex container for RefElement
174  * \ingroup fe_multi_indices
175  *
176  * \param hashed_unique Ent_mi_tag
177  * \param ordered_non_unique Meshset_mi_tag
178  * \param ordered_non_unique Ent_Ent_mi_tag
179  * \param ordered_non_unique Composite_ParentEnt_And_BitsOfRefinedEdges_mi_tag
180  */
181 typedef multi_index_container<
182  boost::shared_ptr<RefElement>,
183  // ptrWrapperRefElement,
184  indexed_by<
185  ordered_unique<tag<Ent_mi_tag>,
188  ordered_non_unique<tag<EntType_mi_tag>,
190  EntityType, &RefElement::getEntType>>>>
192 
193 typedef multi_index_container<
194  boost::shared_ptr<RefElement>,
195  // ptrWrapperRefElement,
196  indexed_by<
197  ordered_unique<tag<Ent_mi_tag>,
200  ordered_non_unique<
201  tag<Ent_Ent_mi_tag>,
204  ordered_non_unique<
205  tag<Composite_ParentEnt_And_BitsOfRefinedEdges_mi_tag>,
206  composite_key<
207  RefElement,
210  const_mem_fun<RefElement, int,
213 
215 
216 /** \brief user adjacency function
217  * \ingroup fe_multi_indices
218  */
219 typedef boost::function<MoFEMErrorCode(Interface &moab, const Field &field,
220  const EntFiniteElement &fe,
221  Range &adjacency)>
223 
224 /**
225  * \brief Finite element definition
226  * \ingroup fe_multi_indices
227  */
229 
230  EntityHandle meshset; ///< meshset stores FE ents
231  BitFEId *tagId; ///< ptr to tag storing FE id
232  void *tagName; ///< ptr to tag storing FE name
233  int tagNameSize; ///< numer of characters in FE name
234  BitFieldId *tag_BitFieldId_col_data; ///< tag stores col id_id for fields
235  BitFieldId *tag_BitFieldId_row_data; ///< tag stores row id_id for fields
236  BitFieldId *tag_BitFieldId_data; ///< tag stores data id_id for fields
237 
238  FiniteElement(Interface &moab, const EntityHandle _meshset);
239 
240  /**
241  * \brief Get finite element id
242  * @return Finite element Id
243  */
244  inline BitFEId getId() const { return *tagId; };
245 
246  /**
247  * \brief Get meshset containing element entities
248  * @return Meshset
249  */
250  inline EntityHandle getMeshset() const { return meshset; }
251 
252  /**
253  * \brief Get finite element name
254  * @return string_ref
255  */
256  inline boost::string_ref getNameRef() const {
257  return boost::string_ref((char *)tagName, tagNameSize);
258  }
259 
260  /**
261  * \brief Get finite element name
262  * @return string
263  */
264  inline std::string getName() const {
265  return std::string((char *)tagName, tagNameSize);
266  }
267 
268  /**
269  * \brief Get field ids on columns
270  * @return Bit field ids
271  */
272  inline BitFieldId getBitFieldIdCol() const {
273  return *((BitFieldId *)tag_BitFieldId_col_data);
274  }
275 
276  /**
277  * \brief Get field ids on rows
278  * @return Bit field ids
279  */
280  inline BitFieldId getBitFieldIdRow() const {
281  return *((BitFieldId *)tag_BitFieldId_row_data);
282  }
283 
284  /**
285  * \brief Get field ids on data
286  * @return Bit field ids
287  */
288  inline BitFieldId getBitFieldIdData() const {
289  return *((BitFieldId *)tag_BitFieldId_data);
290  }
291 
292  /**
293  * \brief Get bit identifying this element
294  *
295  * Each element like field is identified by bit set. Each element has unique
296  * bit set, this function returns number of that bit.
297  *
298  * @return Bit number
299  */
300  inline unsigned int getBitNumber() const {
301  return ffsl(((BitFieldId *)tagId)->to_ulong());
302  }
303 
304  /**
305  * \brief Table of functions retrieving adjacencies for finite element
306  * User can alter and change default behavior
307  */
308  std::array<ElementAdjacencyFunct, MBMAXTYPE> elementAdjacencyTable;
309 
310  /**
311  * \brief print finite element
312  */
313  friend std::ostream &operator<<(std::ostream &os, const FiniteElement &e);
314 };
315 
316 /** \brief default adjacency map
317  * \ingroup fe_multi_indices
318  */
320 
321  static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field,
322  const EntFiniteElement &fe,
323  Range &adjacency);
324  static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field,
325  const EntFiniteElement &fe,
326  Range &adjacency);
327  static MoFEMErrorCode defaultFace(Interface &moab, const Field &field,
328  const EntFiniteElement &fe,
329  Range &adjacency);
330  static MoFEMErrorCode defaultTet(Interface &moab, const Field &field,
331  const EntFiniteElement &fe,
332  Range &adjacency);
333  static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field,
334  const EntFiniteElement &fe,
335  Range &adjacency);
336  static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field,
337  const EntFiniteElement &fe,
338  Range &adjacency);
339 };
340 
341 /**
342  * \brief Inetface for FE
343  * \ingroup fe_multi_indices
344  */
345 template <typename T> struct interface_FiniteElement {
346 
347  mutable boost::shared_ptr<T> sFePtr;
348 
349  interface_FiniteElement(const boost::shared_ptr<T> &ptr) : sFePtr(ptr){};
350 
351  inline const boost::shared_ptr<FiniteElement> &get_MoFEMFiniteElementPtr() {
352  return this->sFePtr;
353  };
354 
355  /**
356  * \brief Get finite element id
357  * @return Finite element Id
358  */
359  inline BitFEId getId() const { return this->sFePtr->getId(); }
360 
361  /**
362  * \brief Get meshset containing element entities
363  * @return Meshset
364  */
365  inline EntityHandle getMeshset() const { return this->sFePtr->getMeshset(); }
366 
367  /**
368  * \brief Get finite element name
369  * @return string_ref
370  */
371  inline boost::string_ref getNameRef() const {
372  return this->sFePtr->getNameRef();
373  }
374 
375  /**
376  * \brief Get finite element name
377  * @return string_ref
378  */
379  inline std::string getName() const { return this->sFePtr->getName(); }
380 
381  /**
382  * \brief Get field ids on columns
383  * @return Bit field ids
384  */
385  inline BitFieldId getBitFieldIdCol() const {
386  return this->sFePtr->getBitFieldIdCol();
387  }
388 
389  /**
390  * \brief Get field ids on rows
391  * @return Bit field ids
392  */
393  inline BitFieldId getBitFieldIdRow() const {
394  return this->sFePtr->getBitFieldIdRow();
395  }
396 
397  /**
398  * \brief Get field ids on data
399  * @return Bit field ids
400  */
401  inline BitFieldId getBitFieldIdData() const {
402  return this->sFePtr->getBitFieldIdData();
403  }
404 
405  /**
406  * \brief Get bit identifying this element
407  *
408  * Each element like field is identified by bit set. Each element has unique
409  * bit set, this function returns number of that bit.
410  *
411  * @return Bit number
412  */
413  inline unsigned int getBitNumber() const {
414  return this->sFePtr->getBitNumber();
415  }
416 };
417 
418 /**
419  * \brief Finite element data for entity
420  * \ingroup fe_multi_indices
421  */
422 struct EntFiniteElement : public interface_FiniteElement<FiniteElement>,
423  interface_RefElement<RefElement> {
424 
428  boost::shared_ptr<FEDofEntity_multiIndex> data_dofs;
429  boost::shared_ptr<FieldEntity_vector_view> row_field_ents_view;
430  boost::shared_ptr<FieldEntity_vector_view> col_field_ents_view;
431  boost::shared_ptr<FieldEntity_multiIndex_spaceType_view> data_field_ents_view;
433 
434  EntFiniteElement(const boost::shared_ptr<RefElement> &ref_finite_element,
435  const boost::shared_ptr<FiniteElement> &fe_ptr);
436 
437  /**
438  * \brief Get unique UId for finite element entity
439  * @return UId
440  */
441  inline const UId &getGlobalUniqueId() const { return globalUId; }
442 
443  /**
444  * \brief Generate UId for finite element entity
445  * @return finite element entity unique Id
446  */
447  static inline UId getGlobalUniqueIdCalculate(const EntityHandle ent,
448  const int bit_number) {
449  assert(bit_number <= 32);
450  return static_cast<UId>(ent) | static_cast<UId>(bit_number)
451  << 8 * sizeof(EntityHandle);
452  }
453 
454  /**
455  * \brief Generate UId for finite element entity
456  * @return finite element entity unique Id
457  */
459  return getGlobalUniqueIdCalculate(sPtr->getRefEnt(), getBitNumber());
460  }
461 
462  /**
463  * \brief Get element entity
464  * @return Element entity handle
465  */
466  inline EntityHandle getEnt() const { return getRefEnt(); }
467 
468  /**
469  * \brief Get number of DOFs on data
470  * @return Number of dofs on data
471  */
472  inline DofIdx getNbDofsData() const { return data_dofs->size(); }
473 
474  /**
475  * \brief Get data data dos multi-index structure
476  * @return Reference multi-index FEDofEntity_multiIndex
477  */
478  inline const FEDofEntity_multiIndex &getDataDofs() const {
479  return *data_dofs;
480  };
481 
482  friend std::ostream &operator<<(std::ostream &os, const EntFiniteElement &e);
483 
484  template <typename FE_ENTS, typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW>
485  inline MoFEMErrorCode
486  getDofView(const FE_ENTS &fe_ents_view, const MOFEM_DOFS &mofem_dofs,
487  MOFEM_DOFS_VIEW &dofs_view, const int operation_type) {
489  if (operation_type == moab::Interface::UNION) {
490  for (auto &it : fe_ents_view) {
491  if (auto e = it.lock()) {
492  auto r = mofem_dofs.template get<Unique_Ent_mi_tag>().equal_range(
493  e->getGlobalUniqueId());
494  dofs_view.insert(r.first, r.second);
495  }
496  }
497  } else
498  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
500  }
501 
502  template <typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW>
503  inline MoFEMErrorCode
504  getRowDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view,
505  const int operation_type = moab::Interface::UNION) {
506  return getDofView(*row_field_ents_view, mofem_dofs, dofs_view,
507  operation_type);
508  }
509 
510  template <typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW>
511  inline MoFEMErrorCode
512  getColDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view,
513  const int operation_type = moab::Interface::UNION) {
514  return getDofView(*col_field_ents_view, mofem_dofs, dofs_view,
515  operation_type);
516  }
517 
518  MoFEMErrorCode getElementAdjacency(const boost::shared_ptr<Field> field_ptr,
519  Range &adjacency);
520 
521  inline boost::shared_ptr<RefElement> &getRefElement() const {
522  return this->sPtr;
523  }
524 
525  /**
526  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
527  *
528  * Vector is automatically destroy when last DOF in vector os destroyed. Every
529  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
530  * vector. That do the trick.
531  *
532  */
533  inline boost::weak_ptr<std::vector<FEDofEntity>> &getDofsSequence() const {
534  return dofsSequce;
535  }
536 
537 private:
538  // Keep vector of DoFS on entity
539  mutable boost::weak_ptr<std::vector<FEDofEntity>> dofsSequce;
540 };
541 
542 /**
543  * \brief interface to EntFiniteElement
544  * \ingroup fe_multi_indices
545  */
546 template <typename T>
549 
550  interface_EntFiniteElement(const boost::shared_ptr<T> &sptr)
551  : interface_FiniteElement<T>(sptr), interface_RefElement<T>(sptr) {}
552 
553  inline const FEDofEntity_multiIndex &getDataDofs() const {
554  return this->sPtr->getDataDofs();
555  }
556 
557  /**
558  * \brief Get number of DOFs on data
559  * @return Number of dofs on data
560  */
561  inline DofIdx getNbDofsData() const { return this->sPtr->getNbDofsData(); }
562 
563  /**
564  * \brief Get element entity
565  * @return Element entity handle
566  */
567  inline EntityHandle getEnt() const { return this->sPtr->getRefEnt(); }
568 
569  // /** \deprecated Use getEnt() instead
570  // */
571  // DEPRECATED inline EntityHandle get_ent() const { return getEnt(); }
572 
573  /**
574  * \brief Get unique UId for finite element entity
575  * @return UId
576  */
577  inline UId getGlobalUniqueId() const {
578  return this->sPtr->getGlobalUniqueId();
579  }
580 
582  return this->sPtr->getSideNumberTable();
583  }
584 
585  // /** \deprecated Use getSideNumberTable() instead
586  // */
587  // DEPRECATED SideNumber_multiIndex &get_side_number_table() const {
588  // return this->sPtr->getSideNumberTable();
589  // }
590 
591  inline MoFEMErrorCode getElementAdjacency(const Field *field_ptr,
592  Range &adjacency) {
593  return this->getElementAdjacency(field_ptr, adjacency);
594  }
595 
596  // /** \deprecated Use getElementAdjacency() instead
597  // */
598  // DEPRECATED inline MoFEMErrorCode get_element_adjacency(
599  // const Field *field_ptr,Range &adjacency
600  // ) {
601  // return this->getElementAdjacency(field_ptr,adjacency);
602  // }
603 
604  inline boost::shared_ptr<RefElement> &getRefElement() const {
605  return this->sPtr->getRefElement();
606  }
607 };
608 
609 /** \brief Partitioned (Indexed) Finite Element in Problem
610 
611  * This type of structure is used to compose problem. Problem is build from
612  * indexed finite elements. This data structure carry information about
613  * partition, which is specific to problem.
614 
615 
616  * \ingroup fe_multi_indices
617  */
619  : public interface_EntFiniteElement<EntFiniteElement> {
620 
625 
626  unsigned int part; ///< Partition number
627  boost::shared_ptr<FENumeredDofEntity_multiIndex>
628  rows_dofs; ///< indexed dofs on rows
629  boost::shared_ptr<FENumeredDofEntity_multiIndex>
630  cols_dofs; ///< indexed dofs on columns
631 
632  inline boost::shared_ptr<EntFiniteElement> &getEntFiniteElement() const {
633  return this->sPtr;
634  }
635 
636  /**
637  * \Construct indexed finite element
638  */
639  NumeredEntFiniteElement(const boost::shared_ptr<EntFiniteElement> &sptr)
641  rows_dofs(boost::shared_ptr<FENumeredDofEntity_multiIndex>(
643  cols_dofs(boost::shared_ptr<FENumeredDofEntity_multiIndex>(
645 
646  /**
647  * \brief Get partition number
648  * @return [description]
649  */
650  inline unsigned int getPart() const { return part; };
651 
652  /** \brief get FE dof on row
653  * \ingroup mofem_dofs
654  */
656  return *rows_dofs;
657  };
658 
659  /** \brief get FE dof on column
660  * \ingroup mofem_dofs
661  */
663  return *cols_dofs;
664  };
665 
666  /** \brief get FE dof by petsc index
667  * \ingroup mofem_dofs
668  */
669  boost::weak_ptr<FENumeredDofEntity>
670  getRowDofsByPetscGlobalDofIdx(const int idx) const;
671 
672  /** \brief get FE dof by petsc index
673  * \ingroup mofem_dofs
674  */
675  boost::weak_ptr<FENumeredDofEntity>
676  getColDofsByPetscGlobalDofIdx(const int idx) const;
677 
678  /**
679  * @deprecated Unsafe to use, will be removed in future releases.
680  *
681  * Get the Row Dofs By Petsc Global Dof Idx object
682  *
683  * @param idx
684  * @param dof_raw_ptr
685  * @return MoFEMErrorCode
686  */
689  const FENumeredDofEntity **dof_raw_ptr) const {
691  if (auto r = getRowDofsByPetscGlobalDofIdx(idx).lock())
692  *dof_raw_ptr = r.get();
693  else
694  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_FOUND,
695  "dof which index < %d > not found", idx);
697  }
698 
699  /**
700  * @deprecated Unsafe to use, will be removed in future releases.
701  *
702  * Get the Row Dofs By Petsc Global Dof Idx object
703  *
704  * @param idx
705  * @param dof_raw_ptr
706  * @return MoFEMErrorCode
707  */
710  const FENumeredDofEntity **dof_raw_ptr) const {
712  if (auto r = getColDofsByPetscGlobalDofIdx(idx).lock())
713  *dof_raw_ptr = r.get();
714  else
715  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_FOUND,
716  "dof which index < %d > not found", idx);
718  }
719 
720  friend std::ostream &operator<<(std::ostream &os,
721  const NumeredEntFiniteElement &e) {
722  os << "part " << e.part << " " << *(e.sFePtr);
723  return os;
724  }
725 
726  /**
727  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
728  *
729  * Vector is automatically destroy when last DOF in vector os destroyed. Every
730  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
731  * vector. That do the trick.
732  *
733  */
734  inline boost::weak_ptr<std::vector<FENumeredDofEntity>> &
736  return dofsRowSequce;
737  }
738 
739  /**
740  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
741  *
742  * Vector is automatically destroy when last DOF in vector os destroyed. Every
743  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
744  * vector. That do the trick.
745  *
746  */
747  inline boost::weak_ptr<std::vector<FENumeredDofEntity>> &
749  return dofsColSequce;
750  }
751 
752 private:
753  // Keep vector of DoFS on entity
754  mutable boost::weak_ptr<std::vector<FENumeredDofEntity>> dofsRowSequce;
755  mutable boost::weak_ptr<std::vector<FENumeredDofEntity>> dofsColSequce;
756 };
757 
758 /** \brief interface for NumeredEntFiniteElement
759  * \ingroup fe_multi_indices
760  */
761 template <typename T>
763  : public interface_EntFiniteElement<T> {
764 
765  interface_NumeredEntFiniteElement(const boost::shared_ptr<T> &sptr)
766  : interface_EntFiniteElement<T>(sptr){};
767 
768  /**
769  * \brief Get partition number
770  * @return Partition number
771  */
772  inline unsigned int getPart() const { return this->sPtr->getPart(); }
773 
774  /** \brief get FE dof on row
775  * \ingroup mofem_dofs
776  */
778  return this->sPtr->getRowsDofs();
779  };
780 
781  /** \brief get FE dof on column
782  * \ingroup mofem_dofs
783  */
785  return this->sPtr->getColsDofs();
786  };
787 };
788 
789 /**
790  * @relates multi_index_container
791  * \brief MultiIndex container for EntFiniteElement
792  * \ingroup fe_multi_indices
793  *
794  */
795 typedef multi_index_container<
796  boost::shared_ptr<EntFiniteElement>,
797  indexed_by<
798  ordered_unique<
799  tag<Unique_mi_tag>,
800  member<EntFiniteElement, UId, &EntFiniteElement::globalUId>>,
801  ordered_non_unique<tag<Ent_mi_tag>,
802  const_mem_fun<EntFiniteElement, EntityHandle,
804  ordered_non_unique<
805  tag<FiniteElement_name_mi_tag>,
807  boost::string_ref, &EntFiniteElement::getNameRef>>,
808  ordered_non_unique<
809  tag<BitFEId_mi_tag>,
812  LtBit<BitFEId>>,
813  ordered_non_unique<
814  tag<EntType_mi_tag>,
816  EntityType, &EntFiniteElement::getEntType>>,
817  ordered_non_unique<
818  tag<Composite_Name_And_Ent_mi_tag>,
819  composite_key<
820  EntFiniteElement,
822  boost::string_ref, &EntFiniteElement::getNameRef>,
823  const_mem_fun<EntFiniteElement, EntityHandle,
826 
827 /**
828  * \brief Entity finite element multi-index by finite element name
829  *
830  * \ingroup fe_multi_indices
831  */
834 
835 /**
836  @relates multi_index_container
837  \brief MultiIndex for entities for NumeredEntFiniteElement
838  \ingroup fe_multi_indices
839  */
840 typedef multi_index_container<
841  boost::shared_ptr<NumeredEntFiniteElement>,
842  indexed_by<
843  ordered_unique<
844  tag<Unique_mi_tag>,
845  const_mem_fun<
848  ordered_non_unique<tag<Part_mi_tag>,
849  member<NumeredEntFiniteElement, unsigned int,
851  ordered_non_unique<
852  tag<FiniteElement_name_mi_tag>,
854  boost::string_ref,
856  ordered_non_unique<
857  tag<Ent_mi_tag>,
858  const_mem_fun<
861  ordered_non_unique<
862  tag<Composite_Name_And_Ent_mi_tag>,
863  composite_key<
865  const_mem_fun<
867  boost::string_ref, &NumeredEntFiniteElement::getNameRef>,
868  const_mem_fun<
871  ordered_non_unique<
872  tag<Composite_Name_And_Part_mi_tag>,
873  composite_key<
875  const_mem_fun<
877  boost::string_ref, &NumeredEntFiniteElement::getNameRef>,
878  member<NumeredEntFiniteElement, unsigned int,
881 
882 /**
883  * \brief Entity finite element multi-index by finite element name
884  *
885  * \ingroup fe_multi_indices
886  */
887 typedef NumeredEntFiniteElement_multiIndex::index<
889 
890 /**
891  * \brief Entity finite element multi-index by finite element name and
892  * partition
893  *
894  * \ingroup fe_multi_indices
895  */
896 typedef NumeredEntFiniteElement_multiIndex::index<
898 
899 /**
900  @relates multi_index_container
901  \brief MultiIndex for entities for FiniteElement
902  \ingroup fe_multi_indices
903  */
904 typedef multi_index_container<
905  boost::shared_ptr<FiniteElement>,
906  indexed_by<hashed_unique<tag<FiniteElement_Meshset_mi_tag>,
907  member<FiniteElement, EntityHandle,
909  hashed_unique<
910  tag<BitFEId_mi_tag>,
911  const_mem_fun<FiniteElement, BitFEId, &FiniteElement::getId>,
913  ordered_unique<tag<FiniteElement_name_mi_tag>,
914  const_mem_fun<FiniteElement, boost::string_ref,
917 
918 // modificators
919 
920 /**
921  * \brief Change finite element part
922  *
923  * \ingroup fe_multi_indices
924  */
926  unsigned int pArt;
927  NumeredEntFiniteElement_change_part(unsigned int part) : pArt(part){};
928  void operator()(boost::shared_ptr<NumeredEntFiniteElement> &fe) {
929  fe->part = pArt;
930  }
932 };
933 
934 /**
935  * \brief Add field to column
936  *
937  * \ingroup fe_multi_indices
938  */
942  : fIdCol(f_id_col){};
943  void operator()(boost::shared_ptr<FiniteElement> &fe);
944 };
945 
946 /**
947  * \brief Add field to row
948  *
949  * \ingroup fe_multi_indices
950  */
954  : fIdRow(f_id_row){};
955  void operator()(boost::shared_ptr<FiniteElement> &fe);
956 };
957 
958 /**
959  * \brief Add field to data
960  *
961  * \ingroup fe_multi_indices
962  */
966  : fIdData(f_id_data){};
967  void operator()(boost::shared_ptr<FiniteElement> &fe);
968 };
969 
970 /**
971  * \brief Unset field from column
972  *
973  * \ingroup fe_multi_indices
974  */
978  : fIdCol(f_id_col){};
979  void operator()(boost::shared_ptr<FiniteElement> &fe);
980 };
981 
982 /**
983  * \brief Unset field from row
984  *
985  * \ingroup fe_multi_indices
986  */
990  : fIdRow(f_id_row){};
991  void operator()(boost::shared_ptr<FiniteElement> &fe);
992 };
993 
994 /**
995  * \brief Unset field from data
996  *
997  * \ingroup fe_multi_indices
998  */
1002  : fIdData(f_id_data){};
1003  void operator()(boost::shared_ptr<FiniteElement> &fe);
1004 };
1005 
1006 /**
1007  * \brief Reset field from column
1008  *
1009  * \ingroup fe_multi_indices
1010  */
1013  void operator()(boost::shared_ptr<FiniteElement> &fe);
1014 };
1015 
1016 /**
1017  * \brief Reset field from row
1018  *
1019  * \ingroup fe_multi_indices
1020  */
1023  void operator()(boost::shared_ptr<FiniteElement> &fe);
1024 };
1025 
1026 /**
1027  * \brief Reset field from data
1028  *
1029  * \ingroup fe_multi_indices
1030  */
1032  FiniteElement_change_bit_reset() = default;
1033  void operator()(boost::shared_ptr<FiniteElement> &fe);
1034 };
1035 
1036 } // namespace MoFEM
1037 
1038 /**
1039  * Loop over DOFs in row on element
1040  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1041  * @param IT iterator
1042  * @return user return in for(_IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR,IT))
1043  * \ingroup fe_multi_indices
1044  */
1045 #define _IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR, IT) \
1046  FENumeredDofEntity_multiIndex::iterator IT = FEPTR->rows_dofs->begin(); \
1047  IT != FEPTR->rows_dofs->end(); \
1048  IT++
1049 
1050 /// \deprecated use _IT_FENUMEREDDOF_ROW_FOR_LOOP_
1051 #define _IT_FENUMEREDDOFMOFEMENTITY_ROW_FOR_LOOP_(FEPTR, IT) \
1052  _IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR, IT)
1053 
1054 /**
1055  * Loop over DOFs in col on element
1056  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1057  * @param IT iterator
1058  * @return user return in for(_IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR,IT))
1059  * \ingroup fe_multi_indices
1060  */
1061 #define _IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR, IT) \
1062  FENumeredDofEntity_multiIndex::iterator IT = FEPTR->cols_dofs->begin(); \
1063  IT != FEPTR->cols_dofs->end(); \
1064  IT++
1065 
1066 /// \deprecated use _IT_FENUMEREDDOF_COL_FOR_LOOP_ instead
1067 #define _IT_FENUMEREDDOFMOFEMENTITY_COL_FOR_LOOP_(FEPTR, IT) \
1068  _IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR, IT)
1069 
1070 /**
1071  * Loop over DOFs in row on element for particular filed
1072  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1073  * @param NAME name of filed
1074  * @param IT iterator
1075  * @return user return in
1076  * for(_IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR,NAME,IT)) \ingroup
1077  * fe_multi_indices
1078  */
1079 #define _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT) \
1080  FENumeredDofEntityByFieldName::iterator IT = \
1081  FEPTR->rows_dofs->get<FieldName_mi_tag>().lower_bound(NAME); \
1082  IT != FEPTR->rows_dofs->get<FieldName_mi_tag>().upper_bound(NAME); \
1083  IT++
1084 
1085 /// \deprecated use _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_ instead
1086 #define _IT_FENUMEREDDOFMOFEMENTITY_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT) \
1087  _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT)
1088 
1089 /**
1090  * Loop over DOFs in col on element for particular filed
1091  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1092  * @param NAME name of filed
1093  * @param IT iterator
1094  * @return user return in
1095  * for(_IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR,NAME,IT)) \ingroup
1096  * fe_multi_indices
1097  */
1098 #define _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT) \
1099  FENumeredDofEntityByFieldName::iterator IT = \
1100  FEPTR->cols_dofs->get<FieldName_mi_tag>().lower_bound(NAME); \
1101  IT != FEPTR->cols_dofs->get<FieldName_mi_tag>().upper_bound(NAME); \
1102  IT++
1103 
1104 /// \deprecated use _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_ instead
1105 #define _IT_FENUMEREDDOFMOFEMENTITY_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT) \
1106  _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT)
1107 
1108 #endif // __FEMMULTIINDICES_HPP__
1109 
1110 /***************************************************************************/ /**
1111  * \defgroup fe_multi_indices Finite elements structures and multi-indices
1112  * \ingroup mofem
1113  ******************************************************************************/
interface_FiniteElement< FiniteElement > interface_type_FiniteElement
keeps data about abstract VERTEX finite element
interface_RefEntity< RefEntity > interface_type_RefEntity
virtual int getBitRefEdgesUlong() const
FiniteElement_col_change_bit_off(const BitFieldId f_id_col)
boost::weak_ptr< std::vector< FEDofEntity > > dofsSequce
boost::shared_ptr< RefEntity > sPtr
keeps information about indexed dofs for the finite element
unsigned int getPart() const
Get partition number.
boost::weak_ptr< FENumeredDofEntity > getColDofsByPetscGlobalDofIdx(const int idx) const
get FE dof by petsc index
RefElementFace(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
Deprecated interface functions.
void operator()(boost::shared_ptr< FiniteElement > &fe)
void operator()(boost::shared_ptr< FiniteElement > &fe)
RefElement_MESHSET(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
NumeredEntFiniteElement_multiIndex::index< FiniteElement_name_mi_tag >::type NumeredEntFiniteElementbyName
Entity finite element multi-index by finite element name.
FiniteElement_row_change_bit_add(const BitFieldId f_id_row)
RefElement_EDGE(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
multi_index_container< boost::shared_ptr< RefElement >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getRefEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityType, &RefElement::getEntType > > > > RefElement_multiIndex
static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
const FENumeredDofEntity_multiIndex & getRowsDofs() const
get FE dof on row
const BitRefEdges & getBitRefEdges() const
std::array< ElementAdjacencyFunct, MBMAXTYPE > elementAdjacencyTable
Table of functions retrieving adjacencies for finite element User can alter and change default behavi...
EntFiniteElement(const boost::shared_ptr< RefElement > &ref_finite_element, const boost::shared_ptr< FiniteElement > &fe_ptr)
BitFEId getId() const
Get finite element id.
interface_RefElement(const boost::shared_ptr< T > &sptr)
Provide data structure for (tensor) field approximation.The Field is intended to provide support for ...
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
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.
SideNumber_multiIndex side_number_table
friend std::ostream & operator<<(std::ostream &os, const RefElement_EDGE &e)
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:506
static MoFEMErrorCode defaultFace(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
const boost::shared_ptr< FiniteElement > & get_MoFEMFiniteElementPtr()
Partitioned (Indexed) Finite Element in Problem.
multi_index_container< boost::shared_ptr< FENumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, const UId &, &FENumeredDofEntity::getGlobalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, EntityHandle, &FENumeredDofEntity::getEnt > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_Field, boost::string_ref, &FENumeredDofEntity::getNameRef > >, ordered_non_unique< tag< Composite_Name_Type_And_Side_Number_mi_tag >, composite_key< FENumeredDofEntity, const_mem_fun< FENumeredDofEntity::interface_type_Field, boost::string_ref, &FENumeredDofEntity::getNameRef >, const_mem_fun< FENumeredDofEntity::interface_type_RefEntity, EntityType, &FENumeredDofEntity::getEntType >, KeyFromKey< member< SideNumber, char, &SideNumber::side_number >, member< FENumeredDofEntity::BaseFEEntity, boost::shared_ptr< SideNumber >, &FENumeredDofEntity::sideNumberPtr > > > >, ordered_non_unique< tag< Composite_Name_And_Type_mi_tag >, composite_key< FENumeredDofEntity, const_mem_fun< FENumeredDofEntity::interface_type_Field, boost::string_ref, &FENumeredDofEntity::getNameRef >, const_mem_fun< FENumeredDofEntity::interface_type_RefEntity, EntityType, &FENumeredDofEntity::getEntType > > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< FENumeredDofEntity, const_mem_fun< FENumeredDofEntity::interface_type_Field, boost::string_ref, &FENumeredDofEntity::getNameRef >, const_mem_fun< FENumeredDofEntity::interface_type_DofEntity, EntityHandle, &FENumeredDofEntity::getEnt > > > > > FENumeredDofEntity_multiIndex
MultiIndex container keeps FENumeredDofEntity.
FiniteElement_col_change_bit_add(const BitFieldId f_id_col)
keeps data about abstract PRISM finite element
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:482
MoFEMErrorCode getColDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view, const int operation_type=moab::Interface::UNION)
BitFieldId getBitFieldIdRow() const
Get field ids on rows.
boost::weak_ptr< std::vector< FENumeredDofEntity > > & getRowDofsSequence() const
Get weak_ptr reference to sequence/vector storing dofs on entity.
unsigned int getBitNumber() const
Get bit identifying this element.
MoFEMErrorCode getDofView(const FE_ENTS &fe_ents_view, const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view, const int operation_type)
const UId & getGlobalUniqueId() const
Get unique UId for finite element entity.
std::string getName() const
Get finite element name.
static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
virtual const BitRefEdges & getBitRefEdges() const
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
boost::shared_ptr< RefEntity > & getRefEntityPtr() const
UId getGlobalUniqueIdCalculate() const
Generate UId for finite element entity.
BitFieldId getBitFieldIdData() const
Get field ids on data.
friend std::ostream & operator<<(std::ostream &os, const RefElementFace &e)
void operator()(boost::shared_ptr< FiniteElement > &fe)
void operator()(NumeredEntFiniteElement &fe)
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:513
BitFieldId * tag_BitFieldId_row_data
tag stores row id_id for fields
interface_FiniteElement(const boost::shared_ptr< T > &ptr)
const FENumeredDofEntity_multiIndex & getColsDofs() const
get FE dof on column
DofIdx getNbDofsData() const
Get number of DOFs on data.
interface_EntFiniteElement< EntFiniteElement > interface_type_EntFiniteElement
BitFieldId * tag_BitFieldId_data
tag stores data id_id for fields
MoFEMErrorCode getRowDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view, const int operation_type=moab::Interface::UNION)
EntityHandle getEnt() const
Get element entity.
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
boost::weak_ptr< std::vector< FENumeredDofEntity > > & getColDofsSequence() const
Get weak_ptr reference to sequence/vector storing dofs on entity.
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
interface_RefElement< T > interface_type_RefElement
boost::shared_ptr< RefElement > & getRefElement() const
BitFieldId getBitFieldIdData() const
Get field ids on data.
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
keeps data about abstract refined finite element
NumeredEntFiniteElement_multiIndex::index< Composite_Name_And_Part_mi_tag >::type NumeredEntFiniteElementbyNameAndPart
Entity finite element multi-index by finite element name and partition.
std::bitset< BITREFEDGES_SIZE > BitRefEdges
Definition: Types.hpp:44
const FENumeredDofEntity_multiIndex & getColsDofs() const
get FE dof on column
const FEDofEntity_multiIndex & getDataDofs() const
Get data data dos multi-index structure.
DofIdx getNbDofsData() const
Get number of DOFs on data.
interface_RefElement< RefElement > interface_type_RefElement
BitRefEdges * tag_BitRefEdges
std::bitset< BITFEID_SIZE > BitFEId
Finite element Id.
Definition: Types.hpp:53
multi_index_container< boost::shared_ptr< NumeredEntFiniteElement >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< NumeredEntFiniteElement::interface_type_EntFiniteElement, UId, &NumeredEntFiniteElement::getGlobalUniqueId > >, ordered_non_unique< tag< Part_mi_tag >, member< NumeredEntFiniteElement, unsigned int, &NumeredEntFiniteElement::part > >, ordered_non_unique< tag< FiniteElement_name_mi_tag >, const_mem_fun< NumeredEntFiniteElement::interface_type_FiniteElement, boost::string_ref, &NumeredEntFiniteElement::getNameRef > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< NumeredEntFiniteElement::interface_type_EntFiniteElement, EntityHandle, &NumeredEntFiniteElement::getEnt > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< NumeredEntFiniteElement, const_mem_fun< NumeredEntFiniteElement::interface_type_FiniteElement, boost::string_ref, &NumeredEntFiniteElement::getNameRef >, const_mem_fun< NumeredEntFiniteElement::interface_type_EntFiniteElement, 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.
unsigned int getBitNumber() const
Get bit identifying this element.
boost::shared_ptr< FieldEntity_vector_view > col_field_ents_view
unsigned int getPart() const
Get partition number.
static UId getGlobalUniqueIdCalculate(const EntityHandle ent, const int bit_number)
Generate UId for finite element entity.
void operator()(boost::shared_ptr< FiniteElement > &fe)
boost::weak_ptr< FENumeredDofEntity > getRowDofsByPetscGlobalDofIdx(const int idx) const
get FE dof by petsc index
MoFEMErrorCode getElementAdjacency(const Field *field_ptr, Range &adjacency)
RefElement(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
DEPRECATED MoFEMErrorCode getColDofsByPetscGlobalDofIdx(const int idx, const FENumeredDofEntity **dof_raw_ptr) const
DEPRECATED MoFEMErrorCode getRowDofsByPetscGlobalDofIdx(const int idx, const FENumeredDofEntity **dof_raw_ptr) const
boost::weak_ptr< std::vector< FEDofEntity > > & getDofsSequence() const
Get weak_ptr reference to sequence/vector storing dofs on entity.
friend std::ostream & operator<<(std::ostream &os, const RefElement &e)
NumeredEntFiniteElement(const boost::shared_ptr< EntFiniteElement > &sptr)
interface_FiniteElement< EntFiniteElement > interface_type_FiniteElement
keeps data about abstract TRI finite element
interface_EntFiniteElement(const boost::shared_ptr< T > &sptr)
Finite element definition.
boost::shared_ptr< FEDofEntity_multiIndex > data_dofs
boost::shared_ptr< RefEntity > & getRefEntityPtr() const
Get pointer to RefEntity.
EntityHandle meshset
meshset stores FE ents
BitFEId * tagId
ptr to tag storing FE id
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:66
void operator()(boost::shared_ptr< NumeredEntFiniteElement > &fe)
multi_index_container< boost::shared_ptr< RefElement >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getRefEnt > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getParentEnt > >, ordered_non_unique< tag< Composite_ParentEnt_And_BitsOfRefinedEdges_mi_tag >, composite_key< RefElement, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getParentEnt >, const_mem_fun< RefElement, int, &RefElement::getBitRefEdgesUlong > > > > > RefElement_multiIndex_parents_view
EntityHandle getMeshset() const
Get meshset containing element entities.
boost::weak_ptr< std::vector< FENumeredDofEntity > > dofsColSequce
friend std::ostream & operator<<(std::ostream &os, const EntFiniteElement &e)
BitRefEdges * tag_BitRefEdges
void operator()(boost::shared_ptr< FiniteElement > &fe)
const BitRefEdges & getBitRefEdges() const
friend std::ostream & operator<<(std::ostream &os, const NumeredEntFiniteElement &e)
int tagNameSize
numer of characters in FE name
void operator()(boost::shared_ptr< FiniteElement > &fe)
boost::shared_ptr< T > sFePtr
boost::shared_ptr< FENumeredDofEntity_multiIndex > rows_dofs
indexed dofs on rows
void operator()(boost::shared_ptr< FiniteElement > &fe)
interface to RefEntity
RefElement_VERTEX(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
boost::weak_ptr< std::vector< FENumeredDofEntity > > dofsRowSequce
boost::shared_ptr< FENumeredDofEntity_multiIndex > cols_dofs
indexed dofs on columns
BitFEId getId() const
Get finite element id.
interface_RefEntity< T > interface_type_RefEntity
keeps data about abstract TET finite element
static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
intrface to RefElement
SideNumber_multiIndex & getSideNumberTable() const
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:52
Finite element data for entity.
multi_index_container< boost::shared_ptr< EntFiniteElement >, indexed_by< ordered_unique< tag< Unique_mi_tag >, member< EntFiniteElement, UId, &EntFiniteElement::globalUId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< EntFiniteElement, EntityHandle, &EntFiniteElement::getEnt > >, ordered_non_unique< tag< FiniteElement_name_mi_tag >, const_mem_fun< EntFiniteElement::interface_type_FiniteElement, boost::string_ref, &EntFiniteElement::getNameRef > >, ordered_non_unique< tag< BitFEId_mi_tag >, const_mem_fun< EntFiniteElement::interface_type_FiniteElement, BitFEId, &EntFiniteElement::getId >, LtBit< BitFEId > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< EntFiniteElement::interface_type_RefEntity, EntityType, &EntFiniteElement::getEntType > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< EntFiniteElement, const_mem_fun< EntFiniteElement::interface_type_FiniteElement, boost::string_ref, &EntFiniteElement::getNameRef >, const_mem_fun< EntFiniteElement, EntityHandle, &EntFiniteElement::getEnt > > > > > EntFiniteElement_multiIndex
MultiIndex container for EntFiniteElement.
EntityHandle getMeshset() const
Get meshset containing element entities.
FiniteElement_row_change_bit_off(const BitFieldId f_id_row)
static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
multi_index_container< boost::shared_ptr< FEDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< FEDofEntity::interface_type_DofEntity, const UId &, &FEDofEntity::getGlobalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FEDofEntity::interface_type_DofEntity, EntityHandle, &FEDofEntity::getEnt > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< FEDofEntity::interface_type_Field, boost::string_ref, &FEDofEntity::getNameRef > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< FEDofEntity::interface_type_RefEntity, EntityType, &FEDofEntity::getEntType > >, ordered_non_unique< tag< Composite_Name_And_Type_mi_tag >, composite_key< FEDofEntity, const_mem_fun< FEDofEntity::interface_type_Field, boost::string_ref, &FEDofEntity::getNameRef >, const_mem_fun< FEDofEntity::interface_type_RefEntity, EntityType, &FEDofEntity::getEntType > > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< FEDofEntity, const_mem_fun< FEDofEntity::interface_type_Field, boost::string_ref, &FEDofEntity::getNameRef >, const_mem_fun< FEDofEntity::interface_type_DofEntity, EntityHandle, &FEDofEntity::getEnt > > >, ordered_non_unique< tag< Composite_Name_Type_And_Side_Number_mi_tag >, composite_key< FEDofEntity, const_mem_fun< FEDofEntity::interface_type_Field, boost::string_ref, &FEDofEntity::getNameRef >, const_mem_fun< FEDofEntity::interface_type_RefEntity, EntityType, &FEDofEntity::getEntType >, KeyFromKey< member< SideNumber, char, &SideNumber::side_number >, member< FEDofEntity::BaseFEEntity, boost::shared_ptr< SideNumber >, &FEDofEntity::sideNumberPtr > > > > > > FEDofEntity_multiIndex
MultiIndex container keeps FEDofEntity.
FiniteElement(Interface &moab, const EntityHandle _meshset)
SideNumber_multiIndex & getSideNumberTable() const
boost::shared_ptr< RefElement > & getRefElement() const
interface_NumeredEntFiniteElement(const boost::shared_ptr< T > &sptr)
#define DEPRECATED
Definition: definitions.h:29
RefElement_PRISM(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
std::string getName() const
Get finite element name.
friend std::ostream & operator<<(std::ostream &os, const FiniteElement &e)
print finite element
const FEDofEntity_multiIndex & getDataDofs() const
BitFieldId * tag_BitFieldId_col_data
tag stores col id_id for fields
UId getGlobalUniqueId() const
Get unique UId for finite element entity.
BitFieldId getBitFieldIdRow() const
Get field ids on rows.
MoFEMErrorCode getElementAdjacency(const boost::shared_ptr< Field > field_ptr, Range &adjacency)
BitFieldId getBitFieldIdCol() const
Get field ids on columns.
keeps data about abstract EDGE finite element
boost::function< MoFEMErrorCode(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)> ElementAdjacencyFunct
user adjacency function
EntFiniteElement_multiIndex::index< FiniteElement_name_mi_tag >::type EntFiniteElementByName
Entity finite element multi-index by finite element name.
FiniteElement_change_bit_add(const BitFieldId f_id_data)
static MoFEMErrorCode defaultTet(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
boost::shared_ptr< EntFiniteElement > & getEntFiniteElement() const
int DofIdx
Index of DOF.
Definition: Types.hpp:29
boost::shared_ptr< FieldEntity_multiIndex_spaceType_view > data_field_ents_view
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:412
unsigned int part
Partition number.
void * tagName
ptr to tag storing FE name
FiniteElement_change_bit_off(const BitFieldId f_id_data)
void operator()(boost::shared_ptr< FiniteElement > &fe)
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
interface to EntFiniteElement
static BitRefEdges DummyBitRefEdges
multi_index_container< boost::shared_ptr< SideNumber >, indexed_by< hashed_unique< member< SideNumber, EntityHandle, &SideNumber::ent > >, ordered_non_unique< composite_key< SideNumber, const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType >, member< SideNumber, char, &SideNumber::side_number > > >, ordered_non_unique< const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType > > > > SideNumber_multiIndex
SideNumber_multiIndex for SideNumber.
RefElement_TET(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
boost::string_ref getNameRef() const
Get finite element name.
keeps data about abstract MESHSET finite element
virtual const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
EntityHandle getEnt() const
Get element entity.
#define NOT_USED(x)
Definition: definitions.h:308
SideNumber_multiIndex & getSideNumberTable() const
uint128_t UId
Unique Id.
Definition: Types.hpp:41
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
static const boost::shared_ptr< SideNumber > nullSideNumber
boost::string_ref getNameRef() const
Get finite element name.
interface for NumeredEntFiniteElement
const FENumeredDofEntity_multiIndex & getRowsDofs() const
get FE dof on row
void operator()(boost::shared_ptr< FiniteElement > &fe)
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
SideNumber_multiIndex & getSideNumberTable() const
friend std::ostream & operator<<(std::ostream &os, const RefElement_VERTEX &e)
int getBitRefEdgesUlong() const
interface_RefEntity< RefElement > interface_type_RefEntity
boost::shared_ptr< FieldEntity_vector_view > row_field_ents_view
BitFieldId getBitFieldIdCol() const
Get field ids on columns.
const boost::shared_ptr< T > & getRefElement() const