v0.8.16
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
MoFEM::Field Struct Reference

Provide data structure for (tensor) field approximation.The Field is intended to provide support for fields, with a strong bias towards supporting first and best the capabilities required for scientific computing applications. Since we work with discrete spaces, data structure has to carry information about type of approximation space, its regularity. More...

#include <src/multi_indices/FieldMultiIndices.hpp>

Collaboration diagram for MoFEM::Field:
[legend]

Public Types

typedef multi_index_container< boost::weak_ptr< std::vector< FieldEntity > >, indexed_by< sequenced<> > > SequenceEntContainer
 
typedef multi_index_container< boost::weak_ptr< std::vector< DofEntity > >, indexed_by< sequenced<> > > SequenceDofContainer
 

Public Member Functions

FieldOrderTablegetFieldOrderTable ()
 Get the Field Order Table. More...
 
UId generateGlobalUniqueIdForTypeLo (const EntityType type, const int owner_proc) const
 
UId generateGlobalUniqueIdForTypeHi (const EntityType type, const int owner_proc) const
 
 Field (const Interface &moab, const EntityHandle meshset, const boost::shared_ptr< CoordSys > coord_sys_ptr)
 constructor for moab field More...
 
EntityHandle getMeshset () const
 Get field meshset. More...
 
int getCoordSysDim (const int d=0) const
 Get dimension of general two-point tensor MoFEM::CoordSys::getDim. More...
 
MoFEMErrorCode get_E_Base (const double m[]) const
 Get reference base vectors. More...
 
MoFEMErrorCode get_E_DualBase (const double m[]) const
 Get reference dual base vectors. More...
 
MoFEMErrorCode get_e_Base (const double m[]) const
 Get current dual base vectors. More...
 
MoFEMErrorCode get_e_DualBase (const double m[]) const
 Get current dual base vectors. More...
 
EntityHandle getCoordSysMeshSet () const
 Returns meshset on which Tags defining coordinate system are stored. More...
 
std::string getCoordSysName () const
 Get coordinate system name. More...
 
boost::string_ref getCoordSysNameRef () const
 Get coordinate system name. More...
 
const BitFieldIdgetId () const
 Get unique field id. More...
 
boost::string_ref getNameRef () const
 Get string reference to field name. More...
 
std::string getName () const
 Get field name. More...
 
FieldSpace getSpace () const
 Get field approximation space. More...
 
FieldApproximationBase getApproxBase () const
 Get approximation base. More...
 
FieldCoefficientsNumber getNbOfCoeffs () const
 Get number of field coefficients. More...
 
unsigned int getBitNumber () const
 Get number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field. More...
 
unsigned int getBitNumberCalculate () const
 Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field. More...
 
boost::shared_ptr< SequenceEntContainer > & getEntSequenceContainer () const
 Get reference to sequence data container. More...
 
boost::shared_ptr< SequenceDofContainer > & getDofSequenceContainer () const
 Get reference to sequence data container. More...
 
std::vector< ApproximationOrder > & getDofOrderMap (const EntityType type) const
 get hash-map relating dof index on entity with its order More...
 

Static Public Member Functions

static UId generateGlobalUniqueIdForTypeLo (const char bit_number, const EntityType type, const int owner_proc)
 
static UId generateGlobalUniqueIdForTypeHi (const char bit_number, const EntityType type, const int owner_proc)
 

Public Attributes

moab::Interface & moab
 
EntityHandle meshSet
 keeps entities for this meshset More...
 
boost::shared_ptr< CoordSyscoordSysPtr
 Pointer to field coordinate system data structure. More...
 
Tag th_FieldData
 Tag storing field values on entity in the field. More...
 
Tag th_AppOrder
 Tag storing approximation order on entity. More...
 
BitFieldIdtagId
 tag keeps field id More...
 
FieldSpacetagSpaceData
 tag keeps field space More...
 
FieldApproximationBasetagBaseData
 tag keeps field base More...
 
FieldCoefficientsNumbertagNbCoeffData
 
const void * tagName
 tag keeps name of the field More...
 
int tagNameSize
 number of bits necessary to keep field name More...
 
const void * tagNamePrefixData
 tag keeps name prefix of the field More...
 
int tagNamePrefixSize
 
FieldOrderTable forderTable
 nb. DOFs table for entities More...
 
unsigned int bitNumber
 

Private Attributes

