v0.8.19
Public Member Functions | Public Attributes | List of all members
MoFEM::RefElement_TET Struct Reference

keeps data about abstract TET finite element More...

#include <src/multi_indices/FEMultiIndices.hpp>

Inheritance diagram for MoFEM::RefElement_TET:
[legend]
Collaboration diagram for MoFEM::RefElement_TET:
[legend]

Public Member Functions

 RefElement_TET (const boost::shared_ptr< RefEntity > &ref_ent_ptr)
 
const boost::shared_ptr< SideNumber > & getSideNumberPtr (const EntityHandle ent) const
 
SideNumber_multiIndexgetSideNumberTable () const
 
const BitRefEdgesgetBitRefEdges () const
 
int getBitRefEdgesUlong () const
 
- Public Member Functions inherited from MoFEM::RefElement
 RefElement (const boost::shared_ptr< RefEntity > &ref_ent_ptr)
 
SideNumber_multiIndexgetSideNumberTable () const
 
boost::shared_ptr< RefEntity > & getRefEntityPtr () const
 Get pointer to RefEntity. More...
 
- Public Member Functions inherited from MoFEM::interface_RefEntity< RefEntity >
 interface_RefEntity (const boost::shared_ptr< RefEntity > &sptr)
 
 interface_RefEntity (const interface_RefEntity< RefEntity > &interface)
 
virtual ~interface_RefEntity ()
 
boost::shared_ptr< BasicEntityData > & getBasicDataPtr ()
 
const boost::shared_ptr< BasicEntityData > & getBasicDataPtr () const
 
EntityHandle getRefEnt () const
 
EntityType getParentEntType () const
 
EntityHandle getParentEnt () const
 
BitRefLevelgetBitRefLevelPtr () const
 
const BitRefLevelgetBitRefLevel () const
 
unsigned long int getBitRefLevelULong () const
 
EntityType getEntType () const
 
EntityID getEntId () const
 
EntityHandle getOwnerEnt () const
 
EntityHandlegetOwnerEnt ()
 
int getOwnerProc () const
 
intgetOwnerProc ()
 
int getPartProc () const
 
intgetPartProc ()
 
unsigned char getPStatus () const
 
intgetSharingProcsPtr () const
 
EntityHandlegetSharingHandlersPtr () const
 
boost::shared_ptr< RefEntity > & getRefEntityPtr () const
 

Public Attributes

BitRefEdgestag_BitRefEdges
 
const inttag_type_data
 
- Public Attributes inherited from MoFEM::RefElement
SideNumber_multiIndex side_number_table
 
- Public Attributes inherited from MoFEM::interface_RefEntity< RefEntity >
boost::shared_ptr< RefEntitysPtr
 

Additional Inherited Members

- Public Types inherited from MoFEM::RefElement
typedef interface_RefEntity< RefEntityinterface_type_RefEntity
 
- Static Public Attributes inherited from MoFEM::RefElement
static BitRefEdges DummyBitRefEdges = BitRefEdges(0)
 
static const boost::shared_ptr< SideNumber > nullSideNumber
 

Detailed Description

keeps data about abstract TET finite element

Definition at line 89 of file FEMultiIndices.hpp.

Constructor & Destructor Documentation

◆ RefElement_TET()

MoFEM::RefElement_TET::RefElement_TET ( const boost::shared_ptr< RefEntity > &  ref_ent_ptr)

Definition at line 307 of file FEMultiIndices.cpp.

