v0.8.19
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 RefElement_TRI : public RefElement {
107  RefElement_TRI(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 RefElement_TRI &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<
189  tag<EntType_mi_tag>,
190  const_mem_fun<RefElement::interface_type_RefEntity, EntityType,
191  &RefElement::getEntType> > > >
193 
194 typedef multi_index_container<
195  boost::shared_ptr<RefElement>,
196  // ptrWrapperRefElement,
197  indexed_by<
198  ordered_unique<tag<Ent_mi_tag>,
201  ordered_non_unique<
202  tag<Ent_Ent_mi_tag>,
205  ordered_non_unique<
206  tag<Composite_ParentEnt_And_BitsOfRefinedEdges_mi_tag>,
207  composite_key<
208  RefElement,
211  const_mem_fun<RefElement, int,
214 
216 
217 /** \brief user adjacency function
218  * \ingroup fe_multi_indices
219  */
220 typedef boost::function<MoFEMErrorCode(Interface &moab, const Field &field_ptr,
221  const EntFiniteElement &fe_ptr,
222  Range &adjacency)>
224 
225 /**
226  * \brief Finite element definition
227  * \ingroup fe_multi_indices
228  */
230 
231  EntityHandle meshset; ///< meshset stores FE ents
232  BitFEId *tagId; ///< ptr to tag storing FE id
233  void *tagName; ///< ptr to tag storing FE name
234  int tagNameSize; ///< numer of characters in FE name
235  BitFieldId *tag_BitFieldId_col_data; ///< tag stores col id_id for fields
236  BitFieldId *tag_BitFieldId_row_data; ///< tag stores row id_id for fields
237  BitFieldId *tag_BitFieldId_data; ///< tag stores data id_id for fields
238 
239  FiniteElement(Interface &moab, const EntityHandle _meshset);
240 
241  /**
242  * \brief Get finite element id
243  * @return Finite element Id
244  */
245  inline BitFEId getId() const { return *tagId; };
246 
247  /**
248  * \brief Get meshset containing element entities
249  * @return Meshset
250  */
251  inline EntityHandle getMeshset() const { return meshset; }
252 
253  /**
254  * \brief Get finite element name
255  * @return string_ref
256  */
257  inline boost::string_ref getNameRef() const {
258  return boost::string_ref((char *)tagName, tagNameSize);
259  }
260 
261  /**
262  * \brief Get finite element name
263  * @return string
264  */
265  inline std::string getName() const {
266  return std::string((char *)tagName, tagNameSize);
267  }
268 
269  /**
270  * \brief Get field ids on columns
271  * @return Bit field ids
272  */
273  inline BitFieldId getBitFieldIdCol() const {
274  return *((BitFieldId *)tag_BitFieldId_col_data);
275  }
276 
277  /**
278  * \brief Get field ids on rows
279  * @return Bit field ids
280  */
281  inline BitFieldId getBitFieldIdRow() const {
282  return *((BitFieldId *)tag_BitFieldId_row_data);
283  }
284 
285  /**
286  * \brief Get field ids on data
287  * @return Bit field ids
288  */
289  inline BitFieldId getBitFieldIdData() const {
290  return *((BitFieldId *)tag_BitFieldId_data);
291  }
292 
293  /**
294  * \brief Get bit identifying this element
295  *
296  * Each element like field is identified by bit set. Each element has unique
297  * bit set, this function returns number of that bit.
298  *
299  * @return Bit number
300  */
301  inline unsigned int getBitNumber() const {
302  return ffsl(((BitFieldId *)tagId)->to_ulong());
303  }
304 
305  /**
306  * \brief Table of functions retrieving adjacencies for finite element
307  * User can alter and change default behavior
308  */
310 
311  /**
312  * \brief print finite element
313  */
314  friend std::ostream &operator<<(std::ostream &os, const FiniteElement &e);
315 };
316 
317 /** \brief default adjacency map
318  * \ingroup fe_multi_indices
319  */
321 
322  static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field_ptr,
323  const EntFiniteElement &fe_ptr,
324  Range &adjacency);
325  static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field_ptr,
326  const EntFiniteElement &fe_ptr,
327  Range &adjacency);
328  static MoFEMErrorCode defaultTri(Interface &moab, const Field &field_ptr,
329  const EntFiniteElement &fe_ptr,
330  Range &adjacency);
331  static MoFEMErrorCode defaultTet(Interface &moab, const Field &field_ptr,
332  const EntFiniteElement &fe_ptr,
333  Range &adjacency);
334  static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field_ptr,
335  const EntFiniteElement &fe_ptr,
336  Range &adjacency);
337  static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field_ptr,
338  const EntFiniteElement &fe_ptr,
339  Range &adjacency);
340 };
341 
342 /**
343  * \brief Inetface for FE
344  * \ingroup fe_multi_indices
345  */
346 template <typename T> struct interface_FiniteElement {
347 
348  mutable boost::shared_ptr<T> sFePtr;
349 
350  interface_FiniteElement(const boost::shared_ptr<T> &ptr) : sFePtr(ptr){};
351 
352  inline const boost::shared_ptr<FiniteElement> &get_MoFEMFiniteElementPtr() {
353  return this->sFePtr;
354  };
355 
356  /**
357  * \brief Get finite element id
358  * @return Finite element Id
359  */
360  inline BitFEId getId() const { return this->sFePtr->getId(); }
361 
362  /**
363  * \brief Get meshset containing element entities
364  * @return Meshset
365  */
366  inline EntityHandle getMeshset() const { return this->sFePtr->getMeshset(); }
367 
368  /**
369  * \brief Get finite element name
370  * @return string_ref
371  */
372  inline boost::string_ref getNameRef() const {
373  return this->sFePtr->getNameRef();
374  }
375 
376  /**
377  * \brief Get finite element name
378  * @return string_ref
379  */
380  inline std::string getName() const { return this->sFePtr->getName(); }
381 
382  /**
383  * \brief Get field ids on columns
384  * @return Bit field ids
385  */
386  inline BitFieldId getBitFieldIdCol() const {
387  return this->sFePtr->getBitFieldIdCol();
388  }
389 
390  /**
391  * \brief Get field ids on rows
392  * @return Bit field ids
393  */
394  inline BitFieldId getBitFieldIdRow() const {
395  return this->sFePtr->getBitFieldIdRow();
396  }
397 
398  /**
399  * \brief Get field ids on data
400  * @return Bit field ids
401  */
402  inline BitFieldId getBitFieldIdData() const {
403  return this->sFePtr->getBitFieldIdData();
404  }
405 
406  /**
407  * \brief Get bit identifying this element
408  *
409  * Each element like field is identified by bit set. Each element has unique
410  * bit set, this function returns number of that bit.
411  *
412  * @return Bit number
413  */
414  inline unsigned int getBitNumber() const {
415  return this->sFePtr->getBitNumber();
416  }
417 };
418 
419 /**
420  * \brief Finite element data for entity
421  * \ingroup fe_multi_indices
422  */
423 struct EntFiniteElement : public interface_FiniteElement<FiniteElement>,
424  interface_RefElement<RefElement> {
425 
429  boost::shared_ptr<FEDofEntity_multiIndex> data_dofs;
430  boost::shared_ptr<FieldEntity_vector_view> row_field_ents_view;
431  boost::shared_ptr<FieldEntity_vector_view> col_field_ents_view;
432  boost::shared_ptr<FieldEntity_multiIndex_spaceType_view> data_field_ents_view;
434 
435  EntFiniteElement(const boost::shared_ptr<RefElement> &ref_finite_element,
436  const boost::shared_ptr<FiniteElement> &fe_ptr);
437 
438  /**
439  * \brief Get unique UId for finite element entity
440  * @return UId
441  */
442  inline const UId &getGlobalUniqueId() const { return globalUId; }
443 
444  /**
445  * \brief Generate UId for finite element entity
446  * @return finite element entity unique Id
447  */
448  static inline UId getGlobalUniqueIdCalculate(const EntityHandle ent,
449  const int bit_number) {
450  assert(bit_number <= 32);
451  return static_cast<UId>(ent) | static_cast<UId>(bit_number)
452  << 8 * sizeof(EntityHandle);
453  }
454 
455  /**
456  * \brief Generate UId for finite element entity
457  * @return finite element entity unique Id
458  */
460  return getGlobalUniqueIdCalculate(sPtr->getRefEnt(), getBitNumber());
461  }
462 
463  /**
464  * \brief Get element entity
465  * @return Element entity handle
466  */
467  inline EntityHandle getEnt() const { return getRefEnt(); }
468 
469  /**
470  * \brief Get number of DOFs on data
471  * @return Number of dofs on data
472  */
473  inline DofIdx getNbDofsData() const { return data_dofs->size(); }
474 
475  /**
476  * \brief Get data data dos multi-index structure
477  * @return Reference multi-index FEDofEntity_multiIndex
478  */
479  inline const FEDofEntity_multiIndex &getDataDofs() const {
480  return *data_dofs;
481  };
482 
483  friend std::ostream &operator<<(std::ostream &os, const EntFiniteElement &e);
484 
485  template <typename FE_ENTS, typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW>
486  inline MoFEMErrorCode
487  getDofView(const FE_ENTS &fe_ents_view, const MOFEM_DOFS &mofem_dofs,
488  MOFEM_DOFS_VIEW &dofs_view, const int operation_type) {
490  if (operation_type == moab::Interface::UNION) {
491  for (auto &it : fe_ents_view) {
492  if (auto e = it.lock()) {
493  auto r = mofem_dofs.template get<Unique_Ent_mi_tag>().equal_range(
494  e->getGlobalUniqueId());
495  dofs_view.insert(r.first, r.second);
496  }
497  }
498  } else
499  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
501  }
502 
503  template <typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW>
504  inline MoFEMErrorCode
505  getRowDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view,
506  const int operation_type = moab::Interface::UNION) {
507  return getDofView(*row_field_ents_view, mofem_dofs, dofs_view,
508  operation_type);
509  }
510 
511  template <typename MOFEM_DOFS, typename MOFEM_DOFS_VIEW>
512  inline MoFEMErrorCode
513  getColDofView(const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view,
514  const int operation_type = moab::Interface::UNION) {
515  return getDofView(*col_field_ents_view, mofem_dofs, dofs_view,
516  operation_type);
517  }
518 
519  MoFEMErrorCode getElementAdjacency(const boost::shared_ptr<Field> field_ptr,
520  Range &adjacency);
521 
522  inline boost::shared_ptr<RefElement> &getRefElement() const {
523  return this->sPtr;
524  }
525 
526  /**
527  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
528  *
529  * Vector is automatically destroy when last DOF in vector os destroyed. Every
530  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
531  * vector. That do the trick.
532  *
533  */
534  inline boost::weak_ptr<std::vector<FEDofEntity> > &getDofsSequence() const {
535  return dofsSequce;
536  }
537 
538 private:
539  // Keep vector of DoFS on entity
540  mutable boost::weak_ptr<std::vector<FEDofEntity> > dofsSequce;
541 };
542 
543 /**
544  * \brief interface to EntFiniteElement
545  * \ingroup fe_multi_indices
546  */
547 template <typename T>
550 
551  interface_EntFiniteElement(const boost::shared_ptr<T> &sptr)
552  : interface_FiniteElement<T>(sptr), interface_RefElement<T>(sptr) {}
553 
554  inline const FEDofEntity_multiIndex &getDataDofs() const {
555  return this->sPtr->getDataDofs();
556  }
557 
558  /**
559  * \brief Get number of DOFs on data
560  * @return Number of dofs on data
561  */
562  inline DofIdx getNbDofsData() const { return this->sPtr->getNbDofsData(); }
563 
564  /**
565  * \brief Get element entity
566  * @return Element entity handle
567  */
568  inline EntityHandle getEnt() const { return this->sPtr->getRefEnt(); }
569 
570  // /** \deprecated Use getEnt() instead
571  // */
572  // DEPRECATED inline EntityHandle get_ent() const { return getEnt(); }
573 
574  /**
575  * \brief Get unique UId for finite element entity
576  * @return UId
577  */
578  inline UId getGlobalUniqueId() const {
579  return this->sPtr->getGlobalUniqueId();
580  }
581 
583  return this->sPtr->getSideNumberTable();
584  }
585 
586  // /** \deprecated Use getSideNumberTable() instead
587  // */
588  // DEPRECATED SideNumber_multiIndex &get_side_number_table() const {
589  // return this->sPtr->getSideNumberTable();
590  // }
591 
592  inline MoFEMErrorCode getElementAdjacency(const Field *field_ptr,
593  Range &adjacency) {
594  return this->getElementAdjacency(field_ptr, adjacency);
595  }
596 
597  // /** \deprecated Use getElementAdjacency() instead
598  // */
599  // DEPRECATED inline MoFEMErrorCode get_element_adjacency(
600  // const Field *field_ptr,Range &adjacency
601  // ) {
602  // return this->getElementAdjacency(field_ptr,adjacency);
603  // }
604 
605  inline boost::shared_ptr<RefElement> &getRefElement() const {
606  return this->sPtr->getRefElement();
607  }
608 };
609 
610 /** \brief Partitioned (Indexed) Finite Element in Problem
611 
612  * This type of structure is used to compose problem. Problem is build from
613  * indexed finite elements. This data structure carry information about
614  * partition, which is specific to problem.
615 
616 
617  * \ingroup fe_multi_indices
618  */
620  : public interface_EntFiniteElement<EntFiniteElement> {
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)
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  */
672  const FENumeredDofEntity **dof_ptr) const;
673 
674  // /** \deprecated Use getRowDofsByPetscGlobalDofIdx() instead
675  // */
676  // inline DEPRECATED MoFEMErrorCode get_row_dofs_by_petsc_gloabl_dof_idx(
677  // DofIdx idx,const FENumeredDofEntity **dof_ptr
678  // ) const {
679  // return getRowDofsByPetscGlobalDofIdx(idx,dof_ptr);
680  // }
681 
682  /** \brief get FE dof by petsc index
683  * \ingroup mofem_dofs
684  */
687  const FENumeredDofEntity **dof_ptr) const;
688 
689  // /** \deprecated Use getColDofsByPetscGlobalDofIdx() instead
690  // */
691  // inline DEPRECATED MoFEMErrorCode get_col_dofs_by_petsc_gloabl_dof_idx(
692  // DofIdx idx,const FENumeredDofEntity **dof_ptr
693  // ) const {
694  // return getColDofsByPetscGlobalDofIdx(idx,dof_ptr);
695  // }
696 
697  friend std::ostream &operator<<(std::ostream &os,
698  const NumeredEntFiniteElement &e) {
699  os << "part " << e.part << " " << *(e.sFePtr);
700  return os;
701  }
702 
703  /**
704  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
705  *
706  * Vector is automatically destroy when last DOF in vector os destroyed. Every
707  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
708  * vector. That do the trick.
709  *
710  */
711  inline boost::weak_ptr<std::vector<FENumeredDofEntity> > &
713  return dofsRowSequce;
714  }
715 
716  /**
717  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
718  *
719  * Vector is automatically destroy when last DOF in vector os destroyed. Every
720  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
721  * vector. That do the trick.
722  *
723  */
724  inline boost::weak_ptr<std::vector<FENumeredDofEntity> > &
726  return dofsColSequce;
727  }
728 
729 private:
730  // Keep vector of DoFS on entity
731  mutable boost::weak_ptr<std::vector<FENumeredDofEntity> > dofsRowSequce;
732  mutable boost::weak_ptr<std::vector<FENumeredDofEntity> > dofsColSequce;
733 };
734 
735 /** \brief interface for NumeredEntFiniteElement
736  * \ingroup fe_multi_indices
737  */
738 template <typename T>
740  : public interface_EntFiniteElement<T> {
741 
742  interface_NumeredEntFiniteElement(const boost::shared_ptr<T> &sptr)
743  : interface_EntFiniteElement<T>(sptr){};
744 
745  /**
746  * \brief Get partition number
747  * @return Partition number
748  */
749  inline unsigned int getPart() const { return this->sPtr->getPart(); }
750 
751  /** \brief get FE dof on row
752  * \ingroup mofem_dofs
753  */
755  return this->sPtr->getRowsDofs();
756  };
757 
758  /** \brief get FE dof on column
759  * \ingroup mofem_dofs
760  */
762  return this->sPtr->getColsDofs();
763  };
764 };
765 
766 /**
767  * @relates multi_index_container
768  * \brief MultiIndex container for EntFiniteElement
769  * \ingroup fe_multi_indices
770  *
771  */
772 typedef multi_index_container<
773  boost::shared_ptr<EntFiniteElement>,
774  indexed_by<
775  ordered_unique<
776  tag<Unique_mi_tag>,
777  member<EntFiniteElement, UId, &EntFiniteElement::globalUId> >,
778  ordered_non_unique<tag<Ent_mi_tag>,
779  const_mem_fun<EntFiniteElement, EntityHandle,
781  ordered_non_unique<
782  tag<FiniteElement_name_mi_tag>,
784  boost::string_ref, &EntFiniteElement::getNameRef> >,
785  ordered_non_unique<
786  tag<BitFEId_mi_tag>,
789  LtBit<BitFEId> >,
790  ordered_non_unique<
791  tag<EntType_mi_tag>,
793  EntityType, &EntFiniteElement::getEntType> >,
794  ordered_non_unique<
795  tag<Composite_Name_And_Ent_mi_tag>,
796  composite_key<
797  EntFiniteElement,
799  boost::string_ref, &EntFiniteElement::getNameRef>,
800  const_mem_fun<EntFiniteElement, EntityHandle,
801  &EntFiniteElement::getEnt> > > > >
803 
804 /**
805  * \brief Entity finite element multi-index by finite element name
806  *
807  * \ingroup fe_multi_indices
808  */
809 typedef EntFiniteElement_multiIndex::index<FiniteElement_name_mi_tag>::type
811 
812 /**
813  @relates multi_index_container
814  \brief MultiIndex for entities for NumeredEntFiniteElement
815  \ingroup fe_multi_indices
816  */
817 typedef multi_index_container<
818  boost::shared_ptr<NumeredEntFiniteElement>,
819  indexed_by<
820  ordered_unique<
821  tag<Unique_mi_tag>,
822  const_mem_fun<
825  ordered_non_unique<tag<Part_mi_tag>,
826  member<NumeredEntFiniteElement, unsigned int,
828  ordered_non_unique<
829  tag<FiniteElement_name_mi_tag>,
831  boost::string_ref,
833  ordered_non_unique<
834  tag<Ent_mi_tag>,
835  const_mem_fun<
838  ordered_non_unique<
839  tag<Composite_Name_And_Ent_mi_tag>,
840  composite_key<
842  const_mem_fun<
844  boost::string_ref, &NumeredEntFiniteElement::getNameRef>,
845  const_mem_fun<
848  ordered_non_unique<
849  tag<Composite_Name_And_Part_mi_tag>,
850  composite_key<
852  const_mem_fun<
854  boost::string_ref, &NumeredEntFiniteElement::getNameRef>,
855  member<NumeredEntFiniteElement, unsigned int,
858 
859 /**
860  * \brief Entity finite element multi-index by finite element name
861  *
862  * \ingroup fe_multi_indices
863  */
864 typedef NumeredEntFiniteElement_multiIndex::index<
866 
867 /**
868  * \brief Entity finite element multi-index by finite element name and
869  * partition
870  *
871  * \ingroup fe_multi_indices
872  */
873 typedef NumeredEntFiniteElement_multiIndex::index<
875 
876 /**
877  @relates multi_index_container
878  \brief MultiIndex for entities for FiniteElement
879  \ingroup fe_multi_indices
880  */
881 typedef multi_index_container<
882  boost::shared_ptr<FiniteElement>,
883  indexed_by<hashed_unique<tag<FiniteElement_Meshset_mi_tag>,
884  member<FiniteElement, EntityHandle,
886  hashed_unique<
887  tag<BitFEId_mi_tag>,
888  const_mem_fun<FiniteElement, BitFEId, &FiniteElement::getId>,
890  ordered_unique<tag<FiniteElement_name_mi_tag>,
891  const_mem_fun<FiniteElement, boost::string_ref,
894 
895 // modificators
896 
897 /**
898  * \brief Change finite element part
899  *
900  * \ingroup fe_multi_indices
901  */
903  unsigned int pArt;
904  NumeredEntFiniteElement_change_part(unsigned int part) : pArt(part){};
905  void operator()(boost::shared_ptr<NumeredEntFiniteElement> &fe) {
906  fe->part = pArt;
907  }
909 };
910 
911 /**
912  * \brief Add field to column
913  *
914  * \ingroup fe_multi_indices
915  */
919  : fIdCol(f_id_col){};
920  void operator()(boost::shared_ptr<FiniteElement> &fe);
921 };
922 
923 /**
924  * \brief Add field to row
925  *
926  * \ingroup fe_multi_indices
927  */
931  : fIdRow(f_id_row){};
932  void operator()(boost::shared_ptr<FiniteElement> &fe);
933 };
934 
935 /**
936  * \brief Add field to data
937  *
938  * \ingroup fe_multi_indices
939  */
943  : fIdData(f_id_data){};
944  void operator()(boost::shared_ptr<FiniteElement> &fe);
945 };
946 
947 /**
948  * \brief Unset field from column
949  *
950  * \ingroup fe_multi_indices
951  */
955  : fIdCol(f_id_col){};
956  void operator()(boost::shared_ptr<FiniteElement> &fe);
957 };
958 
959 /**
960  * \brief Unset field from row
961  *
962  * \ingroup fe_multi_indices
963  */
967  : fIdRow(f_id_row){};
968  void operator()(boost::shared_ptr<FiniteElement> &fe);
969 };
970 
971 /**
972  * \brief Unset field from data
973  *
974  * \ingroup fe_multi_indices
975  */
979  : fIdData(f_id_data){};
980  void operator()(boost::shared_ptr<FiniteElement> &fe);
981 };
982 
983 } // namespace MoFEM
984 
985 /**
986  * Loop over DOFs in row on element
987  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
988  * @param IT iterator
989  * @return user return in for(_IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR,IT))
990  * \ingroup fe_multi_indices
991  */
992 #define _IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR, IT) \
993  FENumeredDofEntity_multiIndex::iterator IT = FEPTR->rows_dofs->begin(); \
994  IT != FEPTR->rows_dofs->end(); \
995  IT++
996 
997 /// \deprecated use _IT_FENUMEREDDOF_ROW_FOR_LOOP_
998 #define _IT_FENUMEREDDOFMOFEMENTITY_ROW_FOR_LOOP_(FEPTR, IT) \
999  _IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR, IT)
1000 
1001 /**
1002  * Loop over DOFs in col on element
1003  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1004  * @param IT iterator
1005  * @return user return in for(_IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR,IT))
1006  * \ingroup fe_multi_indices
1007  */
1008 #define _IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR, IT) \
1009  FENumeredDofEntity_multiIndex::iterator IT = FEPTR->cols_dofs->begin(); \
1010  IT != FEPTR->cols_dofs->end(); \
1011  IT++
1012 
1013 /// \deprecated use _IT_FENUMEREDDOF_COL_FOR_LOOP_ instead
1014 #define _IT_FENUMEREDDOFMOFEMENTITY_COL_FOR_LOOP_(FEPTR, IT) \
1015  _IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR, IT)
1016 
1017 /**
1018  * Loop over DOFs in row on element for particular filed
1019  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1020  * @param NAME name of filed
1021  * @param IT iterator
1022  * @return user return in
1023  * for(_IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR,NAME,IT)) \ingroup
1024  * fe_multi_indices
1025  */
1026 #define _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT) \
1027  FENumeredDofEntityByFieldName::iterator IT = \
1028  FEPTR->rows_dofs->get<FieldName_mi_tag>().lower_bound(NAME); \
1029  IT != FEPTR->rows_dofs->get<FieldName_mi_tag>().upper_bound(NAME); \
1030  IT++
1031 
1032 /// \deprecated use _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_ instead
1033 #define _IT_FENUMEREDDOFMOFEMENTITY_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT) \
1034  _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT)
1035 
1036 /**
1037  * Loop over DOFs in col on element for particular filed
1038  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1039  * @param NAME name of filed
1040  * @param IT iterator
1041  * @return user return in
1042  * for(_IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR,NAME,IT)) \ingroup
1043  * fe_multi_indices
1044  */
1045 #define _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT) \
1046  FENumeredDofEntityByFieldName::iterator IT = \
1047  FEPTR->cols_dofs->get<FieldName_mi_tag>().lower_bound(NAME); \
1048  IT != FEPTR->cols_dofs->get<FieldName_mi_tag>().upper_bound(NAME); \
1049  IT++
1050 
1051 /// \deprecated use _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_ instead
1052 #define _IT_FENUMEREDDOFMOFEMENTITY_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT) \
1053  _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT)
1054 
1055 #endif // __FEMMULTIINDICES_HPP__
1056 
1057 /***************************************************************************/ /**
1058 * \defgroup fe_multi_indices Finite elements structures and multi-indices
1059 * \ingroup mofem
1060 ******************************************************************************/
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.
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< PetscGlobalIdx_mi_tag >, const_mem_fun< FENumeredDofEntity::interface_type_NumeredDofEntity, DofIdx, &FENumeredDofEntity::getPetscGlobalDofIdx > >, 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.
void operator()(boost::shared_ptr< FiniteElement > &fe)
void operator()(boost::shared_ptr< FiniteElement > &fe)
RefElement_MESHSET(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Common.hpp:60
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
const FENumeredDofEntity_multiIndex & getRowsDofs() const
get FE dof on row
const BitRefEdges & getBitRefEdges() const
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.
static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
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:499
const boost::shared_ptr< FiniteElement > & get_MoFEMFiniteElementPtr()
Partitioned (Indexed) Finite Element in Problem.
FiniteElement_col_change_bit_add(const BitFieldId f_id_col)
keeps data about abstract PRISM finite element
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.
static MoFEMErrorCode defaultTri(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
unsigned int getBitNumber() const
Get bit identifying this element.
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.
MoFEMErrorCode getDofView(const FE_ENTS &fe_ents_view, const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &dofs_view, const int operation_type)
std::bitset< BITREFEDGES_SIZE > BitRefEdges
Definition: Common.hpp:141
const UId & getGlobalUniqueId() const
Get unique UId for finite element entity.
std::string getName() const
Get finite element name.
virtual const BitRefEdges & getBitRefEdges() const
std::bitset< BITFEID_SIZE > BitFEId
Definition: Common.hpp:150
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.
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
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:506
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.
uint128_t UId
Unique Id.
Definition: Common.hpp:136
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.
MoFEMErrorCode getColDofsByPetscGlobalDofIdx(DofIdx idx, const FENumeredDofEntity **dof_ptr) const
get FE dof by petsc index
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
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)
MoFEMErrorCode getElementAdjacency(const Field *field_ptr, Range &adjacency)
RefElement(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
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
interface_EntFiniteElement(const boost::shared_ptr< T > &sptr)
static MoFEMErrorCode defaultTet(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
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
ElementAdjacencyFunct elementAdjacencyTable[MBMAXTYPE]
Table of functions retrieving adjacencies for finite element User can alter and change default behavi...
boost::function< MoFEMErrorCode(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)> ElementAdjacencyFunct
user adjacency function
BitFEId * tagId
ptr to tag storing FE id
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
boost::shared_ptr< T > sFePtr
boost::shared_ptr< FENumeredDofEntity_multiIndex > rows_dofs
indexed dofs on rows
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.
static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
interface_RefEntity< T > interface_type_RefEntity
keeps data about abstract TET finite element
intrface to RefElement
friend std::ostream & operator<<(std::ostream &os, const RefElement_TRI &e)
SideNumber_multiIndex & getSideNumberTable() const
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)
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)
RefElement_PRISM(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
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
EntFiniteElement_multiIndex::index< FiniteElement_name_mi_tag >::type EntFiniteElementByName
Entity finite element multi-index by finite element name.
static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
FiniteElement_change_bit_add(const BitFieldId f_id_data)
boost::shared_ptr< EntFiniteElement > & getEntFiniteElement() const
boost::shared_ptr< FieldEntity_multiIndex_spaceType_view > data_field_ents_view
unsigned int part
Partition number.
void * tagName
ptr to tag storing FE name
FiniteElement_change_bit_off(const BitFieldId f_id_data)
keeps data about abstract TRI finite element
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
interface to EntFiniteElement
static BitRefEdges DummyBitRefEdges
RefElement_TET(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
boost::string_ref getNameRef() const
Get finite element name.
RefElement_TRI(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
keeps data about abstract MESHSET finite element
MoFEMErrorCode getRowDofsByPetscGlobalDofIdx(DofIdx idx, const FENumeredDofEntity **dof_ptr) const
get FE dof by petsc index
virtual const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
EntityHandle getEnt() const
Get element entity.
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
#define NOT_USED(x)
Definition: definitions.h:301
SideNumber_multiIndex & getSideNumberTable() 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