v0.14.0
RefEntsMultiIndices.cpp
Go to the documentation of this file.
1 /** \file RefEntsMultiIndices.cpp
2  * \brief Multi-index containers for entities
3  */
4 
5 
6 #define IS_BUILDING_MB
7 #include <moab/Error.hpp>
8 
9 namespace MoFEM {
10 
12  const int pcomm_id)
13  : moab(const_cast<moab::Interface &>(moab)), pcommID(pcomm_id) {
14  rval = moab.tag_get_handle("_RefParentHandle", th_RefParentHandle);
16  rval = moab.tag_get_handle("_RefBitLevel", th_RefBitLevel);
18  rval = moab.tag_get_handle("_MeshsetPartition", th_MeshsetPart);
20 }
21 
22 boost::weak_ptr<BasicEntityData> RefEntityTmp<0>::basicDataPtr;
23 boost::weak_ptr<RefElement> RefEntityTmp<0>::refElementPtr;
24 
26  const boost::shared_ptr<BasicEntityData> &basic_data_ptr,
27  const EntityHandle ent)
28  : ent(ent) {
29  entParentTagPtr = static_cast<EntityHandle *>(get_tag_ptr(
30  basic_data_ptr->moab, basic_data_ptr->th_RefParentHandle, ent, NULL));
31 }
32 
34  const boost::shared_ptr<BasicEntityData> &basic_data_ptr,
35  const EntityHandle ent, EntityHandle *ent_parent_tag_ptr)
36  : ent(ent), entParentTagPtr(ent_parent_tag_ptr) {}
37 
39  return getRefElementPtr()->getSideNumberPtr(ent)->side_number;
40 }
41 
42 boost::shared_ptr<SideNumber> RefEntityTmp<0>::getSideNumberPtr() const {
43  return getRefElementPtr()->getSideNumberPtr(ent);
44 }
45 
46 std::ostream &operator<<(std::ostream &os, const RefEntity &e) {
47  os << "ent " << e.ent;
48  os << " pstatus " << std::bitset<8>(e.getPStatus());
49  os << " owner ent " << e.getOwnerEnt();
50  os << " owner proc " << e.getOwnerProc();
51  os << " parent ent " << e.getParentEnt();
52  os << " ent type " << e.getEntTypeName();
53  os << " ent parent type " << e.getParentEntType();
54  return os;
55 }
56 
57 } // namespace MoFEM
MoFEM::RefEntityTmp< 0 >::getParentEnt
static MoFEMErrorCode getParentEnt(Interface &moab, Range ents, std::vector< EntityHandle > vec_patent_ent)
MoFEM::operator<<
std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
Definition: EntitiesFieldData.cpp:240
MoFEM::RefEntityTmp< 0 >::ent
EntityHandle ent
Definition: RefEntsMultiIndices.hpp:521
MoFEM::get_tag_ptr
void * get_tag_ptr(moab::Interface &moab, Tag th, EntityHandle ent, int *tag_size)
Get the tag ptr object.
Definition: RefEntsMultiIndices.hpp:40
EntityHandle
MoFEM::RefEntityTmp< 0 >
Struct keeps handle to refined handle.
Definition: RefEntsMultiIndices.hpp:141
MoFEM::RefEntityTmp< 0 >::getPStatus
unsigned char getPStatus() const
get pstatus This tag stores various aspects of parallel status in bits; see also define following,...
Definition: RefEntsMultiIndices.hpp:333
MOAB_THROW
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:541
MoFEM::BasicEntityData::th_RefBitLevel
Tag th_RefBitLevel
Definition: RefEntsMultiIndices.hpp:111
MoFEM::BasicEntityData::th_RefParentHandle
Tag th_RefParentHandle
Definition: RefEntsMultiIndices.hpp:110
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1975
MoFEM::RefEntityTmp< 0 >::getParentEntType
EntityType getParentEntType() const
Get patent entity.
Definition: RefEntsMultiIndices.hpp:499
MoFEM::Exceptions::rval
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
MoFEM::BasicEntityData::th_MeshsetPart
Tag th_MeshsetPart
Definition: RefEntsMultiIndices.hpp:112
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::RefEntityTmp< 0 >::getOwnerProc
static int getOwnerProc(const EntityHandle ent, boost::shared_ptr< BasicEntityData > basic_ent_data)
Definition: RefEntsMultiIndices.hpp:245
MoFEM::RefEntityTmp< 0 >::getOwnerEnt
static EntityHandle getOwnerEnt(const EntityHandle ent, boost::shared_ptr< BasicEntityData > basic_ent_data)
Definition: RefEntsMultiIndices.hpp:208
MoFEM::BasicEntityData::moab
moab::Interface & moab
Definition: RefEntsMultiIndices.hpp:108
MoFEM::RefEntityTmp< 0 >::getEntTypeName
const char * getEntTypeName() const
Get the Ent Type Name.
Definition: RefEntsMultiIndices.hpp:199
MoFEM::RefEntityTmp
Definition: RefEntsMultiIndices.hpp:118
MoFEM::BasicEntityData::BasicEntityData
BasicEntityData(const moab::Interface &mfield, const int pcomm_id=MYPCOMM_INDEX)
Definition: RefEntsMultiIndices.cpp:11