v0.10.0
Public Member Functions | Public Attributes | Friends | List of all members
MoFEM::FiniteElement Struct Reference

Finite element definition. More...

#include <src/multi_indices/FEMultiIndices.hpp>

Collaboration diagram for MoFEM::FiniteElement:
[legend]

Public Member Functions

 FiniteElement (Interface &moab, const EntityHandle _meshset)
 
const UIdgetFEUId () const
 Get finite element uid. More...
 
BitFEId getId () const
 Get finite element id. More...
 
EntityHandle getMeshset () const
 Get meshset containing element entities. More...
 
boost::string_ref getNameRef () const
 Get finite element name. More...
 
std::string getName () const
 Get finite element name. More...
 
BitFieldId getBitFieldIdCol () const
 Get field ids on columns. More...
 
BitFieldId getBitFieldIdRow () const
 Get field ids on rows. More...
 
BitFieldId getBitFieldIdData () const
 Get field ids on data. More...
 
unsigned int getBitNumber () const
 Get bit identifying this element. More...
 

Public Attributes

EntityHandle meshset
 meshset stores FE ents More...
 
BitFEIdtagId
 ptr to tag storing FE id More...
 
void * tagName
 ptr to tag storing FE name More...
 
int tagNameSize
 numer of characters in FE name More...
 
BitFieldIdtag_BitFieldId_col_data
 tag stores col id_id for fields More...
 
BitFieldIdtag_BitFieldId_row_data
 tag stores row id_id for fields More...
 
BitFieldIdtag_BitFieldId_data
 tag stores data id_id for fields More...
 
UId feUId
 
std::array< ElementAdjacencyFunct, MBMAXTYPE > elementAdjacencyTable
 Table of functions retrieving adjacencies for finite element User can alter and change default behavior. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const FiniteElement &e)
 print finite element More...
 

Detailed Description

Finite element definition.

Definition at line 39 of file FEMultiIndices.hpp.

Constructor & Destructor Documentation

◆ FiniteElement()

MoFEM::FiniteElement::FiniteElement ( Interface moab,
const EntityHandle  _meshset 
)

Definition at line 362 of file FEMultiIndices.cpp.

