v0.8.13
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 105 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 308 of file FEMultiIndices.cpp.

309  : RefElement(ref_ent_ptr), tag_BitRefEdges(NULL) {
310  ErrorCode rval;
311  Tag th_RefBitEdge;
312  moab::Interface &moab = getRefEntityPtr()->basicDataPtr->moab;
313  rval = moab.tag_get_handle("_RefBitEdge", th_RefBitEdge);
314  MOAB_THROW(rval);
315  rval = moab.tag_get_by_ptr(th_RefBitEdge, &ref_ent_ptr->ent, 1,
316  (const void **)&tag_BitRefEdges);
317  MOAB_THROW(rval);
318  switch (ref_ent_ptr->getEntType()) {
319  case MBTET:
320  break;
321  default:
322  THROW_MESSAGE("this work only for TETs");
323  }
325  .insert(
326  boost::shared_ptr<SideNumber>(new SideNumber(sPtr->ent, 0, 0, 0)));
327 }
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:638
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:620
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 114 of file FEMultiIndices.hpp.

114 { return *tag_BitRefEdges; }
BitRefEdges * tag_BitRefEdges

◆ getBitRefEdgesUlong()

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

Reimplemented from MoFEM::RefElement.

Definition at line 115 of file FEMultiIndices.hpp.

115 { 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 330 of file FEMultiIndices.cpp.

330  {
331  moab::Interface &moab = getRefEntityPtr()->basicDataPtr->moab;
332  SideNumber_multiIndex::iterator miit = side_number_table.find(ent);
333  if (miit != side_number_table.end())
334  return *miit;
335  if (sPtr->ent == ent) {
336  miit =
338  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
339  .first;
340  return *miit;
341  }
342  if (moab.type_from_handle(ent) == MBENTITYSET) {
343  miit =
345  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
346  .first;
347  return *miit;
348  }
349  ErrorCode rval;
350  int side_number, sense, offset;
351  rval = moab.side_number(sPtr->ent, ent, side_number, sense, offset);
352  MOAB_THROW(rval);
353  std::pair<SideNumber_multiIndex::iterator, bool> p_miit;
354  p_miit = const_cast<SideNumber_multiIndex &>(side_number_table)
355  .insert(boost::shared_ptr<SideNumber>(
356  new SideNumber(ent, side_number, sense, offset)));
357  miit = p_miit.first;
358  if (miit->get()->ent != ent) {
359  THROW_MESSAGE("this not working");
360  }
361  // std::cerr << side_number << " " << sense << " " << offset << std::endl;
362  return *miit;
363 }
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:638
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:620
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 111 of file FEMultiIndices.hpp.

111  {
112  return const_cast<SideNumber_multiIndex &>(side_number_table);
113  };
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 106 of file FEMultiIndices.hpp.

◆ tag_type_data

const int* MoFEM::RefElement_TET::tag_type_data

Definition at line 107 of file FEMultiIndices.hpp.


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