v0.14.0
Loading...
Searching...
No Matches
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
9namespace MoFEM {
10
11BasicEntityData::BasicEntityData(const moab::Interface &moab,
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
22boost::weak_ptr<BasicEntityData> RefEntityTmp<0>::basicDataPtr;
23boost::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
42boost::shared_ptr<SideNumber> RefEntityTmp<0>::getSideNumberPtr() const {
43 return getRefElementPtr()->getSideNumberPtr(ent);
44}
45
46std::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
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:541
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
void * get_tag_ptr(moab::Interface &moab, Tag th, EntityHandle ent, int *tag_size)
Get the tag ptr object.
BasicEntityData(const moab::Interface &mfield, const int pcomm_id=MYPCOMM_INDEX)
Deprecated interface functions.
Struct keeps handle to refined handle.
const char * getEntTypeName() const
Get the Ent Type Name.
EntityType getParentEntType() const
Get patent entity.
unsigned char getPStatus() const
get pstatus This tag stores various aspects of parallel status in bits; see also define following,...
static EntityHandle getOwnerEnt(const EntityHandle ent, boost::shared_ptr< BasicEntityData > basic_ent_data)
static int getOwnerProc(const EntityHandle ent, boost::shared_ptr< BasicEntityData > basic_ent_data)
static MoFEMErrorCode getParentEnt(Interface &moab, Range ents, std::vector< EntityHandle > vec_patent_ent)