363  : meshset(_meshset) {
364  Tag th_FEId;
365  rval = moab.tag_get_handle("_FEId", th_FEId);
366  MOAB_THROW(rval);
367  rval = moab.tag_get_by_ptr(th_FEId, &meshset, 1, (const void **)&tagId);
368  MOAB_THROW(rval);
369  Tag th_FEName;
370  rval = moab.tag_get_handle("_FEName", th_FEName);
371  MOAB_THROW(rval);
372  rval = moab.tag_get_by_ptr(th_FEName, &meshset, 1, (const void **)&tagName,
373  &tagNameSize);
374  MOAB_THROW(rval);
375  Tag th_FEIdCol, th_FEIdRow, th_FEIdData;
376  rval = moab.tag_get_handle("_FEIdCol", th_FEIdCol);
377  MOAB_THROW(rval);
378  rval = moab.tag_get_by_ptr(th_FEIdCol, &meshset, 1,
379  (const void **)&tag_BitFieldId_col_data);
380  MOAB_THROW(rval);
381  rval = moab.tag_get_handle("_FEIdRow", th_FEIdRow);
382  MOAB_THROW(rval);
383  rval = moab.tag_get_by_ptr(th_FEIdRow, &meshset, 1,
384  (const void **)&tag_BitFieldId_row_data);
385  MOAB_THROW(rval);
386  rval = moab.tag_get_handle("_FEIdData", th_FEIdData);
387  MOAB_THROW(rval);
388  rval = moab.tag_get_by_ptr(th_FEIdData, &meshset, 1,
389  (const void **)&tag_BitFieldId_data);
390  MOAB_THROW(rval);
391 
399 
400  feUId = static_cast<UId>(getBitNumber()) << 8 * sizeof(EntityHandle);
401 }
static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
std::array< ElementAdjacencyFunct, MBMAXTYPE > elementAdjacencyTable
Table of functions retrieving adjacencies for finite element User can alter and change default behavi...
static MoFEMErrorCode defaultFace(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
BitFieldId * tag_BitFieldId_row_data
tag stores row id_id for fields
BitFieldId * tag_BitFieldId_data
tag stores data id_id for fields
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:610
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:85
unsigned int getBitNumber() const
Get bit identifying this element.
EntityHandle meshset
meshset stores FE ents
BitFEId * tagId
ptr to tag storing FE id
int tagNameSize
numer of characters in FE name
static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
BitFieldId * tag_BitFieldId_col_data
tag stores col id_id for fields
static MoFEMErrorCode defaultTet(Interface &moab, const Field &field, const EntFiniteElement &fe, Range &adjacency)
void * tagName
ptr to tag storing FE name

Member Function Documentation

◆ getBitFieldIdCol()

BitFieldId MoFEM::FiniteElement::getBitFieldIdCol ( ) const

Get field ids on columns.

Returns
Bit field ids

Definition at line 91 of file FEMultiIndices.hpp.

91  {
93  }
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:53
BitFieldId * tag_BitFieldId_col_data
tag stores col id_id for fields

◆ getBitFieldIdData()

BitFieldId MoFEM::FiniteElement::getBitFieldIdData ( ) const

Get field ids on data.

Returns
Bit field ids

Definition at line 107 of file FEMultiIndices.hpp.

107  {
108  return *((BitFieldId *)tag_BitFieldId_data);
109  }
BitFieldId * tag_BitFieldId_data
tag stores data id_id for fields
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:53

◆ getBitFieldIdRow()

BitFieldId MoFEM::FiniteElement::getBitFieldIdRow ( ) const

Get field ids on rows.

Returns
Bit field ids

Definition at line 99 of file FEMultiIndices.hpp.

99  {
100  return *((BitFieldId *)tag_BitFieldId_row_data);
101  }
BitFieldId * tag_BitFieldId_row_data
tag stores row id_id for fields
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:53

◆ getBitNumber()

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

Get bit identifying this element.

Each element like field is identified by bit set. Each element has unique bit set, this function returns number of that bit.

Returns
Bit number

Definition at line 119 of file FEMultiIndices.hpp.

119  {
120  return ffsl(((BitFieldId *)tagId)->to_ulong());
121  }
BitFEId * tagId
ptr to tag storing FE id
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:53

◆ getFEUId()

const UId& MoFEM::FiniteElement::getFEUId ( ) const

Get finite element uid.

Returns
const UId&

Definition at line 57 of file FEMultiIndices.hpp.

57 { return feUId; }

◆ getId()

BitFEId MoFEM::FiniteElement::getId ( ) const

Get finite element id.

Returns
Finite element Id

Definition at line 63 of file FEMultiIndices.hpp.

63 { return *tagId; }
BitFEId * tagId
ptr to tag storing FE id

◆ getMeshset()

EntityHandle MoFEM::FiniteElement::getMeshset ( ) const

Get meshset containing element entities.

Returns
Meshset

Definition at line 69 of file FEMultiIndices.hpp.

69 { return meshset; }
EntityHandle meshset
meshset stores FE ents

◆ getName()

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

Get finite element name.

Returns
string

Definition at line 83 of file FEMultiIndices.hpp.

83  {
84  return std::string((char *)tagName, tagNameSize);
85  }
int tagNameSize
numer of characters in FE name
void * tagName
ptr to tag storing FE name

◆ getNameRef()

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

Get finite element name.

Returns
string_ref

Definition at line 75 of file FEMultiIndices.hpp.

75  {
76  return boost::string_ref((char *)tagName, tagNameSize);
77  }
int tagNameSize
numer of characters in FE name
void * tagName
ptr to tag storing FE name

Friends And Related Function Documentation

◆ operator<<

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

print finite element

Definition at line 403 of file FEMultiIndices.cpp.

403  {
404  os << e.getNameRef() << " fe_id " << e.getId().to_ulong() << " f_id_row "
405  << e.getBitFieldIdRow() << " f_id_col " << e.getBitFieldIdCol()
406  << " BitFEId_data " << e.getBitFieldIdData();
407  return os;
408 }

Member Data Documentation

◆ elementAdjacencyTable

std::array<ElementAdjacencyFunct, MBMAXTYPE> MoFEM::FiniteElement::elementAdjacencyTable

Table of functions retrieving adjacencies for finite element User can alter and change default behavior.

Definition at line 127 of file FEMultiIndices.hpp.

◆ feUId

UId MoFEM::FiniteElement::feUId

Definition at line 48 of file FEMultiIndices.hpp.

◆ meshset

EntityHandle MoFEM::FiniteElement::meshset

meshset stores FE ents

Definition at line 41 of file FEMultiIndices.hpp.

◆ tag_BitFieldId_col_data

BitFieldId* MoFEM::FiniteElement::tag_BitFieldId_col_data

tag stores col id_id for fields

Definition at line 45 of file FEMultiIndices.hpp.

◆ tag_BitFieldId_data

BitFieldId* MoFEM::FiniteElement::tag_BitFieldId_data

tag stores data id_id for fields

Definition at line 47 of file FEMultiIndices.hpp.

◆ tag_BitFieldId_row_data

BitFieldId* MoFEM::FiniteElement::tag_BitFieldId_row_data

tag stores row id_id for fields

Definition at line 46 of file FEMultiIndices.hpp.

◆ tagId

BitFEId* MoFEM::FiniteElement::tagId

ptr to tag storing FE id

Definition at line 42 of file FEMultiIndices.hpp.

◆ tagName

void* MoFEM::FiniteElement::tagName

ptr to tag storing FE name

Definition at line 43 of file FEMultiIndices.hpp.

◆ tagNameSize

int MoFEM::FiniteElement::tagNameSize

numer of characters in FE name

Definition at line 44 of file FEMultiIndices.hpp.


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