v0.8.4
Public Types | 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

 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...
 

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...
 
FieldSpacetag_space_data
 tag keeps field space More...
 
FieldApproximationBasetag_base_data
 
FieldCoefficientsNumbertag_nb_coeff_data
 
const void * tagName
 tag keeps name of the field More...
 
int tagNameSize
 number of bits necessary to keep field name More...
 
const void * tag_name_prefix_data
 tag keeps name prefix of the field More...
 
int tag_name_prefix_size
 
FieldOrderTable forder_table
 nb. DOFs table for entities More...
 
unsigned int bit_number
 

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.

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), tag_space_data(NULL),
52  tag_nb_coeff_data(NULL), tagName(NULL), tagNameSize(0),
53  sequenceEntContainer(boost::make_shared<SequenceEntContainer>()),
54  sequenceDofContainer(boost::make_shared<SequenceDofContainer>()) {
55  // Change those tags only by modifiers
56  ErrorCode rval;
57  // id
58  Tag th_field_id;
59  rval = moab.tag_get_handle("_FieldId", th_field_id);
60  MOAB_THROW(rval);
61  rval = moab.tag_get_by_ptr(th_field_id, &meshSet, 1, (const void **)&tagId);
62  MOAB_THROW(rval);
63  // space
64  Tag th_field_space;
65  rval = moab.tag_get_handle("_FieldSpace", th_field_space);
66  MOAB_THROW(rval);
67  rval = moab.tag_get_by_ptr(th_field_space, &meshSet, 1,
68  (const void **)&tag_space_data);
69  MOAB_THROW(rval);
70  // approx. base
71  Tag th_field_base;
72  rval = moab.tag_get_handle("_FieldBase", th_field_base);
73  MOAB_THROW(rval);
74  rval = moab.tag_get_by_ptr(th_field_base, &meshSet, 1,
75  (const void **)&tag_base_data);
76  MOAB_THROW(rval);
77  // name
78  Tag th_field_name;
79  rval = moab.tag_get_handle("_FieldName", th_field_name);
80  MOAB_THROW(rval);
81  rval = moab.tag_get_by_ptr(th_field_name, &meshSet, 1,
82  (const void **)&tagName, &tagNameSize);
83  MOAB_THROW(rval);
84  // name prefix
85  Tag th_field_name_data_name_prefix;
86  rval = moab.tag_get_handle("_FieldName_DataNamePrefix",
87  th_field_name_data_name_prefix);
88  MOAB_THROW(rval);
89  rval = moab.tag_get_by_ptr(th_field_name_data_name_prefix, &meshSet, 1,
90  (const void **)&tag_name_prefix_data,
92  MOAB_THROW(rval);
93  std::string name_data_prefix((char *)tag_name_prefix_data,
95  // data
96  std::string tag_data_name = name_data_prefix + getName();
97  rval = moab.tag_get_handle(tag_data_name.c_str(), th_FieldData);
98  MOAB_THROW(rval);
99  // order
100  std::string tag_approximation_order_name = "_App_Order_" + getName();
101  rval = moab.tag_get_handle(tag_approximation_order_name.c_str(), th_AppOrder);
102  MOAB_THROW(rval);
103  // rank
104  Tag th_rank;
105  std::string Tag_rank_name = "_Field_Rank_" + getName();
106  rval = moab.tag_get_handle(Tag_rank_name.c_str(), th_rank);
107  MOAB_THROW(rval);
108  rval = moab.tag_get_by_ptr(th_rank, &meshSet, 1,
109  (const void **)&tag_nb_coeff_data);
110  MOAB_THROW(rval);
112  for (int tt = 0; tt < MBMAXTYPE; tt++) {
113  forder_table[tt] = NULL;
114  }
115  switch (*tag_base_data) {
118  switch (*tag_space_data) {
119  case H1:
120  forder_table[MBVERTEX] = fNBVERTEX_H1;
121  forder_table[MBEDGE] = fNBEDGE_H1;
122  forder_table[MBTRI] = fNBFACETRI_H1;
123  forder_table[MBQUAD] = fNBFACEQUAD_H1;
124  forder_table[MBTET] = fNBVOLUMETET_H1;
125  forder_table[MBPRISM] = fNBVOLUMEPRISM_H1;
126  break;
127  case HCURL:
128  forder_table[MBVERTEX] = fNBVERTEX_HCURL;
132  break;
133  case HDIV:
134  forder_table[MBVERTEX] = fNBVERTEX_HDIV;
135  forder_table[MBEDGE] = fNBEDGE_HDIV;
138  break;
139  case L2:
140  forder_table[MBVERTEX] = fNBVERTEX_L2;
141  forder_table[MBEDGE] = fNBEDGE_L2;
142  forder_table[MBTRI] = fNBFACETRI_L2;
143  forder_table[MBTET] = fNBVOLUMETET_L2;
144  break;
145  case NOFIELD:
146  for (EntityType t = MBVERTEX; t < MBMAXTYPE; t++) {
147  // Concept of approximation order make no sense if there is no field
149  }
150  break;
151  default:
152  THROW_MESSAGE("unknown approximation space");
153  }
154  break;
156  switch (*tag_space_data) {
157  case HCURL:
158  forder_table[MBVERTEX] = fNBVERTEX_HCURL;
162  break;
163  case HDIV:
164  forder_table[MBVERTEX] = fNBVERTEX_HDIV;
165  forder_table[MBEDGE] = fNBEDGE_HDIV;
168  break;
169  default:
170  THROW_MESSAGE("unknown approximation space or not yet implemented");
171  }
172  break;
174  THROW_MESSAGE("AINSWORTH_BERNSTEIN_BEZIER_BASE not implemented yer")
175  break;
176  case USER_BASE:
177  for (int ee = 0; ee < MBMAXTYPE; ee++) {
179  }
180  break;
181  default:
182  if (*tag_space_data != NOFIELD) {
183  THROW_MESSAGE("unknown approximation base");
184  } else {
185  for (EntityType t = MBVERTEX; t < MBMAXTYPE; t++) {
187  }
188  }
189  }
190  // // Set DOFs orders on entities
191  // for(EntityType ee = MBVERTEX;ee!=MBMAXTYPE;ee++) {
192  // getDofOrderMap(ee).resize(MAX_DOFS_ON_ENTITY,-1);
193  // }
194 }
FieldSpace * tag_space_data
tag keeps field space
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
const void * tag_name_prefix_data
tag keeps name prefix of the field
field with continuous normal traction
Definition: definitions.h:179
user implemented approximation base
Definition: definitions.h:146
int fNBVERTEX_L2(int P)
unsigned int bit_number
int fNBEDGE_DEMKOWICZ_HCURL(int P)
scalar or vector of scalars describe (no true field)
Definition: definitions.h:176
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
int fNBVOLUMETET_L2(int P)
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:641
int fNBFACETRI_DEMKOWICZ_HDIV(int P)
FieldOrderTable forder_table
nb. DOFs table for entities
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:623
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)
Not yet implemented, in implementation we will follow .
Definition: definitions.h:144
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
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:178
boost::shared_ptr< SequenceEntContainer > sequenceEntContainer
int fNBFACETRI_DEMKOWICZ_HCURL(int P)
FieldApproximationBase * tag_base_data
int fNBFACETRI_H1(int P)
number of approx. functions for H1 space on face
Like AINSWORTH_LEGENDRE_BASE but with Lobatto base instead Legendre .
Definition: definitions.h:143
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
continuous field
Definition: definitions.h:177
FieldCoefficientsNumber * tag_nb_coeff_data
int fNBFACETRI_L2(int P)
int fNBENTITYSET_NOFIELD(int P)
int fNBVERTEX_HDIV(int P)
number of approx. functions for HDIV space on vertex
Construction of base is by Demkowicz .
Definition: definitions.h:145
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:180

Member Function Documentation

◆ 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 142 of file FieldMultiIndices.hpp.

142  {
144  MoFEMFunctionReturnHot(coordSysPtr->get_E_Base(m));
145  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:522
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:528
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 162 of file FieldMultiIndices.hpp.

162  {
164  MoFEMFunctionReturnHot(coordSysPtr->get_e_Base(m));
165  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:522
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:528
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 152 of file FieldMultiIndices.hpp.

152  {
154  MoFEMFunctionReturnHot(coordSysPtr->get_E_DualBase(m));
155  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:522
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:528
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 172 of file FieldMultiIndices.hpp.

172  {
174  MoFEMFunctionReturnHot(coordSysPtr->get_e_DualBase(m));
175  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:522
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:528
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 231 of file FieldMultiIndices.hpp.

231 { return *tag_base_data; }
FieldApproximationBase * tag_base_data

◆ 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 256 of file FieldMultiIndices.hpp.

256 { return bit_number; }
unsigned int bit_number

◆ 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 263 of file FieldMultiIndices.hpp.

263  {
264  int b = ffsl(((BitFieldId *)tagId)->to_ulong());
265  if (b != 0)
266  return b;
267  for (int ll = 1; ll < BITFIELDID_SIZE / 32; ll++) {
268  BitFieldId id;
269  id = (*tagId) >> ll * 32;
270  b = ll * 32 + ffsl(id.to_ulong());
271  if (b != 0)
272  return b;
273  }
274  return 0;
275  }
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
#define BITFIELDID_SIZE
max number of fields
Definition: definitions.h:319
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 133 of file FieldMultiIndices.hpp.

133  {
134  return coordSysPtr->getDim(d);
135  }
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 181 of file FieldMultiIndices.hpp.

181  {
182  return coordSysPtr->getMeshset();
183  }
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 189 of file FieldMultiIndices.hpp.

189 { 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 195 of file FieldMultiIndices.hpp.

195  {
196  return coordSysPtr->getNameRef();
197  }
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 330 of file FieldMultiIndices.hpp.

330  {
331  return dofOrderMap[type];
332  }
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 317 of file FieldMultiIndices.hpp.

317  {
318  return sequenceDofContainer;
319  }
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 293 of file FieldMultiIndices.hpp.

293  {
294  return sequenceEntContainer;
295  }
boost::shared_ptr< SequenceEntContainer > sequenceEntContainer

◆ getId()

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

Get unique field id.

Returns
Filed ID

Definition at line 203 of file FieldMultiIndices.hpp.

203 { 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 124 of file FieldMultiIndices.hpp.

124 { 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 217 of file FieldMultiIndices.hpp.

217  {
218  return std::string((char *)tagName, tagNameSize);
219  }
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 209 of file FieldMultiIndices.hpp.

209  {
210  return boost::string_ref((char *)tagName, tagNameSize);
211  }
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 247 of file FieldMultiIndices.hpp.

247  {
248  return *tag_nb_coeff_data;
249  };
FieldCoefficientsNumber * tag_nb_coeff_data

◆ getSpace()

FieldSpace MoFEM::Field::getSpace ( ) const

Get field approximation space.

Returns
approximation space

Definition at line 225 of file FieldMultiIndices.hpp.

225 { return *tag_space_data; }
FieldSpace * tag_space_data
tag keeps field space

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 196 of file CoreDataStructures.cpp.

196  {
197  os << "name " << e.getNameRef() << " BitFieldId " << e.getId().to_ulong()
198  << " bit number " << e.getBitNumber() << " space "
199  << FieldSpaceNames[e.getSpace()] << " approximation base "
200  << ApproximationBaseNames[e.getApproxBase()] << " rank "
201  << e.getNbOfCoeffs() << " meshset " << e.meshSet;
202  return os;
203 }
static const char *const ApproximationBaseNames[]
Definition: definitions.h:153
static const char *const FieldSpaceNames[]
Definition: definitions.h:184

Member Data Documentation

◆ bit_number

unsigned int MoFEM::Field::bit_number

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

Definition at line 100 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 338 of file FieldMultiIndices.hpp.

◆ forder_table

FieldOrderTable MoFEM::Field::forder_table

nb. DOFs table for entities

Definition at line 94 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 336 of file FieldMultiIndices.hpp.

◆ sequenceEntContainer

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

Definition at line 335 of file FieldMultiIndices.hpp.

◆ tag_base_data

FieldApproximationBase* MoFEM::Field::tag_base_data

tag keeps field spacea

Definition at line 85 of file FieldMultiIndices.hpp.

◆ tag_name_prefix_data

const void* MoFEM::Field::tag_name_prefix_data

tag keeps name prefix of the field

Definition at line 91 of file FieldMultiIndices.hpp.

◆ tag_name_prefix_size

int MoFEM::Field::tag_name_prefix_size

number of bits necessary to keep field name prefix

Definition at line 92 of file FieldMultiIndices.hpp.

◆ tag_nb_coeff_data

FieldCoefficientsNumber* MoFEM::Field::tag_nb_coeff_data

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

Definition at line 88 of file FieldMultiIndices.hpp.

◆ tag_space_data

FieldSpace* MoFEM::Field::tag_space_data

tag keeps field space

Definition at line 84 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 89 of file FieldMultiIndices.hpp.

◆ tagNameSize

int MoFEM::Field::tagNameSize

number of bits necessary to keep field name

Definition at line 90 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: