v0.10.0
FieldMultiIndices.hpp
Go to the documentation of this file.
1 /** \file FieldMultiIndices.hpp
2  * \brief Field data structure storing information about space, approximation
3  * base, coordinate systems, etc.
4  *
5  * Also, it stores data needed for book keeping, like tags to data on the
6  * mesh.
7  *
8  * Each filed has unique ID and name. This data structure is shared between
9  * entities on which is spanning and DOFs on those entities.
10  */
11 
12 /*
13  * MoFEM is free software: you can redistribute it and/or modify it under
14  * the terms of the GNU Lesser General Public License as published by the
15  * Free Software Foundation, either version 3 of the License, or (at your
16  * option) any later version.
17  *
18  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
19  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
21  * License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
25  */
26 
27 #ifndef __FIELDMULTIINDICES_HPP__
28 #define __FIELDMULTIINDICES_HPP__
29 
30 namespace MoFEM {
31 
32 template <typename T> struct interface_RefEntity;
33 struct DofEntity;
34 
35 /** \brief user adjacency function
36  * \ingroup fe_multi_indices
37  */
38 typedef boost::function<int(const int order)> FieldOrderFunct;
39 
40 /** \brief user adjacency function table
41  * \ingroup dof_multi_indices
42  */
43 typedef FieldOrderFunct FieldOrderTable[MBMAXTYPE];
44 
45 /**
46  * \brief Provide data structure for (tensor) field approximation.
47  * \ingroup dof_multi_indices
48  *
49  * The Field is intended to provide support for fields, with a strong bias
50  * towards supporting first and best the capabilities required for scientific
51  * computing applications. Since we work with discrete spaces, data structure
52  * has to carry information about type of approximation space, its regularity.
53  *
54  *
55  * Field data structure storing information about space, approximation base,
56  * coordinate systems, etc. It stores additional data needed for book keeping,
57  * like tags to data on the mesh.
58  *
59  * Each filed has unique ID and name. This
60  * data structure is shared between entities on which is spanning and DOFs on
61  * those entities.
62  *
63  */
64 struct Field {
65 
66  /**
67  * \brief constructor for moab field
68  *
69  * \param meshset which keeps entities for this field
70  */
71  Field(const moab::Interface &moab, const EntityHandle meshset,
72  const boost::shared_ptr<CoordSys> coord_sys_ptr);
73 
74  virtual ~Field() = default;
75 
76  using SequenceDofContainer = multi_index_container<
77 
78  boost::weak_ptr<std::vector<DofEntity>>,
79 
80  indexed_by<sequenced<>>>;
81 
82  typedef std::array<std::array<int, MAX_DOFS_ON_ENTITY>, MBMAXTYPE>
84 
86 
87  EntityHandle meshSet; ///< keeps entities for this meshset
88  boost::shared_ptr<CoordSys>
89  coordSysPtr; ///< Pointer to field coordinate system data structure
90 
91  TagType th_FieldDataVertsType; // Tag type for storing data on vertices
92  Tag th_FieldDataVerts; ///< Tag storing field values on vertices in the field
93  Tag th_FieldData; ///< Tag storing field values on entity in the field
94  Tag th_AppOrder; ///< Tag storing approximation order on entity
95 
96  BitFieldId *tagId; ///< tag keeps field id
97  FieldSpace *tagSpaceData; ///< tag keeps field space
98  FieldApproximationBase *tagBaseData; ///< tag keeps field base
99 
100  /// tag keeps field rank (dimension, f.e. Temperature field has rank 1,
101  /// displacements field in 3d has rank 3)
103  const void *tagName; ///< tag keeps name of the field
104  int tagNameSize; ///< number of bits necessary to keep field name
105  const void *tagNamePrefixData; ///< tag keeps name prefix of the field
106  int tagNamePrefixSize; ///< number of bits necessary to keep field name
107  ///< prefix
108  FieldOrderTable forderTable; ///< nb. DOFs table for entities
109 
110  /**
111  * @brief Get the Field Order Table
112  *
113  * @return FieldOrderTable&
114  */
116 
117  /**
118  * Field Id is bit set. Each field has only one bit on, bitNumber stores
119  * number of set bit
120  */
121  unsigned int bitNumber;
122 
123  static UId generateGlobalUniqueIdForTypeLo(const char bit_number,
124  const EntityType type,
125  const int owner_proc) {
126  constexpr int ent_shift = 8 * sizeof(EntityHandle);
127  return (static_cast<UId>(type) << MB_ID_WIDTH |
128  static_cast<UId>(bit_number) << 8 * sizeof(EntityHandle) |
129  static_cast<UId>(owner_proc) << 5 + ent_shift)
130  << 9;
131  }
132 
134  const int owner_proc) const {
135  return generateGlobalUniqueIdForTypeLo(bitNumber, type, owner_proc);
136  }
137 
138  static UId generateGlobalUniqueIdForTypeHi(const char bit_number,
139  const EntityType type,
140  const int owner_proc) {
141  constexpr int ent_shift = 8 * sizeof(EntityHandle);
142  return (static_cast<UId>(type) << MB_ID_WIDTH |
143  static_cast<UId>(bit_number) << ent_shift |
144  static_cast<UId>(owner_proc) << 5 + ent_shift)
145  << 9;
146  }
147 
149  const int owner_proc) const {
150  return generateGlobalUniqueIdForTypeHi(bitNumber, type, owner_proc);
151  }
152 
153  /**
154  * \brief Get field meshset
155  *
156 
157  * To meshsets entity are attached Tags which keeps basic information about
158  * field. Those information is field name, approximation base, approximation
159  * space, id, etc.
160 
161  * In meshset contains entities on which given filed is sparing. Type of
162  entities
163  * depended on approximations space.
164 
165  * @return EntityHandle
166  */
167  inline EntityHandle getMeshset() const { return meshSet; }
168 
169  /**
170  * \brief Get dimension of general two-point tensor \ref
171  MoFEM::CoordSys::getDim
172 
173  See details here \ref MoFEM::CoordSys::getDim
174 
175  */
176  inline int getCoordSysDim(const int d = 0) const {
177  return coordSysPtr->getDim(d);
178  }
179 
180  /**
181  * \brief Get reference base vectors
182  * @param Array where coefficients (covariant) are returned
183  * @return Error code
184  */
185  inline MoFEMErrorCode get_E_Base(const double m[]) const {
187  MoFEMFunctionReturnHot(coordSysPtr->get_E_Base(m));
188  }
189 
190  /**
191  * \brief Get reference dual base vectors
192  * @param Array where coefficients (contravariant) are returned
193  * @return Error code
194  */
195  inline MoFEMErrorCode get_E_DualBase(const double m[]) const {
197  MoFEMFunctionReturnHot(coordSysPtr->get_E_DualBase(m));
198  }
199 
200  /**
201  * \brief Get current dual base vectors
202  * @param Array where coefficients (covariant) are returned
203  * @return Error code
204  */
205  inline MoFEMErrorCode get_e_Base(const double m[]) const {
207  MoFEMFunctionReturnHot(coordSysPtr->get_e_Base(m));
208  }
209 
210  /**
211  * \brief Get current dual base vectors
212  * @param Array where coefficients (covariant) are returned
213  * @return Error code
214  */
215  inline MoFEMErrorCode get_e_DualBase(const double m[]) const {
217  MoFEMFunctionReturnHot(coordSysPtr->get_e_DualBase(m));
218  }
219 
220  /**
221  * \brief Returns meshset on which Tags defining coordinate system are stored
222  * @return Coordinate system EntityHandle
223  */
224  inline EntityHandle getCoordSysMeshSet() const {
225  return coordSysPtr->getMeshset();
226  }
227 
228  /**
229  * \brief Get coordinate system name
230  * @return Coordinate system name
231  */
232  inline std::string getCoordSysName() const { return coordSysPtr->getName(); }
233 
234  /**
235  * \brief Get coordinate system name
236  * @return Return string_ref with name.
237  */
238  inline boost::string_ref getCoordSysNameRef() const {
239  return coordSysPtr->getNameRef();
240  }
241 
242  /**
243  * \brief Get unique field id.
244  * @return Filed ID
245  */
246  inline const BitFieldId &getId() const { return *((BitFieldId *)tagId); }
247 
248  /**
249  * \brief Get string reference to field name
250  * @return Field name
251  */
252  inline boost::string_ref getNameRef() const {
253  return boost::string_ref((char *)tagName, tagNameSize);
254  }
255 
256  /**
257  * \brief Get field name
258  * @return Field name
259  */
260  inline std::string getName() const {
261  return std::string((char *)tagName, tagNameSize);
262  }
263 
264  /**
265  * \brief Get field approximation space
266  * @return approximation space
267  */
268  inline FieldSpace getSpace() const { return *tagSpaceData; }
269 
270  /**
271  * \brief Get approximation base
272  * @return Approximation base
273  */
275 
276  /** \brief Get number of field coefficients
277  *
278 
279  * Scalar field has only one coefficient, vector field in 3D has three. In
280  * general number determine space needed to keep data on entities. What
281  coefficient
282  * means depend on interpretation and associated coordinate system. For
283  example
284  * 3 coefficient means could be covariant or contravariant, or mean three
285  temperatures
286  * for mixture of solid, air and water, etc.
287 
288 
289  */
291  return *tagNbCoeffData;
292  };
293 
294  /**
295  * \brief Get number of set bit in Field ID.
296  * Each field has uid, get getBitNumber get number of bit set for given field.
297  * Field ID has only one bit set for each field.
298  */
299  inline FieldBitNumber getBitNumber() const { return bitNumber; }
300 
301  /**
302  * \brief Calculate number of set bit in Field ID.
303  * Each field has uid, get getBitNumber get number of bit set for given field.
304  * Field ID has only one bit set for each field.
305  */
307  static_assert(BITFIELDID_SIZE >= 32,
308  "Too many fields allowed, can be more but ...");
309  FieldBitNumber b = ffsl(id.to_ulong());
310  if (b != 0)
311  return b;
312  return 0;
313  }
314 
315  /**
316  * \brief Calculate number of set bit in Field ID.
317  * Each field has uid, get getBitNumber get number of bit set for given field.
318  * Field ID has only one bit set for each field.
319  */
321  return getBitNumberCalculate(static_cast<BitFieldId &>(*tagId));
322  }
323 
324  /**
325  * \brief Get reference to sequence data container
326  *
327  * In sequence data container data are physically stored. The purpose of this
328  * is to allocate DofEntity data in bulk, having only one allocation instead
329  * each time entity is inserted. That makes code efficient.
330  *
331  * The vector in sequence is destroyed if last entity inside that vector is
332  * destroyed. All MoFEM::MoFEMEntities have aliased shared_ptr which points to
333  the vector.
334 
335  * Not all DOFs are starred in this way, currently such cases are considered;
336  * - DOFs on vertices. That is exploited that for H1 space, there is some
337  * fixed number of DOFs on each vertex
338 
339  * For other cases, DOFs are stored locally in each MoFEM::MoFEMEntities.
340 
341  * @return MoFEM::Field::SequenceDofContainer
342  */
344  return sequenceDofContainer;
345  }
346 
347  /**
348  * \brief get hash-map relating dof index on entity with its order
349  *
350  * Dofs of given field are indexed on entity
351  * of the same type, same space, approximation base and number of
352  * coefficients, are sorted in the way.
353  *
354  */
355  inline std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
356  getDofOrderMap(const EntityType type) const {
357  return dofOrderMap[type];
358  }
359 
360  /**
361  * \brief get hash-map relating dof index on entity with its order
362  *
363  * Dofs of given field are indexed on entity
364  * of the same type, same space, approximation base and number of
365  * coefficients, are sorted in the way.
366  *
367  */
368  inline DofsOrderMap &getDofOrderMap() const {
369  return const_cast<DofsOrderMap &>(dofOrderMap);
370  }
371 
373 
374  friend std::ostream &operator<<(std::ostream &os, const Field &e);
375 
376  inline const Field *getFieldRawPtr() const { return this; };
377 
378 private:
381 };
382 
383 /**
384  * \brief Pointer interface for MoFEM::Field
385  *
386  * MoFEM::Field class is keeps data and methods. This class is interface to
387  * that class, and all other classes, like MoFEMEntities, DofEntity and
388  * derived form them inherits pointer interface, not MoFEM::Field class
389  * directly.
390  *
391  * \ingroup dof_multi_indices
392  */
393 template <typename FIELD, typename REFENT>
394 struct interface_FieldImpl : public interface_RefEntity<REFENT> {
395 
397 
398  interface_FieldImpl(const boost::shared_ptr<FIELD> &field_ptr,
399  const boost::shared_ptr<REFENT> &ref_ents_ptr)
400  : interface_RefEntity<REFENT>(ref_ents_ptr) {}
401  virtual ~interface_FieldImpl() = default;
402 };
403 
404 template <typename FIELD, typename REFENT>
405 struct interface_Field : public interface_FieldImpl<FIELD, REFENT> {
406 
407  interface_Field(const boost::shared_ptr<FIELD> &field_ptr,
408  const boost::shared_ptr<REFENT> &ref_ents_ptr)
409  : interface_FieldImpl<FIELD, REFENT>(field_ptr, ref_ents_ptr),
410  sFieldPtr(field_ptr) {}
411 
412  inline EntityHandle getMeshset() const {
413  return getFieldRawPtr()->getMeshset();
414  }
415 
416  inline int getCoordSysDim(const int d = 0) const {
417  return getFieldRawPtr()->getCoordSysDim(d);
418  }
419 
420  inline MoFEMErrorCode get_E_Base(const double m[]) const {
423  }
424  inline MoFEMErrorCode get_E_DualBase(const double m[]) const {
427  }
428  inline MoFEMErrorCode get_e_Base(const double m[]) const {
431  }
432 
433  inline MoFEMErrorCode get_e_DualBase(const double m[]) const {
436  }
437 
438  /// @return return meshset for coordinate system
439  inline EntityHandle getCoordSysMeshSet() const {
441  }
442 
443  /// @return return coordinate system name for field
444  inline std::string getCoordSysName() const {
445  return getFieldRawPtr()->getCoordSysName();
446  }
447 
448  /// @return return coordinate system name for field
449  inline boost::string_ref getCoordSysNameRef() const {
451  }
452 
453  /// @return get field Id
454  inline const BitFieldId &getId() const {
455  return getFieldRawPtr()->getId();
456  }
457 
458  /// @return get field name
459  inline boost::string_ref getNameRef() const {
460  return getFieldRawPtr()->getNameRef();
461  }
462 
463  /// @return get field name
464  inline std::string getName() const {
465  return getFieldRawPtr()->getName();
466  }
467 
468  /// @return get approximation space
469  inline FieldSpace getSpace() const {
470  return getFieldRawPtr()->getSpace();
471  }
472 
473  /// @return get approximation base
475  return getFieldRawPtr()->getApproxBase();
476  }
477 
478  /// @return get number of coefficients for DOF
480  return getFieldRawPtr()->getNbOfCoeffs();
481  }
482 
483  /// @return get bit number if filed Id
484  inline FieldBitNumber getBitNumber() const {
485  return getFieldRawPtr()->getBitNumber();
486  }
487 
488  /**
489  * \brief get hash-map relating dof index on entity with its order
490  *
491  * Dofs of given field are indexed on entity
492  * of the same type, same space, approximation base and number of
493  * coefficients, are sorted in the way.
494  *
495  */
496  inline std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
497  getDofOrderMap(const EntityType type) const {
499  }
500 
501  inline const Field *getFieldRawPtr() const {
502  return sFieldPtr->getFieldRawPtr();
503  };
504 
505 private:
506  mutable boost::shared_ptr<FIELD> sFieldPtr;
507 };
508 
509 template <typename T>
510 struct interface_Field<T, T> : public interface_FieldImpl<T, T> {
511  interface_Field(const boost::shared_ptr<T> &ptr)
512  : interface_FieldImpl<T, T>(ptr, ptr) {}
513 
515 
516  inline EntityHandle getMeshset() const {
517  return getFieldRawPtr()->getMeshset();
518  }
519 
520  inline int getCoordSysDim(const int d = 0) const {
521  return getFieldRawPtr()->getCoordSysDim(d);
522  }
523 
524  inline MoFEMErrorCode get_E_Base(const double m[]) const {
527  }
528  inline MoFEMErrorCode get_E_DualBase(const double m[]) const {
531  }
532  inline MoFEMErrorCode get_e_Base(const double m[]) const {
535  }
536 
537  inline MoFEMErrorCode get_e_DualBase(const double m[]) const {
540  }
541 
542  /// @return return meshset for coordinate system
543  inline EntityHandle getCoordSysMeshSet() const {
545  }
546 
547  /// @return return coordinate system name for field
548  inline std::string getCoordSysName() const {
549  return getFieldRawPtr()->getCoordSysName();
550  }
551 
552  /// @return return coordinate system name for field
553  inline boost::string_ref getCoordSysNameRef() const {
555  }
556 
557  /// @return get field Id
558  inline const BitFieldId &getId() const {
559  return getFieldRawPtr()->getId();
560  }
561 
562  /// @return get field name
563  inline boost::string_ref getNameRef() const {
564  return getFieldRawPtr()->getNameRef();
565  }
566 
567  /// @return get field name
568  inline std::string getName() const {
569  return getFieldRawPtr()->getName();
570  }
571 
572  /// @return get approximation space
573  inline FieldSpace getSpace() const {
574  return getFieldRawPtr()->getSpace();
575  }
576 
577  /// @return get approximation base
579  return getFieldRawPtr()->getApproxBase();
580  }
581 
582  /// @return get number of coefficients for DOF
584  return getFieldRawPtr()->getNbOfCoeffs();
585  }
586 
587  /// @return get bit number if filed Id
588  inline FieldBitNumber getBitNumber() const {
589  return getFieldRawPtr()->getBitNumber();
590  }
591 
592  /**
593  * \brief get hash-map relating dof index on entity with its order
594  *
595  * Dofs of given field are indexed on entity
596  * of the same type, same space, approximation base and number of
597  * coefficients, are sorted in the way.
598  *
599  */
600  inline std::array<ApproximationOrder, MAX_DOFS_ON_ENTITY> &
601  getDofOrderMap(const EntityType type) const {
603  }
604 
605  inline const Field *getFieldRawPtr() const {
606  return boost::static_pointer_cast<T>(this->getRefEntityPtr())
607  ->getFieldRawPtr();
608  };
609 };
610 
611 /**
612  * @relates multi_index_container
613  * \brief Field_multiIndex for Field
614  *
615  */
616 typedef multi_index_container<
617  boost::shared_ptr<Field>,
618  indexed_by<
619  hashed_unique<tag<BitFieldId_mi_tag>,
620  const_mem_fun<Field, const BitFieldId &, &Field::getId>,
621  HashBit<BitFieldId>, EqBit<BitFieldId>>,
622  ordered_unique<tag<Meshset_mi_tag>,
623  member<Field, EntityHandle, &Field::meshSet>>,
624  ordered_unique<
625  tag<FieldName_mi_tag>,
626  const_mem_fun<Field, boost::string_ref, &Field::getNameRef>>,
627  ordered_non_unique<tag<BitFieldId_space_mi_tag>,
628  const_mem_fun<Field, FieldSpace, &Field::getSpace>>>>
630 
631 typedef multi_index_container<
632  boost::shared_ptr<Field>,
633  indexed_by<
634  ordered_unique<tag<BitFieldId_mi_tag>,
635  const_mem_fun<Field, const BitFieldId &, &Field::getId>,
636  LtBit<BitFieldId>>>>
638 
639 /** \brief Set field coordinate system
640  * \ingroup ent_multi_indices
641  */
643  boost::shared_ptr<CoordSys> csPtr;
644  FieldChangeCoordinateSystem(const boost::shared_ptr<CoordSys> &cs_ptr)
645  : csPtr(cs_ptr) {}
646  void operator()(boost::shared_ptr<Field> &e) { e->coordSysPtr = csPtr; }
647 };
648 
649 } // namespace MoFEM
650 
651 #endif // __FIELDMULTIINDICES_HPP__
static Index< 'm', 3 > m
multi_index_container< boost::shared_ptr< Field >, indexed_by< hashed_unique< tag< BitFieldId_mi_tag >, const_mem_fun< Field, const BitFieldId &, &Field::getId >, HashBit< BitFieldId >, EqBit< BitFieldId > >, ordered_unique< tag< Meshset_mi_tag >, member< Field, EntityHandle, &Field::meshSet > >, ordered_unique< tag< FieldName_mi_tag >, const_mem_fun< Field, boost::string_ref, &Field::getNameRef > >, ordered_non_unique< tag< BitFieldId_space_mi_tag >, const_mem_fun< Field, FieldSpace, &Field::getSpace > > > > Field_multiIndex
Field_multiIndex for Field.
FieldApproximationBase
approximation base
Definition: definitions.h:150
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:516
FieldSpace
approximation spaces
Definition: definitions.h:174
#define MB_ID_WIDTH
Definition: definitions.h:296
#define BITFIELDID_SIZE
max number of fields
Definition: definitions.h:287
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:509
FieldOrderFunct FieldOrderTable[MBMAXTYPE]
user adjacency function table
boost::function< int(const int order)> FieldOrderFunct
user adjacency function
const double T
const Tensor1_Expr< const dTensor0< T, Dim, i >, typename promote< T, double >::V, Dim, i > d(const Tensor0< T * > &a, const Index< i, Dim > index, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: dTensor0.hpp:27
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:67
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:53
uint128_t UId
Unique Id.
Definition: Types.hpp:42
int FieldCoefficientsNumber
Number of field coefficients.
Definition: Types.hpp:38
char FieldBitNumber
Field bit number.
Definition: Types.hpp:39
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
multi_index_container< boost::shared_ptr< Field >, indexed_by< ordered_unique< tag< BitFieldId_mi_tag >, const_mem_fun< Field, const BitFieldId &, &Field::getId >, LtBit< BitFieldId > > > > Field_multiIndex_view
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1943
Set field coordinate system.
boost::shared_ptr< CoordSys > csPtr
void operator()(boost::shared_ptr< Field > &e)
FieldChangeCoordinateSystem(const boost::shared_ptr< CoordSys > &cs_ptr)
Provide data structure for (tensor) field approximation.
FieldCoefficientsNumber getNbOfCoeffs() const
Get number of field coefficients.
MoFEMErrorCode get_E_DualBase(const double m[]) const
Get reference dual base vectors.
const void * tagNamePrefixData
tag keeps name prefix of the field
std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
get hash-map relating dof index on entity with its order
FieldOrderTable forderTable
nb. DOFs table for entities
DofsOrderMap & getDofOrderMap() const
get hash-map relating dof index on entity with its order
const void * tagName
tag keeps name of the field
int tagNameSize
number of bits necessary to keep field name
std::string getName() const
Get field name.
const Field * getFieldRawPtr() const
std::string getCoordSysName() const
Get coordinate system name.
DofsOrderMap dofOrderMap
static UId generateGlobalUniqueIdForTypeHi(const char bit_number, const EntityType type, const int owner_proc)
FieldApproximationBase getApproxBase() const
Get approximation base.
const BitFieldId & getId() const
Get unique field id.
unsigned int bitNumber
friend std::ostream & operator<<(std::ostream &os, const Field &e)
EntityHandle getMeshset() const
Get field meshset.
TagType th_FieldDataVertsType
EntityHandle meshSet
keeps entities for this meshset
std::array< std::array< int, MAX_DOFS_ON_ENTITY >, MBMAXTYPE > DofsOrderMap
static UId generateGlobalUniqueIdForTypeLo(const char bit_number, const EntityType type, const int owner_proc)
MoFEMErrorCode get_e_DualBase(const double m[]) const
Get current dual base vectors.
FieldSpace * tagSpaceData
tag keeps field space
MoFEMErrorCode rebuildDofsOrderMap() const
FieldBitNumber getBitNumberCalculate() const
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set f...
Field(const moab::Interface &moab, const EntityHandle meshset, const boost::shared_ptr< CoordSys > coord_sys_ptr)
constructor for moab field
UId generateGlobalUniqueIdForTypeLo(const EntityType type, const int owner_proc) const
static FieldBitNumber getBitNumberCalculate(const BitFieldId &id)
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set f...
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.
Tag th_FieldData
Tag storing field values on entity in the field.
FieldOrderTable & getFieldOrderTable()
Get the Field Order Table.
MoFEMErrorCode get_e_Base(const double m[]) const
Get current dual base vectors.
FieldCoefficientsNumber * tagNbCoeffData
BitFieldId * tagId
tag keeps field id
FieldSpace getSpace() const
Get field approximation space.
EntityHandle getCoordSysMeshSet() const
Returns meshset on which Tags defining coordinate system are stored.
Tag th_FieldDataVerts
Tag storing field values on vertices in the field.
SequenceDofContainer sequenceDofContainer
FieldApproximationBase * tagBaseData
tag keeps field base
SequenceDofContainer & getDofSequenceContainer() const
Get reference to sequence data container.
UId generateGlobalUniqueIdForTypeHi(const EntityType type, const int owner_proc) const
MoFEMErrorCode get_E_Base(const double m[]) const
Get reference base vectors.
multi_index_container< boost::weak_ptr< std::vector< DofEntity > >, indexed_by< sequenced<> >> SequenceDofContainer
boost::string_ref getCoordSysNameRef() const
Get coordinate system name.
Tag th_AppOrder
Tag storing approximation order on entity.
moab::Interface & moab
boost::string_ref getNameRef() const
Get string reference to field name.
virtual ~Field()=default
FieldBitNumber getBitNumber() const
Get number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for giv...
int getCoordSysDim(const int d=0) const
Get dimension of general two-point tensor MoFEM::CoordSys::getDim.
EntityHandle getCoordSysMeshSet() const
int getCoordSysDim(const int d=0) const
MoFEMErrorCode get_e_Base(const double m[]) const
MoFEMErrorCode get_E_Base(const double m[]) const
MoFEMErrorCode get_e_DualBase(const double m[]) const
FieldBitNumber getBitNumber() const
interface_Field(const boost::shared_ptr< T > &ptr)
std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
get hash-map relating dof index on entity with its order
FieldApproximationBase getApproxBase() const
boost::string_ref getCoordSysNameRef() const
const Field * getFieldRawPtr() const
MoFEMErrorCode get_E_DualBase(const double m[]) const
const BitFieldId & getId() const
FieldCoefficientsNumber getNbOfCoeffs() const
boost::string_ref getNameRef() const
MoFEMErrorCode get_e_DualBase(const double m[]) const
FieldBitNumber getBitNumber() const
std::array< ApproximationOrder, MAX_DOFS_ON_ENTITY > & getDofOrderMap(const EntityType type) const
get hash-map relating dof index on entity with its order
MoFEMErrorCode get_E_Base(const double m[]) const
FieldCoefficientsNumber getNbOfCoeffs() const
EntityHandle getCoordSysMeshSet() const
boost::string_ref getNameRef() const
FieldApproximationBase getApproxBase() const
std::string getName() const
const Field * getFieldRawPtr() const
EntityHandle getMeshset() const
const BitFieldId & getId() const
MoFEMErrorCode get_E_DualBase(const double m[]) const
FieldSpace getSpace() const
MoFEMErrorCode get_e_Base(const double m[]) const
interface_Field(const boost::shared_ptr< FIELD > &field_ptr, const boost::shared_ptr< REFENT > &ref_ents_ptr)
boost::shared_ptr< FIELD > sFieldPtr
std::string getCoordSysName() const
int getCoordSysDim(const int d=0) const
boost::string_ref getCoordSysNameRef() const
Pointer interface for MoFEM::Field.
interface_FieldImpl(const boost::shared_ptr< FIELD > &field_ptr, const boost::shared_ptr< REFENT > &ref_ents_ptr)
virtual ~interface_FieldImpl()=default
boost::shared_ptr< REFENT > & getRefEntityPtr() const