v0.14.0
Public Member Functions | Public Attributes | List of all members
MoFEM::RefElementVolume Struct Reference

keeps data about abstract TET finite element More...

#include <src/multi_indices/RefElementMultiIndices.hpp>

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

Public Member Functions

 RefElementVolume (const boost::shared_ptr< RefEntity > &ref_ents_ptr)
 
virtual ~RefElementVolume ()=default
 
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_ents_ptr)
 
virtual ~RefElement ()=default
 
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 ()=default
 
int getSideNumber () const
 
boost::shared_ptr< SideNumbergetSideNumberPtr () const
 Get the Side number. More...
 
const boost::shared_ptr< BasicEntityDatagetBasicDataPtr () const
 Get pointer to basic data struture. More...
 
EntityHandle getEnt () const
 Get the entity handle. More...
 
EntityType getParentEntType () const
 Get patent entity. More...
 
EntityHandle getParentEnt () const
 
BitRefLevelgetBitRefLevelPtr () const
 Get pointer to bit ref level tag. More...
 
const BitRefLevelgetBitRefLevel () const
 
unsigned long int getBitRefLevelULong () const
 Get entity ref bit refinement as ulong. More...
 
EntityType getEntType () const
 Get entity type. More...
 
int getEntDimension () const
 Get the Ent Dimension. More...
 
const char * getEntTypeName () const
 Get the Ent Type Name. More...
 
EntityID getEntId () const
 get entity id More...
 
EntityHandle getOwnerEnt () const
 
EntityHandlegetOwnerEnt ()
 
int getOwnerProc () const
 
int getPartProc () const
 
int * getPartProcPtr () const
 Get pointer to partition tag. More...
 
unsigned char getPStatus () const
 
int * getSharingProcsPtr () const
 get shared processors More...
 
EntityHandlegetSharingHandlersPtr () const
 get sharid entity handlers More...
 
boost::shared_ptr< RefEntity > & getRefEntityPtr () const
 

Public Attributes

BitRefEdgestag_BitRefEdges
 
- 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< SideNumbernullSideNumber
 

Detailed Description

keeps data about abstract TET finite element

Definition at line 81 of file RefElementMultiIndices.hpp.

Constructor & Destructor Documentation

◆ RefElementVolume()

MoFEM::RefElementVolume::RefElementVolume ( const boost::shared_ptr< RefEntity > &  ref_ents_ptr)

Definition at line 282 of file RefElementMultiIndices.cpp.

283  : RefElement(ref_ents_ptr), tag_BitRefEdges(NULL) {
284  Tag th_RefBitEdge;
285  moab::Interface &moab = getRefEntityPtr()->getBasicDataPtr()->moab;
286  rval = moab.tag_get_handle("_RefBitEdge", th_RefBitEdge);
287  MOAB_THROW(rval);
288  rval = moab.tag_get_by_ptr(th_RefBitEdge, &ref_ents_ptr->ent, 1,
289  (const void **)&tag_BitRefEdges);
290  MOAB_THROW(rval);
291  switch (ref_ents_ptr->getEntType()) {
292  case MBTET:
293  case MBHEX:
294  break;
295  default:
296  THROW_MESSAGE("this work only for TETs or HEXs");
297  }
299  .insert(boost::make_shared<SideNumber>(sPtr->ent, 0, 0, 0));
300 }

◆ ~RefElementVolume()

virtual MoFEM::RefElementVolume::~RefElementVolume ( )
virtualdefault

Member Function Documentation

◆ getBitRefEdges()

const BitRefEdges& MoFEM::RefElementVolume::getBitRefEdges ( ) const
inlinevirtual

Reimplemented from MoFEM::RefElement.

Definition at line 91 of file RefElementMultiIndices.hpp.

91 { return *tag_BitRefEdges; }

◆ getBitRefEdgesUlong()

int MoFEM::RefElementVolume::getBitRefEdgesUlong ( ) const
inlinevirtual