boost::shared_ptr< SequenceEntContainersequenceEntContainer
 
boost::shared_ptr< SequenceDofContainersequenceDofContainer
 
std::map< EntityType, std::vector< int > > dofOrderMap
 

Friends

std::ostream & operator<< (std::ostream &os, const Field &e)
 

Detailed Description

Provide data structure for (tensor) field approximation.

The Field is intended to provide support for fields, with a strong bias towards supporting first and best the capabilities required for scientific computing applications. Since we work with discrete spaces, data structure has to carry information about type of approximation space, its regularity.

Field data structure storing information about space, approximation base, coordinate systems, etc. It stores additional data needed for book keeping, like tags to data on the mesh.

Each filed has unique ID and name. This data structure is shared between entities on which is spanning and DOFs on those entities.

Examples:
forces_and_sources_testing_users_base.cpp.

Definition at line 64 of file FieldMultiIndices.hpp.

Member Typedef Documentation

◆ SequenceDofContainer

typedef multi_index_container<boost::weak_ptr<std::vector<DofEntity> >, indexed_by<sequenced<> > > MoFEM::Field::SequenceDofContainer

Definition at line 72 of file FieldMultiIndices.hpp.

◆ SequenceEntContainer

typedef multi_index_container<boost::weak_ptr<std::vector<FieldEntity> >, indexed_by<sequenced<> > > MoFEM::Field::SequenceEntContainer

Definition at line 68 of file FieldMultiIndices.hpp.

Constructor & Destructor Documentation

◆ Field()

MoFEM::Field::Field ( const Interface moab,
const EntityHandle  meshset,
const boost::shared_ptr< CoordSys coord_sys_ptr 
)

constructor for moab field

Parameters
meshsetwhich keeps entities for this field

Definition at line 48 of file CoreDataStructures.cpp.

