v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Private 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...
 

Static Private Attributes

static constexpr int ent_shift = 64
 

Friends

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

Detailed Description

Finite element definition.

Definition at line 26 of file FEMultiIndices.hpp.

Constructor & Destructor Documentation

◆ FiniteElement()

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

Definition at line 325 of file FEMultiIndices.cpp.

326 : meshset(_meshset) {
327 Tag th_FEId;
328 CHK_MOAB_THROW(moab.tag_get_handle("_FEId", th_FEId), "get tag");
330 moab.tag_get_by_ptr(th_FEId, &meshset, 1, (const void **)&tagId),
331 "get tag data");
332 Tag th_FEName;
333 CHK_MOAB_THROW(moab.tag_get_handle("_FEName", th_FEName), "get tag");
334 CHK_MOAB_THROW(moab.tag_get_by_ptr(th_FEName, &meshset, 1,
335 (const void **)&tagName, &tagNameSize),
336 "get tag data");
337 Tag th_FEIdCol, th_FEIdRow, th_FEIdData;
338 CHK_MOAB_THROW(moab.tag_get_handle("_FEIdCol", th_FEIdCol), "get_tag");
339 CHK_MOAB_THROW(moab.tag_get_by_ptr(th_FEIdCol, &meshset, 1,
340 (const void **)&tag_BitFieldId_col_data),
341 "get tag data");
342 CHK_MOAB_THROW(moab.tag_get_handle("_FEIdRow", th_FEIdRow), "get tag");
343 CHK_MOAB_THROW(moab.tag_get_by_ptr(th_FEIdRow, &meshset, 1,
344 (const void **)&tag_BitFieldId_row_data),
345 "get tag data");
346 CHK_MOAB_THROW(moab.tag_get_handle("_FEIdData", th_FEIdData), "get tag");
347 CHK_MOAB_THROW(moab.tag_get_by_ptr(th_FEIdData, &meshset, 1,
348 (const void **)&tag_BitFieldId_data),
349 "get tag data");
350
359
360 feUId = static_cast<UId>(getBitNumber()) << ent_shift;
361}
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:576
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
static constexpr int ent_shift
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
inline

Get field ids on columns.

Returns
Bit field ids

Definition at line 78 of file FEMultiIndices.hpp.

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

◆ getBitFieldIdData()

BitFieldId MoFEM::FiniteElement::getBitFieldIdData ( ) const
inline

Get field ids on data.

Returns
Bit field ids

Definition at line 94 of file FEMultiIndices.hpp.

94 {
96 }

◆ getBitFieldIdRow()

BitFieldId MoFEM::FiniteElement::getBitFieldIdRow ( ) const
inline

Get field ids on rows.

Returns
Bit field ids

Definition at line 86 of file FEMultiIndices.hpp.

86 {
88 }

◆ getBitNumber()

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

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

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

◆ getFEUId()

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

Get finite element uid.

Returns
const UId&

Definition at line 44 of file FEMultiIndices.hpp.

44{ return feUId; }

◆ getId()

BitFEId MoFEM::FiniteElement::getId ( ) const
inline

Get finite element id.

Returns
Finite element Id

Definition at line 50 of file FEMultiIndices.hpp.

50{ return *tagId; }

◆ getMeshset()

EntityHandle MoFEM::FiniteElement::getMeshset ( ) const
inline

Get meshset containing element entities.

Returns
Meshset

Definition at line 56 of file FEMultiIndices.hpp.

56{ return meshset; }

◆ getName()

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

Get finite element name.

Returns
string

Definition at line 70 of file FEMultiIndices.hpp.

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

◆ getNameRef()

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

Get finite element name.

Returns
string_ref

Definition at line 62 of file FEMultiIndices.hpp.

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

Friends And Related Function Documentation

◆ operator<<

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

print finite element

Definition at line 363 of file FEMultiIndices.cpp.

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

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

◆ ent_shift

constexpr int MoFEM::FiniteElement::ent_shift = 64
staticconstexprprivate

Definition at line 122 of file FEMultiIndices.hpp.

◆ feUId

UId MoFEM::FiniteElement::feUId

Definition at line 35 of file FEMultiIndices.hpp.

◆ meshset

EntityHandle MoFEM::FiniteElement::meshset

meshset stores FE ents

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

◆ tag_BitFieldId_data

BitFieldId* MoFEM::FiniteElement::tag_BitFieldId_data

tag stores data id_id for fields

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

◆ tagId

BitFEId* MoFEM::FiniteElement::tagId

ptr to tag storing FE id

Definition at line 29 of file FEMultiIndices.hpp.

◆ tagName

void* MoFEM::FiniteElement::tagName

ptr to tag storing FE name

Definition at line 30 of file FEMultiIndices.hpp.

◆ tagNameSize

int MoFEM::FiniteElement::tagNameSize

numer of characters in FE name

Definition at line 31 of file FEMultiIndices.hpp.


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