308  : RefElement(ref_ent_ptr), tag_BitRefEdges(NULL) {
309  Tag th_RefBitEdge;
310  moab::Interface &moab = getRefEntityPtr()->basicDataPtr->moab;
311  rval = moab.tag_get_handle("_RefBitEdge", th_RefBitEdge);
312  MOAB_THROW(rval);
313  rval = moab.tag_get_by_ptr(th_RefBitEdge, &ref_ent_ptr->ent, 1,
314  (const void **)&tag_BitRefEdges);
315  MOAB_THROW(rval);
316  switch (ref_ent_ptr->getEntType()) {
317  case MBTET:
318  break;
319  default:
320  THROW_MESSAGE("this work only for TETs");
321  }
323  .insert(
324  boost::shared_ptr<SideNumber>(new SideNumber(sPtr->ent, 0, 0, 0)));
325 }
boost::shared_ptr< RefEntity > sPtr
SideNumber_multiIndex side_number_table
multi_index_container< boost::shared_ptr< SideNumber >, indexed_by< hashed_unique< member< SideNumber, EntityHandle, &SideNumber::ent > >, ordered_non_unique< composite_key< SideNumber, const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType >, member< SideNumber, char, &SideNumber::side_number > > >, ordered_non_unique< const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType > > > > SideNumber_multiIndex
SideNumber_multiIndex for SideNumber.
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:618
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:600
BitRefEdges * tag_BitRefEdges
RefElement(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
boost::shared_ptr< RefEntity > & getRefEntityPtr() const
Get pointer to RefEntity.

Member Function Documentation

◆ getBitRefEdges()

const BitRefEdges& MoFEM::RefElement_TET::getBitRefEdges ( ) const
virtual

Reimplemented from MoFEM::RefElement.

Definition at line 98 of file FEMultiIndices.hpp.

98 { return *tag_BitRefEdges; }
BitRefEdges * tag_BitRefEdges

◆ getBitRefEdgesUlong()

int MoFEM::RefElement_TET::getBitRefEdgesUlong ( ) const
virtual

Reimplemented from MoFEM::RefElement.

Definition at line 99 of file FEMultiIndices.hpp.

99 { return getBitRefEdges().to_ulong(); }
const BitRefEdges & getBitRefEdges() const

◆ getSideNumberPtr()

const boost::shared_ptr< SideNumber > & MoFEM::RefElement_TET::getSideNumberPtr ( const EntityHandle  ent) const
virtual

Reimplemented from MoFEM::RefElement.

Definition at line 328 of file FEMultiIndices.cpp.

328  {
329  moab::Interface &moab = getRefEntityPtr()->basicDataPtr->moab;
330  SideNumber_multiIndex::iterator miit = side_number_table.find(ent);
331  if (miit != side_number_table.end())
332  return *miit;
333  if (sPtr->ent == ent) {
334  miit =
336  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
337  .first;
338  return *miit;
339  }
340  if (moab.type_from_handle(ent) == MBENTITYSET) {
341  miit =
343  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
344  .first;
345  return *miit;
346  }
347  int side_number, sense, offset;
348  rval = moab.side_number(sPtr->ent, ent, side_number, sense, offset);
349  MOAB_THROW(rval);
350  std::pair<SideNumber_multiIndex::iterator, bool> p_miit;
351  p_miit = const_cast<SideNumber_multiIndex &>(side_number_table)
352  .insert(boost::shared_ptr<SideNumber>(
353  new SideNumber(ent, side_number, sense, offset)));
354  miit = p_miit.first;
355  if (miit->get()->ent != ent) {
356  THROW_MESSAGE("this not working");
357  }
358  // std::cerr << side_number << " " << sense << " " << offset << std::endl;
359  return *miit;
360 }
boost::shared_ptr< RefEntity > sPtr
SideNumber_multiIndex side_number_table
multi_index_container< boost::shared_ptr< SideNumber >, indexed_by< hashed_unique< member< SideNumber, EntityHandle, &SideNumber::ent > >, ordered_non_unique< composite_key< SideNumber, const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType >, member< SideNumber, char, &SideNumber::side_number > > >, ordered_non_unique< const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType > > > > SideNumber_multiIndex
SideNumber_multiIndex for SideNumber.
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:618
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:600
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
boost::shared_ptr< RefEntity > & getRefEntityPtr() const
Get pointer to RefEntity.

◆ getSideNumberTable()

SideNumber_multiIndex& MoFEM::RefElement_TET::getSideNumberTable ( ) const

Definition at line 95 of file FEMultiIndices.hpp.

95  {
96  return const_cast<SideNumber_multiIndex &>(side_number_table);
97  };
SideNumber_multiIndex side_number_table
multi_index_container< boost::shared_ptr< SideNumber >, indexed_by< hashed_unique< member< SideNumber, EntityHandle, &SideNumber::ent > >, ordered_non_unique< composite_key< SideNumber, const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType >, member< SideNumber, char, &SideNumber::side_number > > >, ordered_non_unique< const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType > > > > SideNumber_multiIndex
SideNumber_multiIndex for SideNumber.

Member Data Documentation

◆ tag_BitRefEdges

BitRefEdges* MoFEM::RefElement_TET::tag_BitRefEdges

Definition at line 90 of file FEMultiIndices.hpp.

◆ tag_type_data

const int* MoFEM::RefElement_TET::tag_type_data

Definition at line 91 of file FEMultiIndices.hpp.


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