v0.8.16
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  // /** \deprecated Use getSideNumberTable() instead
46  // */
47  // DEPRECATED SideNumber_multiIndex &get_side_number_table() const {
48  // return getSideNumberTable();
49  // }
50 
51  static const boost::shared_ptr<SideNumber> nullSideNumber;
52 
53  virtual const boost::shared_ptr<SideNumber> &
54  getSideNumberPtr(const EntityHandle ent) const {
55  NOT_USED(ent);
56  return nullSideNumber;
57  };
58 
59  // /**
60  // * \deprecated First argument is no longer needed
61  // */
62  // virtual DEPRECATED boost::shared_ptr<SideNumber> getSideNumberPtr(
63  // const moab::Interface &moab,const EntityHandle ent
64  // ) const {
65  // NOT_USED(moab);
66  // return getSideNumberPtr(ent);
67  // }
68 
69  /**
70  * \brief Get pointer to RefEntity
71  */
72  inline boost::shared_ptr<RefEntity> &getRefEntityPtr() const {
73  return this->sPtr;
74  }
75 
76  friend std::ostream &operator<<(std::ostream &os, const RefElement &e);
77 };
78 
79 /**
80  * \brief keeps data about abstract MESHSET finite element
81  * \ingroup fe_multi_indices
82  */
83 struct RefElement_MESHSET : public RefElement {
84  RefElement_MESHSET(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
85  const boost::shared_ptr<SideNumber> &
86  getSideNumberPtr(const EntityHandle ent) const;
87 };
88 /**
89  * \brief keeps data about abstract PRISM finite element
90  * \ingroup fe_multi_indices
91  */
92 struct RefElement_PRISM : public RefElement {
94  RefElement_PRISM(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
95  const boost::shared_ptr<SideNumber> &
96  getSideNumberPtr(const EntityHandle ent) const;
97  const BitRefEdges &getBitRefEdges() const { return *tag_BitRefEdges; }
98  int getBitRefEdgesUlong() const { return getBitRefEdges().to_ulong(); }
99 };
100 
101 /**
102  * \brief keeps data about abstract TET finite element
103  * \ingroup fe_multi_indices
104  */
105 struct RefElement_TET : public RefElement {
107  const int *tag_type_data;
108  RefElement_TET(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
109  const boost::shared_ptr<SideNumber> &
110  getSideNumberPtr(const EntityHandle ent) const;
112  return const_cast<SideNumber_multiIndex &>(side_number_table);
113  };
114  const BitRefEdges &getBitRefEdges() const { return *tag_BitRefEdges; }
115  int getBitRefEdgesUlong() const { return getBitRefEdges().to_ulong(); }
116 };
117 
118 /**
119  * \brief keeps data about abstract TRI finite element
120  * \ingroup fe_multi_indices
121  */
122 struct RefElement_TRI : public RefElement {
123  RefElement_TRI(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
124  const boost::shared_ptr<SideNumber> &
125  getSideNumberPtr(const EntityHandle ent) const;
126  friend std::ostream &operator<<(std::ostream &os, const RefElement_TRI &e);
127 };
128 
129 /**
130  * \brief keeps data about abstract EDGE finite element
131  * \ingroup fe_multi_indices
132  */
133 struct RefElement_EDGE : public RefElement {
134  RefElement_EDGE(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
135  const boost::shared_ptr<SideNumber> &
136  getSideNumberPtr(const EntityHandle ent) const;
137  friend std::ostream &operator<<(std::ostream &os, const RefElement_EDGE &e);
138 };
139 
140 /**
141  * \brief keeps data about abstract VERTEX finite element
142  * \ingroup fe_multi_indices
143  */
144 struct RefElement_VERTEX : public RefElement {
145  RefElement_VERTEX(const boost::shared_ptr<RefEntity> &ref_ent_ptr);
146  const boost::shared_ptr<SideNumber> &
147  getSideNumberPtr(const EntityHandle ent) const;
148  friend std::ostream &operator<<(std::ostream &os, const RefElement_VERTEX &e);
149 };
150 
151 /**
152  * \brief intrface to RefElement
153  * \ingroup fe_multi_indices
154  */
155 template <typename T> struct interface_RefElement : interface_RefEntity<T> {
156 
159 
160  interface_RefElement(const boost::shared_ptr<T> &sptr)
161  : interface_RefEntity<T>(sptr) {}
162 
163  inline int getBitRefEdgesUlong() const {
164  return this->sPtr->getBitRefEdgesUlong();
165  }
166 
168  return this->sPtr->getSideNumberTable();
169  }
170 
171  inline const boost::shared_ptr<SideNumber> &
172  getSideNumberPtr(const EntityHandle ent) const {
173  return this->sPtr->getSideNumberPtr(ent);
174  }
175 
176  inline boost::shared_ptr<RefEntity> &getRefEntityPtr() const {
177  return this->sPtr->getRefEntityPtr();
178  }
179 
180  inline const boost::shared_ptr<T> &getRefElement() const {
181  return this->sPtr;
182  }
183 
185 };
186 
187 /**
188  * \typedef RefElement_multiIndex
189  * type multiIndex container for RefElement
190  * \ingroup fe_multi_indices
191  *
192  * \param hashed_unique Ent_mi_tag
193  * \param ordered_non_unique Meshset_mi_tag
194  * \param ordered_non_unique Ent_Ent_mi_tag
195  * \param ordered_non_unique Composite_ParentEnt_And_BitsOfRefinedEdges_mi_tag
196  */
197 typedef multi_index_container<
198  boost::shared_ptr<RefElement>,
199  // ptrWrapperRefElement,
200  indexed_by<
201  ordered_unique<tag<Ent_mi_tag>,
204  ordered_non_unique<
205  tag<EntType_mi_tag>,
206  const_mem_fun<RefElement::interface_type_RefEntity, EntityType,
207  &RefElement::getEntType> > > >
209 
210 typedef multi_index_container<
211  boost::shared_ptr<RefElement>,
212  // ptrWrapperRefElement,
213  indexed_by<
214  ordered_unique<tag<Ent_mi_tag>,
217  ordered_non_unique<
218  tag<Ent_Ent_mi_tag>,
221  ordered_non_unique<
222  tag<Composite_ParentEnt_And_BitsOfRefinedEdges_mi_tag>,
223  composite_key<
224  RefElement,
227  const_mem_fun<RefElement, int,
230 
232 
233 /** \brief user adjacency function
234  * \ingroup fe_multi_indices
235  */
236 typedef boost::function<MoFEMErrorCode(Interface &moab, const Field &field_ptr,
237  const EntFiniteElement &fe_ptr,
238  Range &adjacency)>
240 
241 // /** \brief user adjacency function table
242 // * \ingroup fe_multi_indices
243 // */
244 // typedef ElementAdjacencyFunct[MBMAXTYPE] ElementAdjacencyTable;
245 
246 // /** \brief user adjacency function table
247 // * \ingroup fe_multi_indices
248 // */
249 // typedef MoFEMErrorCode (*ElementAdjacencyTable[MBMAXTYPE])(
250 // Interface &moab,const Field &field_ptr,const EntFiniteElement &fe_ptr,Range
251 // &adjacency
252 // );
253 //
254 // /** \brief user adjacency function
255 // * \ingroup fe_multi_indices
256 // */
257 // typedef MoFEMErrorCode (*ElementAdjacencyFunct)(
258 // Interface &moab,const Field &field_ptr,const EntFiniteElement &fe_ptr,Range
259 // &adjacency
260 // );
261 
262 /**
263  * \brief Finite element definition
264  * \ingroup fe_multi_indices
265  */
267 
268  EntityHandle meshset; ///< meshset stores FE ents
269  BitFEId *tagId; ///< ptr to tag storing FE id
270  void *tagName; ///< ptr to tag storing FE name
271  int tagNameSize; ///< numer of characters in FE name
272  BitFieldId *tag_BitFieldId_col_data; ///< tag stores col id_id for fields
273  BitFieldId *tag_BitFieldId_row_data; ///< tag stores row id_id for fields
274  BitFieldId *tag_BitFieldId_data; ///< tag stores data id_id for fields
275 
276  FiniteElement(Interface &moab, const EntityHandle _meshset);
277 
278  /**
279  * \brief Get finite element id
280  * @return Finite element Id
281  */
282  inline BitFEId getId() const { return *tagId; };
283 
284  /**
285  * \brief Get meshset containing element entities
286  * @return Meshset
287  */
288  inline EntityHandle getMeshset() const { return meshset; }
289 
290  /**
291  * \brief Get finite element name
292  * @return string_ref
293  */
294  inline boost::string_ref getNameRef() const {
295  return boost::string_ref((char *)tagName, tagNameSize);
296  }
297 
298  /**
299  * \brief Get finite element name
300  * @return string
301  */
302  inline std::string getName() const {
303  return std::string((char *)tagName, tagNameSize);
304  }
305 
306  /**
307  * \brief Get field ids on columns
308  * @return Bit field ids
309  */
310  inline BitFieldId getBitFieldIdCol() const {
311  return *((BitFieldId *)tag_BitFieldId_col_data);
312  }
313 
314  /**
315  * \brief Get field ids on rows
316  * @return Bit field ids
317  */
318  inline BitFieldId getBitFieldIdRow() const {
319  return *((BitFieldId *)tag_BitFieldId_row_data);
320  }
321 
322  /**
323  * \brief Get field ids on data
324  * @return Bit field ids
325  */
326  inline BitFieldId getBitFieldIdData() const {
327  return *((BitFieldId *)tag_BitFieldId_data);
328  }
329 
330  /**
331  * \brief Get bit identifying this element
332  *
333  * Each element like field is identified by bit set. Each element has unique
334  * bit set, this function returns number of that bit.
335  *
336  * @return Bit number
337  */
338  inline unsigned int getBitNumber() const {
339  return ffsl(((BitFieldId *)tagId)->to_ulong());
340  }
341 
342  /**
343  * \brief Table of functions retrieving adjacencies for finite element
344  * User can alter and change default behavior
345  */
347 
348  /**
349  * \brief print finite element
350  */
351  friend std::ostream &operator<<(std::ostream &os, const FiniteElement &e);
352 };
353 
354 /** \brief default adjacency map
355  * \ingroup fe_multi_indices
356  */
358 
359  static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field_ptr,
360  const EntFiniteElement &fe_ptr,
361  Range &adjacency);
362  static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field_ptr,
363  const EntFiniteElement &fe_ptr,
364  Range &adjacency);
365  static MoFEMErrorCode defaultTri(Interface &moab, const Field &field_ptr,
366  const EntFiniteElement &fe_ptr,
367  Range &adjacency);
368  static MoFEMErrorCode defaultTet(Interface &moab, const Field &field_ptr,
369  const EntFiniteElement &fe_ptr,
370  Range &adjacency);
371  static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field_ptr,
372  const EntFiniteElement &fe_ptr,
373  Range &adjacency);
374  static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field_ptr,
375  const EntFiniteElement &fe_ptr,
376  Range &adjacency);
377 };
378 
379 /**
380  * \brief Inetface for FE
381  * \ingroup fe_multi_indices
382  */
383 template <typename T> struct interface_FiniteElement {
384 
385  mutable boost::shared_ptr<T> sFePtr;
386 
387  interface_FiniteElement(const boost::shared_ptr<T> &ptr) : sFePtr(ptr){};
388 
389  inline const boost::shared_ptr<FiniteElement> &get_MoFEMFiniteElementPtr() {
390  return this->sFePtr;
391  };
392 
393  /**
394  * \brief Get finite element id
395  * @return Finite element Id
396  */
397  inline BitFEId getId() const { return this->sFePtr->getId(); }
398 
399  /**
400  * \brief Get meshset containing element entities
401  * @return Meshset
402  */
403  inline EntityHandle getMeshset() const { return this->sFePtr->getMeshset(); }
404 
405  /**
406  * \brief Get finite element name
407  * @return string_ref
408  */
409  inline boost::string_ref getNameRef() const {
410  return this->sFePtr->getNameRef();
411  }
412 
413  /**
414  * \brief Get finite element name
415  * @return string_ref
416  */
417  inline std::string getName() const { return this->sFePtr->getName(); }
418 
419  /**
420  * \brief Get field ids on columns
421  * @return Bit field ids
422  */
423  inline BitFieldId getBitFieldIdCol() const {
424  return this->sFePtr->getBitFieldIdCol();
425  }
426 
427  /**
428  * \brief Get field ids on rows
429  * @return Bit field ids
430  */
431  inline BitFieldId getBitFieldIdRow() const {
432  return this->sFePtr->getBitFieldIdRow();
433  }
434 
435  /**
436  * \brief Get field ids on data
437  * @return Bit field ids
438  */
439  inline BitFieldId getBitFieldIdData() const {
440  return this->sFePtr->getBitFieldIdData();
441  }
442 
443  /**
444  * \brief Get bit identifying this element
445  *
446  * Each element like field is identified by bit set. Each element has unique
447  * bit set, this function returns number of that bit.
448  *
449  * @return Bit number
450  */
451  inline unsigned int getBitNumber() const {
452  return this->sFePtr->getBitNumber();
453  }
454 };
455 
456 /**
457  * \brief Finite element data for entity
458  * \ingroup fe_multi_indices
459  */
460 struct EntFiniteElement : public interface_FiniteElement<FiniteElement>,
461  interface_RefElement<RefElement> {
462 
466  boost::shared_ptr<DofEntity_multiIndex_uid_view> row_dof_view;
467  boost::shared_ptr<DofEntity_multiIndex_uid_view> col_dof_view;
468  boost::shared_ptr<FEDofEntity_multiIndex> data_dofs;
470 
471  EntFiniteElement(const boost::shared_ptr<RefElement> ref_finite_element,
472  const boost::shared_ptr<FiniteElement> fe_ptr);
473 
474  /**
475  * \brief Get unique UId for finite element entity
476  * @return UId
477  */
478  inline const UId &getGlobalUniqueId() const { return globalUid; }
479 
480  /**
481  * \brief Generate UId for finite element entity
482  * @return finite element entity unique Id
483  */
484  static inline UId getGlobalUniqueIdCalculate(const EntityHandle ent,
485  const int bit_number) {
486  assert(bit_number <= 32);
487  return static_cast<UId>(ent) | static_cast<UId>(bit_number)
488  << 8 * sizeof(EntityHandle);
489  }
490 
491  /**
492  * \brief Generate UId for finite element entity
493  * @return finite element entity unique Id
494  */
496  return getGlobalUniqueIdCalculate(sPtr->getRefEnt(), getBitNumber());
497  }
498 
499  /**
500  * \brief Get element entity
501  * @return Element entity handle
502  */
503  inline EntityHandle getEnt() const { return getRefEnt(); }
504 
505  // /** \deprecated Use getEnt() instead
506  // */
507  // DEPRECATED inline EntityHandle get_ent() const { return getEnt(); }
508 
509  /**
510  * \brief Get number of DOFs on row
511  * @return Number of dofs on row
512  */
513  inline DofIdx getNbDofsRow() const { return row_dof_view->size(); }
514 
515  /**
516  * \brief Get number of DOFs on col
517  * @return Number of dofs on col
518  */
519  inline DofIdx getNbDofsCol() const { return col_dof_view->size(); }
520 
521  /**
522  * \brief Get number of DOFs on data
523  * @return Number of dofs on data
524  */
525  inline DofIdx getNbDofsData() const { return data_dofs->size(); }
526 
527  /**
528  * \brief Get data data dos multi-index structure
529  * @return Reference multi-index FEDofEntity_multiIndex
530  */
531  inline const FEDofEntity_multiIndex &getDataDofs() const {
532  return *data_dofs;
533  };
534 
535  friend std::ostream &operator<<(std::ostream &os, const EntFiniteElement &e);
536 
540  const int operation_type = moab::Interface::UNION) const;
541 
545  const int operation_type = moab::Interface::UNION) const;
546 
550  const int operation_type = moab::Interface::UNION) const;
551 
555  const int operation_type = moab::Interface::UNION) const;
556 
560  const int operation_type = moab::Interface::UNION) const;
561 
565  const int operation_type = moab::Interface::UNION) const;
566 
570  const int operation_type = moab::Interface::UNION) const;
571 
575  const int operation_type = moab::Interface::UNION) const;
576 
580  const int operation_type = moab::Interface::UNION) const;
581 
582  MoFEMErrorCode getElementAdjacency(const boost::shared_ptr<Field> field_ptr,
583  Range &adjacency);
584 
585  inline boost::shared_ptr<RefElement> &getRefElement() const {
586  return this->sPtr;
587  }
588 
589  /**
590  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
591  *
592  * Vector is automatically destroy when last DOF in vector os destroyed. Every
593  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
594  * vector. That do the trick.
595  *
596  */
597  inline boost::weak_ptr<std::vector<FEDofEntity> > &getDofsSequence() const {
598  return dofsSequce;
599  }
600 
601 private:
602  // Keep vector of DoFS on entity
603  mutable boost::weak_ptr<std::vector<FEDofEntity> > dofsSequce;
604 };
605 
606 /**
607  * \brief interface to EntFiniteElement
608  * \ingroup fe_multi_indices
609  */
610 template <typename T>
613 
614  interface_EntFiniteElement(const boost::shared_ptr<T> &sptr)
615  : interface_FiniteElement<T>(sptr), interface_RefElement<T>(sptr) {}
616 
617  inline const FEDofEntity_multiIndex &getDataDofs() const {
618  return this->sPtr->getDataDofs();
619  }
620 
621  /**
622  * \brief Get number of DOFs on row
623  * @return Number of dofs on row
624  */
625  inline DofIdx getNbDofsRow() const { return this->sPtr->getNbDofsRow(); }
626 
627  /**
628  * \brief Get number of DOFs on col
629  * @return Number of dofs on col
630  */
631  inline DofIdx getNbDofsCol() const { return this->sPtr->getNbDofsCol(); }
632 
633  /**
634  * \brief Get number of DOFs on data
635  * @return Number of dofs on data
636  */
637  inline DofIdx getNbDofsData() const { return this->sPtr->getNbDofsData(); }
638 
639  /**
640  * \brief Get element entity
641  * @return Element entity handle
642  */
643  inline EntityHandle getEnt() const { return this->sPtr->getRefEnt(); }
644 
645  // /** \deprecated Use getEnt() instead
646  // */
647  // DEPRECATED inline EntityHandle get_ent() const { return getEnt(); }
648 
649  /**
650  * \brief Get unique UId for finite element entity
651  * @return UId
652  */
653  inline UId getGlobalUniqueId() const {
654  return this->sPtr->getGlobalUniqueId();
655  }
656 
658  return this->sPtr->getSideNumberTable();
659  }
660 
661  // /** \deprecated Use getSideNumberTable() instead
662  // */
663  // DEPRECATED SideNumber_multiIndex &get_side_number_table() const {
664  // return this->sPtr->getSideNumberTable();
665  // }
666 
667  inline MoFEMErrorCode getElementAdjacency(const Field *field_ptr,
668  Range &adjacency) {
669  return this->getElementAdjacency(field_ptr, adjacency);
670  }
671 
672  // /** \deprecated Use getElementAdjacency() instead
673  // */
674  // DEPRECATED inline MoFEMErrorCode get_element_adjacency(
675  // const Field *field_ptr,Range &adjacency
676  // ) {
677  // return this->getElementAdjacency(field_ptr,adjacency);
678  // }
679 
680  inline boost::shared_ptr<RefElement> &getRefElement() const {
681  return this->sPtr->getRefElement();
682  }
683 };
684 
685 /** \brief Partitioned (Indexed) Finite Element in Problem
686 
687  * This type of structure is used to compose problem. Problem is build from
688  * indexed finite elements. This data structure carry information about
689  * partition, which is specific to problem.
690 
691 
692  * \ingroup fe_multi_indices
693  */
695  : public interface_EntFiniteElement<EntFiniteElement> {
696 
701 
702  unsigned int part; ///< Partition number
703  boost::shared_ptr<FENumeredDofEntity_multiIndex>
704  rows_dofs; ///< indexed dofs on rows
705  boost::shared_ptr<FENumeredDofEntity_multiIndex>
706  cols_dofs; ///< indexed dofs on columns
707 
708  inline boost::shared_ptr<EntFiniteElement> &getEntFiniteElement() const {
709  return this->sPtr;
710  }
711 
712  /**
713  * \Construct indexed finite element
714  */
715  NumeredEntFiniteElement(const boost::shared_ptr<EntFiniteElement> &sptr)
721 
722  /**
723  * \brief Get partition number
724  * @return [description]
725  */
726  inline unsigned int getPart() const { return part; };
727 
728  /** \brief get FE dof on row
729  * \ingroup mofem_dofs
730  */
732  return *rows_dofs;
733  };
734 
735  /** \brief get FE dof on column
736  * \ingroup mofem_dofs
737  */
739  return *cols_dofs;
740  };
741 
742  /** \brief get FE dof by petsc index
743  * \ingroup mofem_dofs
744  */
747  const FENumeredDofEntity **dof_ptr) const;
748 
749  // /** \deprecated Use getRowDofsByPetscGlobalDofIdx() instead
750  // */
751  // inline DEPRECATED MoFEMErrorCode get_row_dofs_by_petsc_gloabl_dof_idx(
752  // DofIdx idx,const FENumeredDofEntity **dof_ptr
753  // ) const {
754  // return getRowDofsByPetscGlobalDofIdx(idx,dof_ptr);
755  // }
756 
757  /** \brief get FE dof by petsc index
758  * \ingroup mofem_dofs
759  */
762  const FENumeredDofEntity **dof_ptr) const;
763 
764  // /** \deprecated Use getColDofsByPetscGlobalDofIdx() instead
765  // */
766  // inline DEPRECATED MoFEMErrorCode get_col_dofs_by_petsc_gloabl_dof_idx(
767  // DofIdx idx,const FENumeredDofEntity **dof_ptr
768  // ) const {
769  // return getColDofsByPetscGlobalDofIdx(idx,dof_ptr);
770  // }
771 
772  friend std::ostream &operator<<(std::ostream &os,
773  const NumeredEntFiniteElement &e) {
774  os << "part " << e.part << " " << *(e.sFePtr);
775  return os;
776  }
777 
778  /**
779  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
780  *
781  * Vector is automatically destroy when last DOF in vector os destroyed. Every
782  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
783  * vector. That do the trick.
784  *
785  */
786  inline boost::weak_ptr<std::vector<FENumeredDofEntity> > &
788  return dofsRowSequce;
789  }
790 
791  /**
792  * \brief Get weak_ptr reference to sequence/vector storing dofs on entity.
793  *
794  * Vector is automatically destroy when last DOF in vector os destroyed. Every
795  * shared_ptr to the DOF has aliased shared_ptr to vector of DOFs in that
796  * vector. That do the trick.
797  *
798  */
799  inline boost::weak_ptr<std::vector<FENumeredDofEntity> > &
801  return dofsColSequce;
802  }
803 
804 private:
805  // Keep vector of DoFS on entity
806  mutable boost::weak_ptr<std::vector<FENumeredDofEntity> > dofsRowSequce;
807  mutable boost::weak_ptr<std::vector<FENumeredDofEntity> > dofsColSequce;
808 };
809 
810 /** \brief interface for NumeredEntFiniteElement
811  * \ingroup fe_multi_indices
812  */
813 template <typename T>
815  : public interface_EntFiniteElement<T> {
816 
817  interface_NumeredEntFiniteElement(const boost::shared_ptr<T> &sptr)
818  : interface_EntFiniteElement<T>(sptr){};
819 
820  /**
821  * \brief Get partition number
822  * @return Partition number
823  */
824  inline unsigned int getPart() const { return this->sPtr->getPart(); }
825 
826  /** \brief get FE dof on row
827  * \ingroup mofem_dofs
828  */
830  return this->sPtr->getRowsDofs();
831  };
832 
833  /** \brief get FE dof on column
834  * \ingroup mofem_dofs
835  */
837  return this->sPtr->getColsDofs();
838  };
839 };
840 
841 /**
842  * @relates multi_index_container
843  * \brief MultiIndex container for EntFiniteElement
844  * \ingroup fe_multi_indices
845  *
846  */
847 typedef multi_index_container<
848  boost::shared_ptr<EntFiniteElement>,
849  indexed_by<
850  ordered_unique<
851  tag<Unique_mi_tag>,
852  member<EntFiniteElement, UId, &EntFiniteElement::globalUid> >,
853  ordered_non_unique<tag<Ent_mi_tag>,
854  const_mem_fun<EntFiniteElement, EntityHandle,
856  ordered_non_unique<
857  tag<FiniteElement_name_mi_tag>,
859  boost::string_ref, &EntFiniteElement::getNameRef> >,
860  ordered_non_unique<
861  tag<BitFEId_mi_tag>,
864  LtBit<BitFEId> >,
865  ordered_non_unique<
866  tag<EntType_mi_tag>,
868  EntityType, &EntFiniteElement::getEntType> >,
869  ordered_non_unique<
870  tag<Composite_Name_And_Ent_mi_tag>,
871  composite_key<
872  EntFiniteElement,
874  boost::string_ref, &EntFiniteElement::getNameRef>,
875  const_mem_fun<EntFiniteElement, EntityHandle,
876  &EntFiniteElement::getEnt> > > > >
878 
879 /**
880  * \brief Entity finite element multi-index by finite element name
881  *
882  * \ingroup fe_multi_indices
883  */
884 typedef EntFiniteElement_multiIndex::index<FiniteElement_name_mi_tag>::type
886 
887 /**
888  @relates multi_index_container
889  \brief MultiIndex for entities for NumeredEntFiniteElement
890  \ingroup fe_multi_indices
891  */
892 typedef multi_index_container<
893  boost::shared_ptr<NumeredEntFiniteElement>,
894  indexed_by<
895  ordered_unique<
896  tag<Unique_mi_tag>,
897  const_mem_fun<
900  ordered_non_unique<tag<Part_mi_tag>,
901  member<NumeredEntFiniteElement, unsigned int,
903  ordered_non_unique<
904  tag<FiniteElement_name_mi_tag>,
906  boost::string_ref,
908  ordered_non_unique<
909  tag<Ent_mi_tag>,
910  const_mem_fun<
913  ordered_non_unique<
914  tag<Composite_Name_And_Ent_mi_tag>,
915  composite_key<
917  const_mem_fun<
919  boost::string_ref, &NumeredEntFiniteElement::getNameRef>,
920  const_mem_fun<
923  ordered_non_unique<
924  tag<Composite_Name_And_Part_mi_tag>,
925  composite_key<
927  const_mem_fun<
929  boost::string_ref, &NumeredEntFiniteElement::getNameRef>,
930  member<NumeredEntFiniteElement, unsigned int,
933 
934 /**
935  * \brief Entity finite element multi-index by finite element name
936  *
937  * \ingroup fe_multi_indices
938  */
939 typedef NumeredEntFiniteElement_multiIndex::index<
941 
942 /**
943  * \brief Entity finite element multi-index by finite element name and
944  * partition
945  *
946  * \ingroup fe_multi_indices
947  */
948 typedef NumeredEntFiniteElement_multiIndex::index<
950 
951 /**
952  @relates multi_index_container
953  \brief MultiIndex for entities for FiniteElement
954  \ingroup fe_multi_indices
955  */
956 typedef multi_index_container<
957  boost::shared_ptr<FiniteElement>,
958  indexed_by<hashed_unique<tag<FiniteElement_Meshset_mi_tag>,
959  member<FiniteElement, EntityHandle,
961  hashed_unique<
962  tag<BitFEId_mi_tag>,
963  const_mem_fun<FiniteElement, BitFEId, &FiniteElement::getId>,
965  ordered_unique<tag<FiniteElement_name_mi_tag>,
966  const_mem_fun<FiniteElement, boost::string_ref,
969 
970 // modificators
971 
972 /**
973  * \brief Change finite element part
974  *
975  * \ingroup fe_multi_indices
976  */
978  unsigned int pArt;
979  NumeredEntFiniteElement_change_part(unsigned int part) : pArt(part){};
980  void operator()(boost::shared_ptr<NumeredEntFiniteElement> &fe) {
981  fe->part = pArt;
982  }
984 };
985 
986 /**
987  * \brief Add field to column
988  *
989  * \ingroup fe_multi_indices
990  */
994  : fIdCol(f_id_col){};
995  void operator()(boost::shared_ptr<FiniteElement> &fe);
996 };
997 
998 /**
999  * \brief Add field to row
1000  *
1001  * \ingroup fe_multi_indices
1002  */
1006  : fIdRow(f_id_row){};
1007  void operator()(boost::shared_ptr<FiniteElement> &fe);
1008 };
1009 
1010 /**
1011  * \brief Add field to data
1012  *
1013  * \ingroup fe_multi_indices
1014  */
1018  : fIdData(f_id_data){};
1019  void operator()(boost::shared_ptr<FiniteElement> &fe);
1020 };
1021 
1022 /**
1023  * \brief Unset field from column
1024  *
1025  * \ingroup fe_multi_indices
1026  */
1030  : fIdCol(f_id_col){};
1031  void operator()(boost::shared_ptr<FiniteElement> &fe);
1032 };
1033 
1034 /**
1035  * \brief Unset field from row
1036  *
1037  * \ingroup fe_multi_indices
1038  */
1042  : fIdRow(f_id_row){};
1043  void operator()(boost::shared_ptr<FiniteElement> &fe);
1044 };
1045 
1046 /**
1047  * \brief Unset field from data
1048  *
1049  * \ingroup fe_multi_indices
1050  */
1054  : fIdData(f_id_data){};
1055  void operator()(boost::shared_ptr<FiniteElement> &fe);
1056 };
1057 
1058 } // namespace MoFEM
1059 
1060 /**
1061  * Loop over DOFs in row on element
1062  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1063  * @param IT iterator
1064  * @return user return in for(_IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR,IT))
1065  * \ingroup fe_multi_indices
1066  */
1067 #define _IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR, IT) \
1068  FENumeredDofEntity_multiIndex::iterator IT = FEPTR->rows_dofs->begin(); \
1069  IT != FEPTR->rows_dofs->end(); \
1070  IT++
1071 
1072 /// \deprecated use _IT_FENUMEREDDOF_ROW_FOR_LOOP_
1073 #define _IT_FENUMEREDDOFMOFEMENTITY_ROW_FOR_LOOP_(FEPTR, IT) \
1074  _IT_FENUMEREDDOF_ROW_FOR_LOOP_(FEPTR, IT)
1075 
1076 /**
1077  * Loop over DOFs in col on element
1078  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1079  * @param IT iterator
1080  * @return user return in for(_IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR,IT))
1081  * \ingroup fe_multi_indices
1082  */
1083 #define _IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR, IT) \
1084  FENumeredDofEntity_multiIndex::iterator IT = FEPTR->cols_dofs->begin(); \
1085  IT != FEPTR->cols_dofs->end(); \
1086  IT++
1087 
1088 /// \deprecated use _IT_FENUMEREDDOF_COL_FOR_LOOP_ instead
1089 #define _IT_FENUMEREDDOFMOFEMENTITY_COL_FOR_LOOP_(FEPTR, IT) \
1090  _IT_FENUMEREDDOF_COL_FOR_LOOP_(FEPTR, IT)
1091 
1092 /**
1093  * Loop over DOFs in row on element for particular filed
1094  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1095  * @param NAME name of filed
1096  * @param IT iterator
1097  * @return user return in
1098  * for(_IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR,NAME,IT)) \ingroup
1099  * fe_multi_indices
1100  */
1101 #define _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT) \
1102  FENumeredDofEntityByFieldName::iterator IT = \
1103  FEPTR->rows_dofs->get<FieldName_mi_tag>().lower_bound(NAME); \
1104  IT != FEPTR->rows_dofs->get<FieldName_mi_tag>().upper_bound(NAME); \
1105  IT++
1106 
1107 /// \deprecated use _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_ instead
1108 #define _IT_FENUMEREDDOFMOFEMENTITY_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT) \
1109  _IT_FENUMEREDDOF_BY_NAME_ROW_FOR_LOOP_(FEPTR, NAME, IT)
1110 
1111 /**
1112  * Loop over DOFs in col on element for particular filed
1113  * @param FEPTR pointer to element structure \ref NumeredEntFiniteElement
1114  * @param NAME name of filed
1115  * @param IT iterator
1116  * @return user return in
1117  * for(_IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR,NAME,IT)) \ingroup
1118  * fe_multi_indices
1119  */
1120 #define _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT) \
1121  FENumeredDofEntityByFieldName::iterator IT = \
1122  FEPTR->cols_dofs->get<FieldName_mi_tag>().lower_bound(NAME); \
1123  IT != FEPTR->cols_dofs->get<FieldName_mi_tag>().upper_bound(NAME); \
1124  IT++
1125 
1126 /// \deprecated use _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_ instead
1127 #define _IT_FENUMEREDDOFMOFEMENTITY_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT) \
1128  _IT_FENUMEREDDOF_BY_NAME_COL_FOR_LOOP_(FEPTR, NAME, IT)
1129 
1130 #endif // __FEMMULTIINDICES_HPP__
1131 
1132 /***************************************************************************/ /**
1133 * \defgroup fe_multi_indices Finite elements structures and multi-indices
1134 * \ingroup mofem
1135 ******************************************************************************/
interface_FiniteElement< FiniteElement > interface_type_FiniteElement
keeps data about abstract VERTEX finite element
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, const UId, &NumeredDofEntity::getGlobalUniqueId > > > > NumeredDofEntity_multiIndex_uid_view_ordered
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.
void operator()(boost::shared_ptr< FiniteElement > &fe)
void operator()(boost::shared_ptr< FiniteElement > &fe)
RefElement_MESHSET(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
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::BaseFEDofEntity, boost::shared_ptr< SideNumber >, &FEDofEntity::sideNumberPtr > > > >, ordered_non_unique< tag< Composite_EntType_and_Space_mi_tag >, composite_key< FEDofEntity, const_mem_fun< FEDofEntity::interface_type_RefEntity, EntityType, &FEDofEntity::getEntType >, const_mem_fun< FEDofEntity::interface_type_Field, FieldSpace, &FEDofEntity::getSpace > > > > > FEDofEntity_multiIndex
MultiIndex container keeps FEDofEntity.
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
MoFEMErrorCode getDataDofView(const DofEntity_multiIndex &dofs, DofEntity_multiIndex_active_view &dofs_view, const int operation_type=moab::Interface::UNION) const
const FENumeredDofEntity_multiIndex & getRowsDofs() const
get FE dof on row
const BitRefEdges & getBitRefEdges() const
DofIdx getNbDofsRow() const
Get number of DOFs on row.
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)
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< hashed_unique< const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getDofIdx > > > > NumeredDofEntity_multiIndex_idx_view_hashed
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
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.
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)
boost::shared_ptr< DofEntity_multiIndex_uid_view > col_dof_view
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
EntityHandle getEnt() const
Get element entity.
boost::shared_ptr< DofEntity_multiIndex_uid_view > row_dof_view
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
MoFEMErrorCode getColDofView(const DofEntity_multiIndex &dofs, DofEntity_multiIndex_active_view &dofs_view, const int operation_type=moab::Interface::UNION) 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
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getGlobalUniqueId > > > > DofEntity_multiIndex_uid_view
multi-index view on DofEntity by uid
DofIdx getNbDofsRow() const
Get number of DOFs on row.
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
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< DofEntity, UId, &DofEntity::getGlobalUniqueId > >, ordered_non_unique< tag< Composite_Ent_and_ShortId_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt >, const_mem_fun< DofEntity, ShortId, &DofEntity::getNonNonuniqueShortId > > >, ordered_non_unique< tag< Composite_Name_And_Ent_And_EntDofIdx_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt >, const_mem_fun< DofEntity, DofIdx, &DofEntity::getEntDofIdx > > >, ordered_non_unique< tag< Unique_Ent_mi_tag >, const_mem_fun< DofEntity, UId, &DofEntity::getEntGlobalUniqueId > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt > > >, ordered_non_unique< tag< Composite_Name_And_Type_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef >, const_mem_fun< DofEntity::interface_type_RefEntity, EntityType, &DofEntity::getEntType > > >, ordered_non_unique< tag< Composite_Name_Ent_Order_And_CoeffIdx_mi_tag >, composite_key< DofEntity, const_mem_fun< DofEntity::interface_type_Field, boost::string_ref, &DofEntity::getNameRef >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt >, const_mem_fun< DofEntity, ApproximationOrder, &DofEntity::getDofOrder >, const_mem_fun< DofEntity, FieldCoefficientsNumber, &DofEntity::getDofCoeffIdx > > > > > DofEntity_multiIndex
MultiIndex container keeps DofEntity.
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.
unsigned int getPart() const
Get partition number.
static UId getGlobalUniqueIdCalculate(const EntityHandle ent, const int bit_number)
Generate UId for finite element entity.
EntFiniteElement(const boost::shared_ptr< RefElement > ref_finite_element, const boost::shared_ptr< FiniteElement > fe_ptr)
void operator()(boost::shared_ptr< FiniteElement > &fe)
multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, const UId, &NumeredDofEntity::getGlobalUniqueId > >, ordered_non_unique< tag< Composite_Name_And_Ent_And_EntDofIdx_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref, &NumeredDofEntity::getNameRef >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle, &NumeredDofEntity::getEnt >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, DofIdx, &NumeredDofEntity::getEntDofIdx > > >, ordered_non_unique< tag< Idx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::dofIdx > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref, &NumeredDofEntity::getNameRef > >, ordered_non_unique< tag< PetscGlobalIdx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::petscGloablDofIdx > >, ordered_non_unique< tag< PetscLocalIdx_mi_tag >, member< NumeredDofEntity, DofIdx, &NumeredDofEntity::petscLocalDofIdx > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle, &NumeredDofEntity::getEnt > >, ordered_non_unique< tag< Order_mi_tag >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, ApproximationOrder, &NumeredDofEntity::getDofOrder > >, ordered_non_unique< tag< Composite_Part_And_Order_mi_tag >, composite_key< NumeredDofEntity, member< NumeredDofEntity, unsigned int, &NumeredDofEntity::pArt >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, ApproximationOrder, &NumeredDofEntity::getDofOrder > > >, ordered_non_unique< tag< Composite_Name_And_Part_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref, &NumeredDofEntity::getNameRef >, member< NumeredDofEntity, unsigned int, &NumeredDofEntity::pArt > > >, ordered_non_unique< tag< Composite_Name_Ent_And_Part_mi_tag >, composite_key< NumeredDofEntity, const_mem_fun< NumeredDofEntity::interface_type_Field, boost::string_ref, &NumeredDofEntity::getNameRef >, const_mem_fun< NumeredDofEntity::interface_type_DofEntity, EntityHandle, &NumeredDofEntity::getEnt >, member< NumeredDofEntity, unsigned int, &NumeredDofEntity::pArt > > > > > NumeredDofEntity_multiIndex
MultiIndex container keeps NumeredDofEntity.
DofIdx getNbDofsCol() const
Get number of DOFs on col.
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)
user adjacency function table
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.
EntityHandle getMeshset() const
Get meshset containing element entities.
FiniteElement_row_change_bit_off(const BitFieldId f_id_row)
DofIdx getNbDofsCol() const
Get number of DOFs on col.
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)
MoFEMErrorCode getRowDofView(const DofEntity_multiIndex &dofs, DofEntity_multiIndex_active_view &dofs_view, const int operation_type=moab::Interface::UNION) const
boost::shared_ptr< EntFiniteElement > & getEntFiniteElement() const
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.
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::BaseFEDofEntity, 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.
const boost::shared_ptr< SideNumber > & getSideNumberPtr(const EntityHandle ent) const
#define NOT_USED(x)
Definition: definitions.h:299
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)
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.
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
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getGlobalUniqueId > >, ordered_non_unique< const_mem_fun< DofEntity, char, &DofEntity::getActive > > > > DofEntity_multiIndex_active_view
multi-index view on DofEntity activity
interface_RefEntity< RefElement > interface_type_RefEntity
BitFieldId getBitFieldIdCol() const
Get field ids on columns.
const boost::shared_ptr< T > & getRefElement() const