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

Finite element definition. More...

#include <src/multi_indices/FEMultiIndices.hpp>

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 25 of file FEMultiIndices.hpp.

Constructor & Destructor Documentation

◆ FiniteElement()

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

Definition at line 324 of file FEMultiIndices.cpp.

325 : meshset(_meshset) {
326 Tag th_FEId;
327 rval = moab.tag_get_handle("_FEId", th_FEId);
329 rval = moab.tag_get_by_ptr(th_FEId, &meshset, 1, (const void **)&tagId);
331 Tag th_FEName;
332 rval = moab.tag_get_handle("_FEName", th_FEName);
334 rval = moab.tag_get_by_ptr(th_FEName, &meshset, 1, (const void **)&tagName,
335 &tagNameSize);
337 Tag th_FEIdCol, th_FEIdRow, th_FEIdData;
338 rval = moab.tag_get_handle("_FEIdCol", th_FEIdCol);
340 rval = moab.tag_get_by_ptr(th_FEIdCol, &meshset, 1,
341 (const void **)&tag_BitFieldId_col_data);
343 rval = moab.tag_get_handle("_FEIdRow", th_FEIdRow);
345 rval = moab.tag_get_by_ptr(th_FEIdRow, &meshset, 1,
346 (const void **)&tag_BitFieldId_row_data);
348 rval = moab.tag_get_handle("_FEIdData", th_FEIdData);
350 rval = moab.tag_get_by_ptr(th_FEIdData, &meshset, 1,
351 (const void **)&tag_BitFieldId_data);
353
362
363 feUId = static_cast<UId>(getBitNumber()) << 8 * sizeof(EntityHandle);
364}
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:541
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
uint128_t UId
Unique Id.
Definition: Types.hpp:31
static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
static MoFEMErrorCode defaultVolume(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
static MoFEMErrorCode defaultFace(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)
BitFieldId * tag_BitFieldId_col_data
tag stores col id_id for fields
void * tagName
ptr to tag storing FE name
unsigned int getBitNumber() const
Get bit identifying this element.
BitFieldId * tag_BitFieldId_data
tag stores data id_id for fields
BitFEId * tagId
ptr to tag storing FE id
BitFieldId * tag_BitFieldId_row_data
tag stores row id_id for fields
int tagNameSize
numer of characters in FE name
EntityHandle meshset
meshset stores FE ents
std::array< ElementAdjacencyFunct, MBMAXTYPE > elementAdjacencyTable
Table of functions retrieving adjacencies for finite element User can alter and change default behavi...

Member Function Documentation

◆ getBitFieldIdCol()

BitFieldId MoFEM::FiniteElement::getBitFieldIdCol ( ) const

Get field ids on columns.

Returns
Bit field ids

Definition at line 77 of file FEMultiIndices.hpp.

77 {
79 }
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:42

◆ getBitFieldIdData()

BitFieldId MoFEM::FiniteElement::getBitFieldIdData ( ) const

Get field ids on data.

Returns
Bit field ids

Definition at line 93 of file FEMultiIndices.hpp.

93 {
95 }

◆ getBitFieldIdRow()

BitFieldId MoFEM::FiniteElement::getBitFieldIdRow ( ) const

Get field ids on rows.

Returns
Bit field ids

Definition at line 85 of file FEMultiIndices.hpp.

85 {
87 }

◆ 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 105 of file FEMultiIndices.hpp.

105 {
106 return ffsl(((BitFieldId *)tagId)->to_ulong());
107 }

◆ getFEUId()

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

Get finite element uid.

Returns
const UId&

Definition at line 43 of file FEMultiIndices.hpp.

43{ return feUId; }

◆ getId()

BitFEId MoFEM::FiniteElement::getId ( ) const

Get finite element id.

Returns
Finite element Id

Definition at line 49 of file FEMultiIndices.hpp.

49{ return *tagId; }

◆ getMeshset()

EntityHandle MoFEM::FiniteElement::getMeshset ( ) const

Get meshset containing element entities.

Returns
Meshset

Definition at line 55 of file FEMultiIndices.hpp.

55{ return meshset; }

◆ getName()

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

Get finite element name.

Returns
string

Definition at line 69 of file FEMultiIndices.hpp.

69 {
70 return std::string((char *)tagName, tagNameSize);
71 }

◆ getNameRef()

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

Get finite element name.

Returns
string_ref

Definition at line 61 of file FEMultiIndices.hpp.

61 {
62 return boost::string_ref((char *)tagName, tagNameSize);
63 }

Friends And Related Function Documentation

◆ operator<<

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

print finite element

Definition at line 366 of file FEMultiIndices.cpp.

366 {
367 os << e.getNameRef() << " fe_id " << e.getId().to_ulong() << " f_id_row "
368 << e.getBitFieldIdRow() << " f_id_col " << e.getBitFieldIdCol()
369 << " BitFEId_data " << e.getBitFieldIdData();
370 return os;
371}

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 113 of file FEMultiIndices.hpp.

◆ feUId

UId MoFEM::FiniteElement::feUId

Definition at line 34 of file FEMultiIndices.hpp.

◆ meshset

EntityHandle MoFEM::FiniteElement::meshset

meshset stores FE ents

Definition at line 27 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 31 of file FEMultiIndices.hpp.

◆ tag_BitFieldId_data

BitFieldId* MoFEM::FiniteElement::tag_BitFieldId_data

tag stores data id_id for fields

Definition at line 33 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 32 of file FEMultiIndices.hpp.

◆ tagId

BitFEId* MoFEM::FiniteElement::tagId

ptr to tag storing FE id

Definition at line 28 of file FEMultiIndices.hpp.

◆ tagName

void* MoFEM::FiniteElement::tagName

ptr to tag storing FE name

Definition at line 29 of file FEMultiIndices.hpp.

◆ tagNameSize

int MoFEM::FiniteElement::tagNameSize

numer of characters in FE name

Definition at line 30 of file FEMultiIndices.hpp.


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