v0.14.0
Public Member Functions | Friends | List of all members
MoFEM::RefElement_EDGE Struct Reference

keeps data about abstract EDGE finite element More...

#include <src/multi_indices/RefElementMultiIndices.hpp>

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

Public Member Functions

 RefElement_EDGE (const boost::shared_ptr< RefEntity > &ref_ents_ptr)
 
virtual ~RefElement_EDGE ()=default
 
const boost::shared_ptr< SideNumber > & getSideNumberPtr (const EntityHandle ent) const
 
- Public Member Functions inherited from MoFEM::RefElement
 RefElement (const boost::shared_ptr< RefEntity > &ref_ents_ptr)
 
virtual ~RefElement ()=default
 
virtual const BitRefEdgesgetBitRefEdges () const
 
virtual int getBitRefEdgesUlong () const
 
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
 

Friends

std::ostream & operator<< (std::ostream &os, const RefElement_EDGE &e)
 

Additional Inherited Members

- Public Types inherited from MoFEM::RefElement
typedef interface_RefEntity< RefEntityinterface_type_RefEntity
 
- Public Attributes inherited from MoFEM::RefElement
SideNumber_multiIndex side_number_table
 
- Public Attributes inherited from MoFEM::interface_RefEntity< RefEntity >
boost::shared_ptr< RefEntitysPtr
 
- Static Public Attributes inherited from MoFEM::RefElement
static BitRefEdges DummyBitRefEdges = BitRefEdges(0)
 
static const boost::shared_ptr< SideNumbernullSideNumber
 

Detailed Description

keeps data about abstract EDGE finite element

Definition at line 111 of file RefElementMultiIndices.hpp.

Constructor & Destructor Documentation

◆ RefElement_EDGE()

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

Definition at line 412 of file RefElementMultiIndices.cpp.

414  : RefElement(ref_ents_ptr) {
415  switch (ref_ents_ptr->getEntType()) {
416  case MBEDGE:
417  break;
418  default:
419  THROW_MESSAGE("this work only for TRIs");
420  }
421 }

◆ ~RefElement_EDGE()

virtual MoFEM::RefElement_EDGE::~RefElement_EDGE ( )
virtualdefault

Member Function Documentation

◆ getSideNumberPtr()

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

Reimplemented from MoFEM::RefElement.

Definition at line 423 of file RefElementMultiIndices.cpp.

423  {
424  moab::Interface &moab = getRefEntityPtr()->getBasicDataPtr()->moab;
425  SideNumber_multiIndex::iterator miit = side_number_table.find(ent);
426  if (miit != side_number_table.end())
427  return *miit;
428  if (sPtr->ent == ent) {
429  miit =
431  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
432  .first;
433  return *miit;
434  }
435  if (type_from_handle(ent) == MBENTITYSET) {
436  miit =
438  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
439  .first;
440  return *miit;
441  }
442  int side_number, sense, offset;
443  rval = moab.side_number(sPtr->ent, ent, side_number, sense, offset);
444  MOAB_THROW(rval);
445  miit = const_cast<SideNumber_multiIndex &>(side_number_table)
446  .insert(boost::shared_ptr<SideNumber>(
447  new SideNumber(ent, side_number, sense, offset)))
448  .first;
449  // std::cerr << side_number << " " << sense << " " << offset << std::endl;
450  return *miit;
451 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const RefElement_EDGE e 
)
friend

Definition at line 452 of file RefElementMultiIndices.cpp.

452  {
453  os << *e.sPtr;
454  return os;
455 }

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::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::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