v0.8.23
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/FEMultiIndices.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_ent_ptr)
 
const boost::shared_ptr< SideNumber > & getSideNumberPtr (const EntityHandle ent) const
 
- Public Member Functions inherited from MoFEM::RefElement
 RefElement (const boost::shared_ptr< RefEntity > &ref_ent_ptr)
 
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 ()
 
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
 

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< SideNumber > nullSideNumber
 

Detailed Description

keeps data about abstract EDGE finite element

Definition at line 117 of file FEMultiIndices.hpp.

Constructor & Destructor Documentation

◆ RefElement_EDGE()

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

Definition at line 422 of file FEMultiIndices.cpp.

424  : RefElement(ref_ent_ptr) {
425  switch (ref_ent_ptr->getEntType()) {
426  case MBEDGE:
427  break;
428  default:
429  THROW_MESSAGE("this work only for TRIs");
430  }
431 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:619
RefElement(const boost::shared_ptr< RefEntity > &ref_ent_ptr)

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 433 of file FEMultiIndices.cpp.

433  {
434  moab::Interface &moab = getRefEntityPtr()->basicDataPtr->moab;
435  SideNumber_multiIndex::iterator miit = side_number_table.find(ent);
436  if (miit != side_number_table.end())
437  return *miit;
438  if (sPtr->ent == ent) {
439  miit =
440  const_cast<SideNumber_multiIndex &>(side_number_table)
441  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
442  .first;
443  return *miit;
444  }
445  if (moab.type_from_handle(ent) == MBENTITYSET) {
446  miit =
447  const_cast<SideNumber_multiIndex &>(side_number_table)
448  .insert(boost::shared_ptr<SideNumber>(new SideNumber(ent, 0, 0, 0)))
449  .first;
450  return *miit;
451  }
452  int side_number, sense, offset;
453  rval = moab.side_number(sPtr->ent, ent, side_number, sense, offset);
454  MOAB_THROW(rval);
455  miit = const_cast<SideNumber_multiIndex &>(side_number_table)
456  .insert(boost::shared_ptr<SideNumber>(
457  new SideNumber(ent, side_number, sense, offset)))
458  .first;
459  // std::cerr << side_number << " " << sense << " " << offset << std::endl;
460  return *miit;
461 }
boost::shared_ptr< RefEntity > sPtr
SideNumber_multiIndex side_number_table
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:601
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
boost::shared_ptr< RefEntity > & getRefEntityPtr() const
Get pointer to RefEntity.

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 462 of file FEMultiIndices.cpp.

462  {
463  os << *e.sPtr;
464  return os;
465 }

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