50  : moab(const_cast<Interface &>(moab)), meshSet(meshset),
51  coordSysPtr(coord_sys_ptr), tagId(NULL), tagSpaceData(NULL),
52  tagNbCoeffData(NULL), tagName(NULL), tagNameSize(0),
53  sequenceEntContainer(boost::make_shared<SequenceEntContainer>()),
54  sequenceDofContainer(boost::make_shared<SequenceDofContainer>()) {
55 
56  auto get_tag_data_ptr = [&moab, meshset](const auto name, auto &tag_data) {
58  Tag th;
59  CHKERR moab.tag_get_handle(name, th);
60  CHKERR moab.tag_get_by_ptr(th, &meshset, 1, (const void **)&tag_data);
62  };
63  // id
64  ierr = get_tag_data_ptr("_FieldId", tagId);
65  CHKERRABORT(PETSC_COMM_SELF, ierr);
66  // space
67  ierr = get_tag_data_ptr("_FieldSpace", tagSpaceData);
68  CHKERRABORT(PETSC_COMM_SELF, ierr);
69  // approx. base
70  ierr = get_tag_data_ptr("_FieldBase", tagBaseData);
71  CHKERRABORT(PETSC_COMM_SELF, ierr);
72 
73  // name
74  Tag th_field_name;
75  rval = moab.tag_get_handle("_FieldName", th_field_name);
77  rval = moab.tag_get_by_ptr(th_field_name, &meshSet, 1,
78  (const void **)&tagName, &tagNameSize);
80  // name prefix
81  Tag th_field_name_data_name_prefix;
82  rval = moab.tag_get_handle("_FieldName_DataNamePrefix",
83  th_field_name_data_name_prefix);
85  rval = moab.tag_get_by_ptr(th_field_name_data_name_prefix, &meshSet, 1,
86  (const void **)&tagNamePrefixData,
89  std::string name_data_prefix((char *)tagNamePrefixData, tagNamePrefixSize);
90  // data
91  std::string tag_data_name = name_data_prefix + getName();
92  rval = moab.tag_get_handle(tag_data_name.c_str(), th_FieldData);
94  // order
95  std::string tag_approximation_order_name = "_App_Order_" + getName();
96  rval = moab.tag_get_handle(tag_approximation_order_name.c_str(), th_AppOrder);
98  // rank
99  Tag th_rank;
100  std::string Tag_rank_name = "_Field_Rank_" + getName();
101  rval = moab.tag_get_handle(Tag_rank_name.c_str(), th_rank);
102  MOAB_THROW(rval);
103  rval =
104  moab.tag_get_by_ptr(th_rank, &meshSet, 1, (const void **)&tagNbCoeffData);
105  MOAB_THROW(rval);
106 
108  for (int tt = 0; tt != MBMAXTYPE; ++tt) {
109  forderTable[tt] = NULL;
110  }
111  switch (*tagBaseData) {
114  switch (*tagSpaceData) {
115  case H1:
116  forderTable[MBVERTEX] = fNBVERTEX_H1;
117  forderTable[MBEDGE] = fNBEDGE_H1;
118  forderTable[MBTRI] = fNBFACETRI_H1;
119  forderTable[MBQUAD] = fNBFACEQUAD_H1;
120  forderTable[MBTET] = fNBVOLUMETET_H1;
121  forderTable[MBPRISM] = fNBVOLUMEPRISM_H1;
122  break;
123  case HCURL:
124  forderTable[MBVERTEX] = fNBVERTEX_HCURL;
128  break;
129  case HDIV:
130  forderTable[MBVERTEX] = fNBVERTEX_HDIV;
131  forderTable[MBEDGE] = fNBEDGE_HDIV;
134  break;
135  case L2:
136  forderTable[MBVERTEX] = fNBVERTEX_L2;
137  forderTable[MBEDGE] = fNBEDGE_L2;
138  forderTable[MBTRI] = fNBFACETRI_L2;
139  forderTable[MBTET] = fNBVOLUMETET_L2;
140  break;
141  case NOFIELD:
142  for (EntityType t = MBVERTEX; t < MBMAXTYPE; t++) {
143  // Concept of approximation order make no sense if there is no field
145  }
146  break;
147  default:
148  THROW_MESSAGE("unknown approximation space");
149  }
150  break;
152  switch (*tagSpaceData) {
153  case HCURL:
154  forderTable[MBVERTEX] = fNBVERTEX_HCURL;
158  break;
159  case HDIV:
160  forderTable[MBVERTEX] = fNBVERTEX_HDIV;
161  forderTable[MBEDGE] = fNBEDGE_HDIV;
164  break;
165  default:
166  THROW_MESSAGE("unknown approximation space or not yet implemented");
167  }
168  break;
170  THROW_MESSAGE("AINSWORTH_BERNSTEIN_BEZIER_BASE not implemented yer")
171  break;
172  case USER_BASE:
173  for (int ee = 0; ee < MBMAXTYPE; ee++) {
175  }
176  break;
177  default:
178  if (*tagSpaceData != NOFIELD) {
179  THROW_MESSAGE("unknown approximation base");
180  } else {
181  for (EntityType t = MBVERTEX; t < MBMAXTYPE; t++) {
183  }
184  }
185  }
186 }
int fNBFACETRI_AINSWORTH_HDIV(int P)
number of approx. functions for HDIV space on face
Tag th_AppOrder
Tag storing approximation order on entity.
std::string getName() const
Get field name.
const void * tagName
tag keeps name of the field
field with continuous normal traction
Definition: definitions.h:170
user implemented approximation base
Definition: definitions.h:151
int fNBVERTEX_L2(int P)
int fNBEDGE_DEMKOWICZ_HCURL(int P)
const void * tagNamePrefixData
tag keeps name prefix of the field
scalar or vector of scalars describe (no true field)
Definition: definitions.h:167
int fNBEDGE_H1(int P)
number of approx. functions for H1 space on edge
int fNBENTITY_GENERIC(int P)
int fNBFACETRI_AINSWORTH_HCURL(int P)
int fNBVOLUMEPRISM_H1(int P)
EntityHandle meshSet
keeps entities for this meshset
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
int fNBVOLUMETET_L2(int P)
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:602
int fNBFACETRI_DEMKOWICZ_HDIV(int P)
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:584
int fNBEDGE_AINSWORTH_HCURL(int P)
int fNBVOLUMETET_H1(int P)
number of approx. functions for H1 space on volume
int fNBVOLUMETET_DEMKOWICZ_HCURL(int P)
FieldOrderTable forderTable
nb. DOFs table for entities
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
FieldSpace * tagSpaceData
tag keeps field space
int fNBFACEQUAD_H1(int P)
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
int fNBVOLUMETET_DEMKOWICZ_HDIV(int P)
number of approx. functions for HDIV space on volume
FieldCoefficientsNumber * tagNbCoeffData
int fNBEDGE_L2(int P)
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:142
field with continuous tangents
Definition: definitions.h:169
boost::shared_ptr< SequenceEntContainer > sequenceEntContainer
int fNBFACETRI_DEMKOWICZ_HCURL(int P)
FieldApproximationBase * tagBaseData
tag keeps field base
#define CHKERR
Inline error check.
Definition: definitions.h:578
int fNBFACETRI_H1(int P)
number of approx. functions for H1 space on face
unsigned int getBitNumberCalculate() const
Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set f...
int fNBVERTEX_HCURL(int P)
number of approx. functions for HCURL space on vertex
int fNBVOLUMETET_AINSWORTH_HCURL(int P)
boost::shared_ptr< SequenceDofContainer > sequenceDofContainer
int tagNameSize
number of bits necessary to keep field name
int fNBVERTEX_H1(int P)
number of approx. functions for H1 space on vertex
moab::Interface & moab
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403
continuous field
Definition: definitions.h:168
int fNBFACETRI_L2(int P)
int fNBENTITYSET_NOFIELD(int P)
int fNBVERTEX_HDIV(int P)
number of approx. functions for HDIV space on vertex
unsigned int bitNumber
Tag th_FieldData
Tag storing field values on entity in the field.
int fNBVOLUMETET_AINSWORTH_HDIV(int P)
number of approx. functions for HDIV space on volume
int fNBEDGE_HDIV(int P)
number of approx. functions for HDIV space on edge
BitFieldId * tagId
tag keeps field id
field with C-1 continuity
Definition: definitions.h:171

Member Function Documentation

◆ generateGlobalUniqueIdForTypeHi() [1/2]

static UId MoFEM::Field::generateGlobalUniqueIdForTypeHi ( const char  bit_number,
const EntityType  type,
const int  owner_proc 
)
static

Definition at line 125 of file FieldMultiIndices.hpp.

127  {
128  constexpr int ent_shift = 8 * sizeof(EntityHandle);
129  return (static_cast<UId>(type) << MB_ID_WIDTH |
130  static_cast<UId>(bit_number) << ent_shift |
131  static_cast<UId>(owner_proc) << 5 + ent_shift)
132  << 9;
133  }
uint128_t UId
Unique Id.
Definition: Common.hpp:136
#define MB_ID_WIDTH
Definition: definitions.h:286

◆ generateGlobalUniqueIdForTypeHi() [2/2]

UId MoFEM::Field::generateGlobalUniqueIdForTypeHi ( const EntityType  type,
const int  owner_proc 
) const

Definition at line 135 of file FieldMultiIndices.hpp.

136  {
137  return generateGlobalUniqueIdForTypeHi(bitNumber, type, owner_proc);
138  }
static UId generateGlobalUniqueIdForTypeHi(const char bit_number, const EntityType type, const int owner_proc)
unsigned int bitNumber

◆ generateGlobalUniqueIdForTypeLo() [1/2]

static UId MoFEM::Field::generateGlobalUniqueIdForTypeLo ( const char  bit_number,
const EntityType  type,
const int  owner_proc 
)
static

Definition at line 110 of file FieldMultiIndices.hpp.

112  {
113  constexpr int ent_shift = 8 * sizeof(EntityHandle);
114  return (static_cast<UId>(type) << MB_ID_WIDTH |
115  static_cast<UId>(bit_number) << 8 * sizeof(EntityHandle) |
116  static_cast<UId>(owner_proc) << 5 + ent_shift)
117  << 9;
118  }
uint128_t UId
Unique Id.
Definition: Common.hpp:136
#define MB_ID_WIDTH
Definition: definitions.h:286

◆ generateGlobalUniqueIdForTypeLo() [2/2]

UId MoFEM::Field::generateGlobalUniqueIdForTypeLo ( const EntityType  type,
const int  owner_proc 
) const

Definition at line 120 of file FieldMultiIndices.hpp.

121  {
122  return generateGlobalUniqueIdForTypeLo(bitNumber, type, owner_proc);
123  }
static UId generateGlobalUniqueIdForTypeLo(const char bit_number, const EntityType type, const int owner_proc)
unsigned int bitNumber

◆ get_E_Base()

MoFEMErrorCode MoFEM::Field::get_E_Base ( const double  m[]) const

Get reference base vectors.

Parameters
Arraywhere coefficients (covariant) are returned
Returns
Error code

Definition at line 180 of file FieldMultiIndices.hpp.

180  {
182  MoFEMFunctionReturnHot(coordSysPtr->get_E_Base(m));
183  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.

◆ get_e_Base()

MoFEMErrorCode MoFEM::Field::get_e_Base ( const double  m[]) const

Get current dual base vectors.

Parameters
Arraywhere coefficients (covariant) are returned
Returns
Error code

Definition at line 200 of file FieldMultiIndices.hpp.

200  {
202  MoFEMFunctionReturnHot(coordSysPtr->get_e_Base(m));
203  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.

◆ get_E_DualBase()

MoFEMErrorCode MoFEM::Field::get_E_DualBase ( const double  m[]) const

Get reference dual base vectors.

Parameters
Arraywhere coefficients (contravariant) are returned
Returns
Error code

Definition at line 190 of file FieldMultiIndices.hpp.

190  {
192  MoFEMFunctionReturnHot(coordSysPtr->get_E_DualBase(m));
193  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.

◆ get_e_DualBase()

MoFEMErrorCode MoFEM::Field::get_e_DualBase ( const double  m[]) const

Get current dual base vectors.

Parameters
Arraywhere coefficients (covariant) are returned
Returns
Error code

Definition at line 210 of file FieldMultiIndices.hpp.

210  {
212  MoFEMFunctionReturnHot(coordSysPtr->get_e_DualBase(m));
213  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.

◆ getApproxBase()

FieldApproximationBase MoFEM::Field::getApproxBase ( ) const

Get approximation base.

Returns
Approximation base

Definition at line 269 of file FieldMultiIndices.hpp.

269 { return *tagBaseData; }
FieldApproximationBase * tagBaseData
tag keeps field base

◆ getBitNumber()

unsigned int MoFEM::Field::getBitNumber ( ) const

Get number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field.

Definition at line 294 of file FieldMultiIndices.hpp.

294 { return bitNumber; }
unsigned int bitNumber

◆ getBitNumberCalculate()

unsigned int MoFEM::Field::getBitNumberCalculate ( ) const

Calculate number of set bit in Field ID. Each field has uid, get getBitNumber get number of bit set for given field. Field ID has only one bit set for each field.

Definition at line 301 of file FieldMultiIndices.hpp.

301  {
302  int b = ffsl(((BitFieldId *)tagId)->to_ulong());
303  if (b != 0)
304  return b;
305  for (int ll = 1; ll < BITFIELDID_SIZE / 32; ll++) {
306  BitFieldId id;
307  id = (*tagId) >> ll * 32;
308  b = ll * 32 + ffsl(id.to_ulong());
309  if (b != 0)
310  return b;
311  }
312  return 0;
313  }
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
#define BITFIELDID_SIZE
max number of fields
Definition: definitions.h:277
BitFieldId * tagId
tag keeps field id

◆ getCoordSysDim()

int MoFEM::Field::getCoordSysDim ( const int  d = 0) const

Get dimension of general two-point tensor MoFEM::CoordSys::getDim.

See details here MoFEM::CoordSys::getDim

Definition at line 171 of file FieldMultiIndices.hpp.

171  {
172  return coordSysPtr->getDim(d);
173  }
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
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.

◆ getCoordSysMeshSet()

EntityHandle MoFEM::Field::getCoordSysMeshSet ( ) const

Returns meshset on which Tags defining coordinate system are stored.

Returns
Coordinate system EntityHandle

Definition at line 219 of file FieldMultiIndices.hpp.

219  {
220  return coordSysPtr->getMeshset();
221  }
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.

◆ getCoordSysName()

std::string MoFEM::Field::getCoordSysName ( ) const

Get coordinate system name.

Returns
Coordinate system name

Definition at line 227 of file FieldMultiIndices.hpp.

227 { return coordSysPtr->getName(); }
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.

◆ getCoordSysNameRef()

boost::string_ref MoFEM::Field::getCoordSysNameRef ( ) const

Get coordinate system name.

Returns
Return string_ref with name.

Definition at line 233 of file FieldMultiIndices.hpp.

233  {
234  return coordSysPtr->getNameRef();
235  }
boost::shared_ptr< CoordSys > coordSysPtr
Pointer to field coordinate system data structure.

◆ getDofOrderMap()

std::vector<ApproximationOrder>& MoFEM::Field::getDofOrderMap ( const EntityType  type) const

get hash-map relating dof index on entity with its order

Dofs of given field are indexed on entity of the same type, same space, approximation base and number of coefficients, are sorted in the way.

Definition at line 368 of file FieldMultiIndices.hpp.

368  {
369  return dofOrderMap[type];
370  }
std::map< EntityType, std::vector< int > > dofOrderMap

◆ getDofSequenceContainer()

boost::shared_ptr<SequenceDofContainer>& MoFEM::Field::getDofSequenceContainer ( ) const

Get reference to sequence data container.

In sequence data container data are physically stored. The purpose of this is to allocate DofEntity data in bulk, having only one allocation instead each time entity is inserted. That makes code efficient.

The vector in sequence is destroyed if last entity inside that vector is destroyed. All MoFEM::MoFEMEntities have aliased shared_ptr which points to the vector.

Not all DOFs are starred in this way, currently such cases are considered;

  • DOFs on vertices. That is exploited that for H1 space, there is some fixed number of DOFs on each vertex

For other cases, DOFs are stored locally in each MoFEM::MoFEMEntities.

Returns
MoFEM::Field::SequenceDofContainer

Definition at line 355 of file FieldMultiIndices.hpp.

355  {
356  return sequenceDofContainer;
357  }
boost::shared_ptr< SequenceDofContainer > sequenceDofContainer

◆ getEntSequenceContainer()

boost::shared_ptr<SequenceEntContainer>& MoFEM::Field::getEntSequenceContainer ( ) const

Get reference to sequence data container.

In sequence data container data are physically stored. The purpose of this is to allocate MoFEMEntities data in bulk, having only one allocation instead each time entity is inserted. That makes code efficient.

The vector in sequence is destroyed if last entity inside that vector is destroyed. All MoFEM::MoFEMEntities have aliased shared_ptr which points to the vector.

Returns
MoFEM::Field::SequenceEntContainer

Definition at line 331 of file FieldMultiIndices.hpp.

331  {
332  return sequenceEntContainer;
333  }
boost::shared_ptr< SequenceEntContainer > sequenceEntContainer

◆ getFieldOrderTable()

FieldOrderTable& MoFEM::Field::getFieldOrderTable ( )

Get the Field Order Table.

Returns
FieldOrderTable&

Definition at line 102 of file FieldMultiIndices.hpp.

102 { return forderTable; }
FieldOrderTable forderTable
nb. DOFs table for entities

◆ getId()

const BitFieldId& MoFEM::Field::getId ( ) const

Get unique field id.

Returns
Filed ID

Definition at line 241 of file FieldMultiIndices.hpp.

241 { return *((BitFieldId *)tagId); }
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
BitFieldId * tagId
tag keeps field id

◆ getMeshset()

EntityHandle MoFEM::Field::getMeshset ( ) const

Get field meshset.

To meshsets entity are attached Tags which keeps basic information about field. Those information is field name, approximation base, approximation space, id, etc.

In meshset contains entities on which given filed is sparing. Type of entities depended on approximations space.

Returns
EntityHandle

Definition at line 162 of file FieldMultiIndices.hpp.

162 { return meshSet; }
EntityHandle meshSet
keeps entities for this meshset

◆ getName()

std::string MoFEM::Field::getName ( ) const

Get field name.

Returns
Field name

Definition at line 255 of file FieldMultiIndices.hpp.

255  {
256  return std::string((char *)tagName, tagNameSize);
257  }
const void * tagName
tag keeps name of the field
int tagNameSize
number of bits necessary to keep field name

◆ getNameRef()

boost::string_ref MoFEM::Field::getNameRef ( ) const

Get string reference to field name.

Returns
Field name

Definition at line 247 of file FieldMultiIndices.hpp.

247  {
248  return boost::string_ref((char *)tagName, tagNameSize);
249  }
const void * tagName
tag keeps name of the field
int tagNameSize
number of bits necessary to keep field name

◆ getNbOfCoeffs()

FieldCoefficientsNumber MoFEM::Field::getNbOfCoeffs ( ) const

Get number of field coefficients.

Scalar field has only one coefficient, vector field in 3D has three. In general number determine space needed to keep data on entities. What coefficient means depend on interpretation and associated coordinate system. For example 3 coefficient means could be covariant or contravariant, or mean three temperatures for mixture of solid, air and water, etc.

Definition at line 285 of file FieldMultiIndices.hpp.

285  {
286  return *tagNbCoeffData;
287  };
FieldCoefficientsNumber * tagNbCoeffData

◆ getSpace()

FieldSpace MoFEM::Field::getSpace ( ) const

Get field approximation space.

Returns
approximation space

Definition at line 263 of file FieldMultiIndices.hpp.

263 { return *tagSpaceData; }
FieldSpace * tagSpaceData
tag keeps field space

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Field e 
)
friend

Definition at line 188 of file CoreDataStructures.cpp.

188  {
189  os << "name " << e.getNameRef() << " BitFieldId " << e.getId().to_ulong()
190  << " bit number " << e.getBitNumber() << " space "
191  << FieldSpaceNames[e.getSpace()] << " approximation base "
192  << ApproximationBaseNames[e.getApproxBase()] << " rank "
193  << e.getNbOfCoeffs() << " meshset " << e.meshSet;
194  return os;
195 }
static const char *const ApproximationBaseNames[]
Definition: definitions.h:155
static const char *const FieldSpaceNames[]
Definition: definitions.h:175

Member Data Documentation

◆ bitNumber

unsigned int MoFEM::Field::bitNumber

Field Id is bit set. Each field has only one bit on, bitNumber stores number of set bit

Definition at line 108 of file FieldMultiIndices.hpp.

◆ coordSysPtr

boost::shared_ptr<CoordSys> MoFEM::Field::coordSysPtr

Pointer to field coordinate system data structure.

Definition at line 78 of file FieldMultiIndices.hpp.

◆ dofOrderMap

std::map<EntityType, std::vector<int> > MoFEM::Field::dofOrderMap
mutableprivate

Definition at line 376 of file FieldMultiIndices.hpp.

◆ forderTable

FieldOrderTable MoFEM::Field::forderTable

nb. DOFs table for entities

Definition at line 95 of file FieldMultiIndices.hpp.

◆ meshSet

EntityHandle MoFEM::Field::meshSet

keeps entities for this meshset

Definition at line 76 of file FieldMultiIndices.hpp.

◆ moab

moab::Interface& MoFEM::Field::moab

Definition at line 74 of file FieldMultiIndices.hpp.

◆ sequenceDofContainer

boost::shared_ptr<SequenceDofContainer> MoFEM::Field::sequenceDofContainer
mutableprivate

Definition at line 374 of file FieldMultiIndices.hpp.

◆ sequenceEntContainer

boost::shared_ptr<SequenceEntContainer> MoFEM::Field::sequenceEntContainer
mutableprivate

Definition at line 373 of file FieldMultiIndices.hpp.

◆ tagBaseData

FieldApproximationBase* MoFEM::Field::tagBaseData

tag keeps field base

Definition at line 85 of file FieldMultiIndices.hpp.

◆ tagId

BitFieldId* MoFEM::Field::tagId

tag keeps field id

Definition at line 83 of file FieldMultiIndices.hpp.

◆ tagName

const void* MoFEM::Field::tagName

tag keeps name of the field

Definition at line 90 of file FieldMultiIndices.hpp.

◆ tagNamePrefixData

const void* MoFEM::Field::tagNamePrefixData

tag keeps name prefix of the field

Definition at line 92 of file FieldMultiIndices.hpp.

◆ tagNamePrefixSize

int MoFEM::Field::tagNamePrefixSize

number of bits necessary to keep field name prefix

Definition at line 93 of file FieldMultiIndices.hpp.

◆ tagNameSize

int MoFEM::Field::tagNameSize

number of bits necessary to keep field name

Definition at line 91 of file FieldMultiIndices.hpp.

◆ tagNbCoeffData

FieldCoefficientsNumber* MoFEM::Field::tagNbCoeffData

tag keeps field rank (dimension, f.e. Temperature field has rank 1, displacements field in 3d has rank 3)

Definition at line 89 of file FieldMultiIndices.hpp.

◆ tagSpaceData

FieldSpace* MoFEM::Field::tagSpaceData

tag keeps field space

Definition at line 84 of file FieldMultiIndices.hpp.

◆ th_AppOrder

Tag MoFEM::Field::th_AppOrder

Tag storing approximation order on entity.

Definition at line 81 of file FieldMultiIndices.hpp.

◆ th_FieldData

Tag MoFEM::Field::th_FieldData

Tag storing field values on entity in the field.

Definition at line 80 of file FieldMultiIndices.hpp.


The documentation for this struct was generated from the following files: