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

user adjacency function table More...

#include <src/multi_indices/FEMultiIndices.hpp>

Collaboration diagram for MoFEM::FiniteElement:
[legend]

Public Member Functions

 FiniteElement (Interface &moab, const EntityHandle _meshset)
 
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...
 
ElementAdjacencyFunct elementAdjacencyTable [MBMAXTYPE]
 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

user adjacency function table

user adjacency function tableuser adjacency function Finite element definition

Definition at line 266 of file FEMultiIndices.hpp.

Constructor & Destructor Documentation

◆ FiniteElement()

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

Definition at line 926 of file FEMultiIndices.cpp.

927  : meshset(_meshset) {
928 
929  ErrorCode rval;
930  Tag th_FEId;
931  rval = moab.tag_get_handle("_FEId", th_FEId);
932  MOAB_THROW(rval);
933  rval = moab.tag_get_by_ptr(th_FEId, &meshset, 1, (const void **)&tagId);
934  MOAB_THROW(rval);
935  Tag th_FEName;
936  rval = moab.tag_get_handle("_FEName", th_FEName);
937  MOAB_THROW(rval);
938  rval = moab.tag_get_by_ptr(th_FEName, &meshset, 1, (const void **)&tagName,
939  &tagNameSize);
940  MOAB_THROW(rval);
941  Tag th_FEIdCol, th_FEIdRow, th_FEIdData;
942  rval = moab.tag_get_handle("_FEIdCol", th_FEIdCol);
943  MOAB_THROW(rval);
944  rval = moab.tag_get_by_ptr(th_FEIdCol, &meshset, 1,
945  (const void **)&tag_BitFieldId_col_data);
946  MOAB_THROW(rval);
947  rval = moab.tag_get_handle("_FEIdRow", th_FEIdRow);
948  MOAB_THROW(rval);
949  rval = moab.tag_get_by_ptr(th_FEIdRow, &meshset, 1,
950  (const void **)&tag_BitFieldId_row_data);
951  MOAB_THROW(rval);
952  rval = moab.tag_get_handle("_FEIdData", th_FEIdData);
953  MOAB_THROW(rval);
954  rval = moab.tag_get_by_ptr(th_FEIdData, &meshset, 1,
955  (const void **)&tag_BitFieldId_data);
956  MOAB_THROW(rval);
957 
958  // custom adjacency map
959  // for(int tt = 0;tt<MBMAXTYPE;tt++) {
960  // elementAdjacencyTable[tt] = NULL;
961  // }
968 }
static MoFEMErrorCode defaultVertex(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
static MoFEMErrorCode defaultTri(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, 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:623
static MoFEMErrorCode defaultTet(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
EntityHandle meshset
meshset stores FE ents
ElementAdjacencyFunct elementAdjacencyTable[MBMAXTYPE]
Table of functions retrieving adjacencies for finite element User can alter and change default behavi...
BitFEId * tagId
ptr to tag storing FE id
int tagNameSize
numer of characters in FE name
static MoFEMErrorCode defaultEdge(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
static MoFEMErrorCode defaultPrism(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)
BitFieldId * tag_BitFieldId_col_data
tag stores col id_id for fields
static MoFEMErrorCode defaultMeshset(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, 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 310 of file FEMultiIndices.hpp.

310  {
311  return *((BitFieldId *)tag_BitFieldId_col_data);
312  }
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
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 326 of file FEMultiIndices.hpp.

326  {
327  return *((BitFieldId *)tag_BitFieldId_data);
328  }
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
BitFieldId * tag_BitFieldId_data
tag stores data id_id for fields

◆ getBitFieldIdRow()

BitFieldId MoFEM::FiniteElement::getBitFieldIdRow ( ) const

Get field ids on rows.

Returns
Bit field ids

Definition at line 318 of file FEMultiIndices.hpp.

318  {
319  return *((BitFieldId *)tag_BitFieldId_row_data);
320  }
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
BitFieldId * tag_BitFieldId_row_data
tag stores row id_id for fields

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

338  {
339  return ffsl(((BitFieldId *)tagId)->to_ulong());
340  }
std::bitset< BITFIELDID_SIZE > BitFieldId
Definition: Common.hpp:149
BitFEId * tagId
ptr to tag storing FE id

◆ getId()

BitFEId MoFEM::FiniteElement::getId ( ) const

Get finite element id.

Returns
Finite element Id

Definition at line 282 of file FEMultiIndices.hpp.

282 { 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 288 of file FEMultiIndices.hpp.

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

◆ getName()

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

Get finite element name.

Returns
string

Definition at line 302 of file FEMultiIndices.hpp.

302  {
303  return std::string((char *)tagName, tagNameSize);
304  }
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 294 of file FEMultiIndices.hpp.

294  {
295  return boost::string_ref((char *)tagName, tagNameSize);
296  }
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 970 of file FEMultiIndices.cpp.

970  {
971  os << "id " << e.getId() << " name " << e.getNameRef() << " f_id_row "
972  << e.getBitFieldIdRow() << " f_id_col " << e.getBitFieldIdCol()
973  << " BitFEId_data " << e.getBitFieldIdData();
974  return os;
975 }

Member Data Documentation

◆ elementAdjacencyTable

ElementAdjacencyFunct MoFEM::FiniteElement::elementAdjacencyTable[MBMAXTYPE]

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

Definition at line 346 of file FEMultiIndices.hpp.

◆ meshset

EntityHandle MoFEM::FiniteElement::meshset

meshset stores FE ents

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

◆ tag_BitFieldId_data

BitFieldId* MoFEM::FiniteElement::tag_BitFieldId_data

tag stores data id_id for fields

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

◆ tagId

BitFEId* MoFEM::FiniteElement::tagId

ptr to tag storing FE id

Definition at line 269 of file FEMultiIndices.hpp.

◆ tagName

void* MoFEM::FiniteElement::tagName

ptr to tag storing FE name

Definition at line 270 of file FEMultiIndices.hpp.

◆ tagNameSize

int MoFEM::FiniteElement::tagNameSize

numer of characters in FE name

Definition at line 271 of file FEMultiIndices.hpp.


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