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