Reimplemented from MoFEM::RefElement.

Definition at line 92 of file RefElementMultiIndices.hpp.

92 { return getBitRefEdges().to_ulong(); }

◆ getSideNumberPtr()

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

Reimplemented from MoFEM::RefElement.

Definition at line 303 of file RefElementMultiIndices.cpp.

303  {
304  moab::Interface &moab = getRefEntityPtr()->getBasicDataPtr()->moab;
305  auto miit = side_number_table.find(ent);
306  if (miit != side_number_table.end())
307  return *miit;
308  if (sPtr->ent == ent) {
309  miit = const_cast<SideNumber_multiIndex &>(side_number_table)
310  .insert(boost::make_shared<SideNumber>(ent, 0, 0, 0))
311  .first;
312  return *miit;
313  }
314  if (type_from_handle(ent) == MBENTITYSET) {
315  miit = const_cast<SideNumber_multiIndex &>(side_number_table)
316  .insert(boost::make_shared<SideNumber>(ent, 0, 0, 0))
317  .first;
318  return *miit;
319  }
320  int side_number, sense, offset;
321  rval = moab.side_number(sPtr->ent, ent, side_number, sense, offset);
322  MOAB_THROW(rval);
323  auto p_miit = const_cast<SideNumber_multiIndex &>(side_number_table)
324  .insert(boost::make_shared<SideNumber>(ent, side_number,
325  sense, offset));
326  miit = p_miit.first;
327  if (miit->get()->ent != ent)
328  THROW_MESSAGE("this not working");
329 
330  return *miit;
331 }

◆ getSideNumberTable()

SideNumber_multiIndex& MoFEM::RefElementVolume::getSideNumberTable ( ) const
inline

Definition at line 88 of file RefElementMultiIndices.hpp.

88  {
89  return const_cast<SideNumber_multiIndex &>(side_number_table);
90  };

Member Data Documentation

◆ tag_BitRefEdges

BitRefEdges* MoFEM::RefElementVolume::tag_BitRefEdges

Definition at line 82 of file RefElementMultiIndices.hpp.


The documentation for this struct was generated from the following files:
MoFEM::RefElement::RefElement
RefElement(const boost::shared_ptr< RefEntity > &ref_ents_ptr)
Definition: RefElementMultiIndices.cpp:15
MoFEM::RefElementVolume::tag_BitRefEdges
BitRefEdges * tag_BitRefEdges
Definition: RefElementMultiIndices.hpp:82
MoFEM::interface_RefEntity< RefEntity >::sPtr
boost::shared_ptr< RefEntity > sPtr
Definition: RefEntsMultiIndices.hpp:711
MOAB_THROW
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:554
THROW_MESSAGE
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:574
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
MoFEM::RefElementVolume::getBitRefEdges
const BitRefEdges & getBitRefEdges() const
Definition: RefElementMultiIndices.hpp:91
MoFEM::Exceptions::rval
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
SideNumber_multiIndex
multi_index_container< boost::shared_ptr< SideNumber >, indexed_by< ordered_unique< member< SideNumber, EntityHandle, &SideNumber::ent > >, ordered_non_unique< composite_key< SideNumber, const_mem_fun< SideNumber, EntityType, &SideNumber::getEntType >, member< SideNumber, signed char, &SideNumber::side_number > > > > > SideNumber_multiIndex
SideNumber_multiIndex for SideNumber.
Definition: RefEntsMultiIndices.hpp:101
MoFEM::RefElement::getRefEntityPtr
boost::shared_ptr< RefEntity > & getRefEntityPtr() const
Get pointer to RefEntity.
Definition: RefElementMultiIndices.hpp:45
MoFEM::type_from_handle
auto type_from_handle(const EntityHandle h)
get type from entity handle
Definition: Templates.hpp:1898
MoFEM::RefElement::side_number_table
SideNumber_multiIndex side_number_table
Definition: RefElementMultiIndices.hpp:22