v0.8.23
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 293 of file FEMultiIndices.cpp.

294  : RefElement(ref_ent_ptr), tag_BitRefEdges(NULL) {
295  Tag th_RefBitEdge;
296  moab::Interface &moab = getRefEntityPtr()->basicDataPtr->moab;
297  rval = moab.tag_get_handle("_RefBitEdge", th_RefBitEdge);
298  MOAB_THROW(rval);
299  rval = moab.tag_get_by_ptr(th_RefBitEdge, &ref_ent_ptr->ent, 1,
300  (const void **)&tag_BitRefEdges);
301  MOAB_THROW(rval);
302  switch (ref_ent_ptr->getEntType()) {
303  case MBTET:
304  break;
305  default:
306  THROW_MESSAGE("this work only for TETs");
307  }
308  const_cast<SideNumber_multiIndex &>(side_number_table)
309  .insert(
310  boost::shared_ptr<SideNumber>(new SideNumber(sPtr->ent, 0, 0, 0)));
311 }
boost::shared_ptr< RefEntity > sPtr
SideNumber_multiIndex side_number_table
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:602
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
BitRefEdges * tag_BitRefEdges
RefElement(const boost::shared_ptr< RefEntity > &ref_ent_ptr)
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 314 of file FEMultiIndices.cpp.

314  {
315  moab::Interface &moab = getRefEntityPtr()->basicDataPtr->moab;
316  SideNumber_multiIndex::iterator miit = side_number_table.find(ent);
317  if (miit != side_number_table.end())
318  return *miit;
319  if (sPtr->ent == ent) {
320  miit =
321  const_cast<SideNumber_multiIndex &>(side_number_table)
322  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
323  .first;
324  return *miit;
325  }
326  if (moab.type_from_handle(ent) == MBENTITYSET) {
327  miit =
328  const_cast<SideNumber_multiIndex &>(side_number_table)
329  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
330  .first;
331  return *miit;
332  }
333  int side_number, sense, offset;
334  rval = moab.side_number(sPtr->ent, ent, side_number, sense, offset);
335  MOAB_THROW(rval);
336  std::pair<SideNumber_multiIndex::iterator, bool> p_miit;
337  p_miit = const_cast<SideNumber_multiIndex &>(side_number_table)
338  .insert(boost::shared_ptr<SideNumber>(
339  new SideNumber(ent, side_number, sense, offset)));
340  miit = p_miit.first;
341  if (miit->get()->ent != ent) {
342  THROW_MESSAGE("this not working");
343  }
344  // std::cerr << side_number << " " << sense << " " << offset << std::endl;
345  return *miit;
346 }
boost::shared_ptr< RefEntity > sPtr
SideNumber_multiIndex side_number_table
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:602
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
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

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: