![]() |
v0.14.0 |
Managing BitRefLevels. More...
#include <src/interfaces/BitRefManager.hpp>
Public Member Functions | |
MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const |
BitRefManager (const MoFEM::Core &core) | |
virtual | ~BitRefManager ()=default |
Destructor. More... | |
![]() | |
virtual MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const =0 |
template<class IFACE > | |
MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
Register interface. More... | |
template<class IFACE > | |
MoFEMErrorCode | getInterface (IFACE *&iface) const |
Get interface refernce to pointer of interface. More... | |
template<class IFACE > | |
MoFEMErrorCode | getInterface (IFACE **const iface) const |
Get interface pointer to pointer of interface. More... | |
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> | |
IFACE | getInterface () const |
Get interface pointer to pointer of interface. More... | |
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> | |
IFACE | getInterface () const |
Get reference to interface. More... | |
template<class IFACE > | |
IFACE * | getInterface () const |
Function returning pointer to interface. More... | |
virtual | ~UnknownInterface ()=default |
Public Attributes | |
MoFEM::Core & | cOre |
bool | dEbug |
Setting and shifting bits | |
MoFEMErrorCode | setBitRefLevel (const Range &ents, const BitRefLevel bit, const bool only_tets=true, int verb=0, Range *adj_ents_ptr=nullptr) const |
add entities to database and set bit ref level More... | |
MoFEMErrorCode | setElementsBitRefLevel (const Range &ents, const BitRefLevel bit=BitRefLevel(), int verb=QUIET) const |
add entities to database and set bit ref level More... | |
MoFEMErrorCode | setEntitiesBitRefLevel (const Range &ents, const BitRefLevel bit=BitRefLevel(), int verb=QUIET) const |
add entities to database and set bit ref level More... | |
MoFEMErrorCode | setFieldEntitiesBitRefLevel (const std::string field_name, const BitRefLevel bit=BitRefLevel(), int verb=QUIET) const |
Set the bit ref level to entities in the field meshset. More... | |
MoFEMErrorCode | setBitRefLevelByDim (const EntityHandle meshset, const int dim, const BitRefLevel bit, int verb=QUIET) const |
Set the Bit Ref Level By Dim object. More... | |
MoFEMErrorCode | setBitRefLevelByType (const EntityHandle meshset, const EntityType type, const BitRefLevel bit, int verb=QUIET) const |
Set the Bit Ref Level By Type object. More... | |
MoFEMErrorCode | setBitLevelToMeshset (const EntityHandle meshset, const BitRefLevel bit, int verb=0) const |
MoFEMErrorCode | addToDatabaseBitRefLevelByType (const EntityType type, const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), int verb=QUIET) const |
Add entities which exist in MoAB database, and have set appropiate BitRef level tag, to multi-indices in MoFEM. More... | |
MoFEMErrorCode | addToDatabaseBitRefLevelByDim (const int dim, const BitRefLevel bit, const BitRefLevel mask=BitRefLevel().set(), int verb=QUIET) const |
Add entities which exist in MoAB database, and have set appropiate BitRef level tag, to multi-indices in MoFEM. More... | |
MoFEMErrorCode | lambdaBitRefLevel (boost::function< void(EntityHandle ent, BitRefLevel &bit)> fun) const |
Process bit ref level by lambda function. More... | |
MoFEMErrorCode | lambdaBitRefLevel (const Range &ents, boost::function< void(EntityHandle ent, BitRefLevel &bit)> fun) const |
Process bit ref level by lambda function. More... | |
MoFEMErrorCode | addBitRefLevel (const Range &ents, const BitRefLevel &bit, int verb=QUIET) const |
add bit ref level to ref entity More... | |
MoFEMErrorCode | addBitRefLevelByDim (const EntityHandle meshset, const int dim, const BitRefLevel bit, int verb=QUIET) const |
add bit ref level by dimension More... | |
MoFEMErrorCode | setNthBitRefLevel (const Range &ents, const int n, const bool b, int verb=QUIET) const |
Set nth bit ref level. More... | |
MoFEMErrorCode | setNthBitRefLevel (const int n, const bool b, int verb=QUIET) const |
Set nth bit ref level to all entities in database. More... | |
MoFEMErrorCode | shiftLeftBitRef (const int shift, const BitRefLevel mask=BitRefLevel().set(), int verb=DEFAULT_VERBOSITY) const |
left shift bit ref levelthis results of deletion of entities on far left side More... | |
MoFEMErrorCode | shiftRightBitRef (const int shift, const BitRefLevel mask=BitRefLevel().set(), int verb=DEFAULT_VERBOSITY, MoFEMTypes mf=MF_ZERO) const |
right shift bit ref level More... | |
Entity handlers by bit ref level | |
MoFEMErrorCode | filterEntitiesByRefLevel (const BitRefLevel bit, const BitRefLevel mask, Range &ents, int verb=QUIET) const |
filter entities by bit ref level More... | |
MoFEMErrorCode | getEntitiesByTypeAndRefLevel (const BitRefLevel bit, const BitRefLevel mask, const EntityType type, const EntityHandle meshset, int verb=0) const |
add all ents from ref level given by bit to meshset More... | |
MoFEMErrorCode | getEntitiesByTypeAndRefLevel (const BitRefLevel bit, const BitRefLevel mask, const EntityType type, Range &ents, int verb=0) const |
add all ents from ref level given by bit to meshset More... | |
MoFEMErrorCode | getEntitiesByDimAndRefLevel (const BitRefLevel bit, const BitRefLevel mask, const int dim, const EntityHandle meshset, int verb=0) const |
add all ents from ref level given by bit to meshset More... | |
MoFEMErrorCode | getEntitiesByDimAndRefLevel (const BitRefLevel bit, const BitRefLevel mask, const int dim, Range &ents, int verb=0) const |
add all ents from ref level given by bit to meshset More... | |
MoFEMErrorCode | getEntitiesByRefLevel (const BitRefLevel bit, const BitRefLevel mask, const EntityHandle meshset, const int verb=QUIET) const |
add all ents from ref level given by bit to meshset More... | |
MoFEMErrorCode | getEntitiesByRefLevel (const BitRefLevel bit, const BitRefLevel mask, Range &ents, const int verb=QUIET) const |
add all ents from ref level given by bit to meshset More... | |
MoFEMErrorCode | getEntitiesByParentType (const BitRefLevel bit, const BitRefLevel mask, const EntityType type, Range &ents, const int verb=QUIET) const |
get entities by bit ref level and type of parent More... | |
MoFEMErrorCode | getAllEntitiesNotInDatabase (Range &ents) const |
Get all entities not in database. More... | |
MoFEMErrorCode | filterEntitiesNotInDatabase (Range &ents) const |
Get entities not in database. More... | |
Get adjacencies bit ref level | |
virtual MoFEMErrorCode | getAdjacenciesEquality (const EntityHandle from_entity, const int to_dimension, Range &adj_entities) const |
Get the adjacencies associated with a entity to entities of a specified dimension. More... | |
virtual MoFEMErrorCode | getAdjacenciesAny (const EntityHandle from_entity, const int to_dimension, Range &adj_entities) const |
Get the adjacencies associated with a entity to entities of a specified dimension. More... | |
virtual MoFEMErrorCode | getAdjacencies (const Problem *problem_ptr, const EntityHandle *from_entities, const int num_entities, const int to_dimension, Range &adj_entities, const int operation_type=moab::Interface::INTERSECT, const int verb=0) const |
Get the adjacencies associated with a entity to entities of a specified dimension. More... | |
virtual MoFEMErrorCode | getAdjacencies (const BitRefLevel bit, const EntityHandle *from_entities, const int num_entities, const int to_dimension, Range &adj_entities, const int operation_type=moab::Interface::INTERSECT, const int verb=0) const |
Get the adjacencies associated with a entity to entities of a specified dimension. More... | |
Update meshsets and ranges by children | |
MoFEMErrorCode | updateMeshsetByEntitiesChildren (const EntityHandle parent, const BitRefLevel &parent_bit, const BitRefLevel &parent_mask, const BitRefLevel &child_bit, const BitRefLevel &child_mask, const EntityHandle child, EntityType child_type, const bool recursive=false, int verb=0) |
Get child entities form meshset containing parent entities. More... | |
MoFEMErrorCode | updateMeshsetByEntitiesChildren (const EntityHandle parent, const BitRefLevel &child_bit, const EntityHandle child, EntityType child_type, const bool recursive=false, int verb=0) |
Get child entities form meshset containing parent entities. More... | |
MoFEMErrorCode | updateFieldMeshsetByEntitiesChildren (const BitRefLevel &child_bit, int verb=0) |
update fields meshesets by child entities More... | |
MoFEMErrorCode | updateFieldMeshsetByEntitiesChildren (const std::string name, const BitRefLevel &child_bit, int verb=0) |
update field meshset by child entities More... | |
MoFEMErrorCode | updateFiniteElementMeshsetByEntitiesChildren (const std::string name, const BitRefLevel &child_bit, const EntityType fe_ent_type, int verb=0) |
update finite element meshset by child entities More... | |
MoFEMErrorCode | updateRangeByChildren (const Range &parent, Range &child, MoFEMTypes bh=MF_ZERO) |
Update range by childrens. More... | |
MoFEMErrorCode | updateRangeByParent (const Range &child_ents, Range &parent_ents, MoFEMTypes bh=MF_ZERO) |
Update range by parents. More... | |
DEPRECATED MoFEMErrorCode | updateRange (const Range &parent, Range &child, MoFEMTypes bh=MF_ZERO) |
Writing files | |
MoFEMErrorCode | writeBitLevel (const BitRefLevel bit, const BitRefLevel mask, const char *file_name, const char *file_type, const char *options, const bool check_for_empty=true) const |
Write bit ref level to file. More... | |
MoFEMErrorCode | writeBitLevelByDim (const BitRefLevel bit, const BitRefLevel mask, const int dim, const char *file_name, const char *file_type, const char *options, const bool check_for_empty=true) const |
Write bit ref level to file. More... | |
MoFEMErrorCode | writeBitLevelByType (const BitRefLevel bit, const BitRefLevel mask, const EntityType type, const char *file_name, const char *file_type, const char *options, const bool check_for_empty=true) const |
Write bit ref level to file. More... | |
MoFEMErrorCode | writeEntitiesNotInDatabase (const char *file_name, const char *file_type, const char *options, const bool check_for_empty=true) const |
Write ents not in database. More... | |
MoFEMErrorCode | writeEntitiesAllBitLevelsByType (const BitRefLevel mask, const EntityType type, const char *file_name, const char *file_type, const char *options) |
Write all entities by bit levels and type. More... | |
Get tag handles to data on the mesh | |
Tag | get_th_RefParentHandle () const |
Tag | get_th_RefBitLevel () const |
static MoFEMErrorCode | fixTagSize (moab::Interface &moab, bool *changed=nullptr) |
Fix tag size when BITREFLEVEL_SIZE of core library is different than file BITREFLEVEL_SIZE. More... | |
Additional Inherited Members | |
![]() | |
static MoFEMErrorCode | getLibVersion (Version &version) |
Get library version. More... | |
static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
Get database major version. More... | |
static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
Get database major version. More... | |
static MoFEMErrorCode | getInterfaceVersion (Version &version) |
Get database major version. More... | |
Managing BitRefLevels.
Definition at line 21 of file BitRefManager.hpp.
MoFEM::BitRefManager::BitRefManager | ( | const MoFEM::Core & | core | ) |
Definition at line 16 of file BitRefManager.cpp.
|
virtualdefault |
Destructor.
MoFEMErrorCode MoFEM::BitRefManager::filterEntitiesByRefLevel | ( | const BitRefLevel | bit, |
const BitRefLevel | mask, | ||
Range & | ents, | ||
int | verb = QUIET |
||
) | const |
filter entities by bit ref level
bit | |
mask | |
ents | |
QUIET |
Definition at line 746 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::filterEntitiesNotInDatabase | ( | Range & | ents | ) | const |
Get entities not in database.
ents |
Definition at line 908 of file BitRefManager.cpp.
|
static |
Fix tag size when BITREFLEVEL_SIZE of core library is different than file BITREFLEVEL_SIZE.
Definition at line 1232 of file BitRefManager.cpp.
|
inline |
Definition at line 709 of file BitRefManager.hpp.
|
inline |
Definition at line 706 of file BitRefManager.hpp.
MoFEMErrorCode MoFEM::BitRefManager::getAllEntitiesNotInDatabase | ( | Range & | ents | ) | const |
Get all entities not in database.
ents |
Definition at line 898 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::getEntitiesByParentType | ( | const BitRefLevel | bit, |
const BitRefLevel | mask, | ||
const EntityType | type, | ||
Range & | ents, | ||
const int | verb = QUIET |
||
) | const |
get entities by bit ref level and type of parent
BitRefLevel | bitLevel |
BitRefLevel | mask |
type | of parent |
ents | returned ents |
Definition at line 873 of file BitRefManager.cpp.
|
virtual |
Implements MoFEM::UnknownInterface.
Definition at line 9 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::writeBitLevel | ( | const BitRefLevel | bit, |
const BitRefLevel | mask, | ||
const char * | file_name, | ||
const char * | file_type, | ||
const char * | options, | ||
const bool | check_for_empty = true |
||
) | const |
Write bit ref level to file.
bit | bit ref level |
mask | mask of bit ref level |
dim | dimension |
file_name | file name (see moab documentation) |
file_type | file type (see moab documentation) |
options | file options (see moab documentation) |
Definition at line 634 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::writeBitLevelByDim | ( | const BitRefLevel | bit, |
const BitRefLevel | mask, | ||
const int | dim, | ||
const char * | file_name, | ||
const char * | file_type, | ||
const char * | options, | ||
const bool | check_for_empty = true |
||
) | const |
Write bit ref level to file.
bit | bit ref level |
mask | mask of bit ref level |
dim | dimension |
file_name | file name (see moab documentation) |
file_type | file type (see moab documentation) |
options | file options (see moab documentation) |
Definition at line 660 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::writeBitLevelByType | ( | const BitRefLevel | bit, |
const BitRefLevel | mask, | ||
const EntityType | type, | ||
const char * | file_name, | ||
const char * | file_type, | ||
const char * | options, | ||
const bool | check_for_empty = true |
||
) | const |
Write bit ref level to file.
bit | bit ref level |
mask | mask of bit ref level |
type | type of entity |
file_name | file name (see moab documentation) |
file_type | file type (see moab documentation) |
options | file options (see moab documentation) |
Definition at line 682 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::writeEntitiesAllBitLevelsByType | ( | const BitRefLevel | mask, |
const EntityType | type, | ||
const char * | file_name, | ||
const char * | file_type, | ||
const char * | options | ||
) |
Write all entities by bit levels and type.
mask | |
type | |
file_name | |
file_type | |
options |
Definition at line 722 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::writeEntitiesNotInDatabase | ( | const char * | file_name, |
const char * | file_type, | ||
const char * | options, | ||
const bool | check_for_empty = true |
||
) | const |
Write ents not in database.
file_name | |
file_type | for example "VTK" |
options | |
check_for_empty |
Definition at line 704 of file BitRefManager.cpp.
MoFEM::Core& MoFEM::BitRefManager::cOre |
Definition at line 26 of file BitRefManager.hpp.
bool MoFEM::BitRefManager::dEbug |
Definition at line 27 of file BitRefManager.hpp.