v0.14.0 |
Managing BitRefLevels. More...
Files | |
file | BitRefManager.hpp |
Interface managing BitRefLevels. | |
Setting and shifting bits | |
MoFEMErrorCode | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::setElementsBitRefLevel (const Range &ents, const BitRefLevel bit=BitRefLevel(), int verb=QUIET) const |
add entities to database and set bit ref level More... | |
MoFEMErrorCode | MoFEM::BitRefManager::setEntitiesBitRefLevel (const Range &ents, const BitRefLevel bit=BitRefLevel(), int verb=QUIET) const |
add entities to database and set bit ref level More... | |
MoFEMErrorCode | MoFEM::BitRefManager::setBitLevelToMeshset (const EntityHandle meshset, const BitRefLevel bit, int verb=0) const |
MoFEMErrorCode | MoFEM::BitRefManager::addBitRefLevel (const Range &ents, const BitRefLevel &bit, int verb=QUIET) const |
add bit ref level to ref entity More... | |
MoFEMErrorCode | MoFEM::BitRefManager::setNthBitRefLevel (const int n, const bool b, int verb=QUIET) const |
Set nth bit ref level to all entities in database. More... | |
MoFEMErrorCode | MoFEM::BitRefManager::shiftLeftBitRef (const int shift, const BitRefLevel mask=BitRefLevel().set(), int verb=DEFAULT_VERBOSITY) const |
left shift bit ref level More... | |
MoFEMErrorCode | MoFEM::BitRefManager::shiftRightBitRef (const int shift, const BitRefLevel mask=BitRefLevel().set(), int verb=DEFAULT_VERBOSITY, MoFEMTypes mf=MF_ZERO) const |
right shift bit ref level More... | |
MoFEMErrorCode | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::setBitRefLevelByDim (const EntityHandle meshset, const int dim, const BitRefLevel bit, int verb=QUIET) const |
Set the Bit Ref Level By Dim object. More... | |
MoFEMErrorCode | MoFEM::BitRefManager::setBitRefLevelByType (const EntityHandle meshset, const EntityType type, const BitRefLevel bit, int verb=QUIET) const |
Set the Bit Ref Level By Type object. More... | |
MoFEMErrorCode | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::lambdaBitRefLevel (boost::function< void(EntityHandle ent, BitRefLevel &bit)> fun) const |
Process bit ref level by lambda function. More... | |
MoFEMErrorCode | MoFEM::BitRefManager::lambdaBitRefLevel (const Range &ents, boost::function< void(EntityHandle ent, BitRefLevel &bit)> fun) const |
Process bit ref level by lambda function. More... | |
MoFEMErrorCode | MoFEM::BitRefManager::addBitRefLevelByDim (const EntityHandle meshset, const int dim, const BitRefLevel bit, int verb=QUIET) const |
add bit ref level by dimension More... | |
MoFEMErrorCode | MoFEM::BitRefManager::setNthBitRefLevel (const Range &ents, const int n, const bool b, int verb=QUIET) const |
Set nth bit ref level. More... | |
Entity handlers by bit ref level | |
MoFEMErrorCode | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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... | |
Get adjacencies bit ref level | |
virtual MoFEMErrorCode | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::updateFieldMeshsetByEntitiesChildren (const BitRefLevel &child_bit, int verb=0) |
update fields meshesets by child entities More... | |
MoFEMErrorCode | MoFEM::BitRefManager::updateFieldMeshsetByEntitiesChildren (const std::string name, const BitRefLevel &child_bit, int verb=0) |
update field meshset by child entities More... | |
MoFEMErrorCode | MoFEM::BitRefManager::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 | MoFEM::BitRefManager::updateRangeByChildren (const Range &parent, Range &child, MoFEMTypes bh=MF_ZERO) |
Update range by childrens. More... | |
MoFEMErrorCode | MoFEM::BitRefManager::updateRangeByParent (const Range &child_ents, Range &parent_ents, MoFEMTypes bh=MF_ZERO) |
Update range by parents. More... | |
DEPRECATED MoFEMErrorCode | MoFEM::BitRefManager::updateRange (const Range &parent, Range &child, MoFEMTypes bh=MF_ZERO) |
Managing BitRefLevels.
MoFEMErrorCode MoFEM::BitRefManager::addBitRefLevel | ( | const Range & | ents, |
const BitRefLevel & | bit, | ||
int | verb = QUIET |
||
) | const |
add bit ref level to ref entity
ents | range of entities |
bit | bit ref level |
verb | verbosity level |
Definition at line 554 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::addBitRefLevelByDim | ( | const EntityHandle | meshset, |
const int | dim, | ||
const BitRefLevel | bit, | ||
int | verb = QUIET |
||
) | const |
add bit ref level by dimension
meshset | |
dim | dimension of entities |
bit | added bit |
verb | verbosity level |
Definition at line 561 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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.
dim | dimension of entity |
bit | bit ref level |
verb | verbosity level |
Definition at line 463 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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.
type | of entity |
bit | bit ref level |
mask | |
verb | verbosity level |
Definition at line 453 of file BitRefManager.cpp.
|
virtual |
Get the adjacencies associated with a entity to entities of a specified dimension.
bit ref level of adjacent entities is equal to bit ref level of adjacent entities
Definition at line 988 of file BitRefManager.cpp.
|
virtual |
Get the adjacencies associated with a entity to entities of a specified dimension.
bit ref level of adjacent entities is equal to bit ref level of adjacent entities
Definition at line 977 of file BitRefManager.cpp.
|
virtual |
Get the adjacencies associated with a entity to entities of a specified dimension.
bit ref level of adjacent entities is any of bit ref level of adjacent entities
Definition at line 951 of file BitRefManager.cpp.
|
virtual |
Get the adjacencies associated with a entity to entities of a specified dimension.
bit ref level of adjacent entities is equal to bit ref level of adjacent entities
Definition at line 925 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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
BitRefLevel | bitLevel |
BitRefLevel | mask |
EntityType | dimension of entities |
ents |
Definition at line 822 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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
BitRefLevel | bitLevel |
BitRefLevel | mask |
EntityType | dimension of entities |
ents |
Definition at line 834 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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
BitRefLevel | bitLevel |
BitRefLevel | mask |
EntityHandle | meshset |
Definition at line 845 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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
BitRefLevel | bitLevel |
BitRefLevel | mask |
ents |
Definition at line 858 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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
BitRefLevel | bitLevel |
BitRefLevel | mask |
EntityType | type of entities |
EntityHandle | meshset |
Definition at line 734 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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
BitRefLevel | bitLevel |
BitRefLevel | mask |
EntityType | type of entities |
ents |
Definition at line 811 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::lambdaBitRefLevel | ( | boost::function< void(EntityHandle ent, BitRefLevel &bit)> | fun | ) | const |
Process bit ref level by lambda function.
fun |
Definition at line 524 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::lambdaBitRefLevel | ( | const Range & | ents, |
boost::function< void(EntityHandle ent, BitRefLevel &bit)> | fun | ||
) | const |
Process bit ref level by lambda function.
fun |
Definition at line 539 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::setBitLevelToMeshset | ( | const EntityHandle | meshset, |
const BitRefLevel | bit, | ||
int | verb = 0 |
||
) | const |
brief add meshset and set bit ref level
EntityHandle | MeshSet |
BitRefLevel | bitLevel |
Definition at line 473 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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
This function set bit ref level, add entries to core database and create ref finite elements. Finite elements are create of entities in function argument, whereas all lower dimension entities are added as a field entities
So entities 1,2,3 would be assigned to bit level 0 and 1
ent1[1,1,0,0,0,0,0], ent2[1,1,0,0,0,0,0], ent3[1,1,0,0,0,0,0],
and entities 4 and 5 are assigned to bit level 1 only
ent4[0,1,0,0,0,0,0], ent5[0,1,0,0,0,0,0]
ents | entities to set |
bit | bit refinement level |
only_tets | only add entities on tetrahedral (obsolete need to be fixed) |
verb | verbosity level |
adj_ents_ptr | if pointer is given, it is used to get adj entities by dimension/type |
Definition at line 279 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::setBitRefLevelByDim | ( | const EntityHandle | meshset, |
const int | dim, | ||
const BitRefLevel | bit, | ||
int | verb = QUIET |
||
) | const |
Set the Bit Ref Level By Dim object.
meshset | |
dim | |
bit | |
verb |
Definition at line 499 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::setBitRefLevelByType | ( | const EntityHandle | meshset, |
const EntityType | type, | ||
const BitRefLevel | bit, | ||
int | verb = QUIET |
||
) | const |
Set the Bit Ref Level By Type object.
meshset | |
type | |
bit | |
verb |
Definition at line 512 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::setElementsBitRefLevel | ( | const Range & | ents, |
const BitRefLevel | bit = BitRefLevel() , |
||
int | verb = QUIET |
||
) | const |
add entities to database and set bit ref level
ents | |
bit | |
only_tets | |
verb |
Definition at line 376 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::setEntitiesBitRefLevel | ( | const Range & | ents, |
const BitRefLevel | bit = BitRefLevel() , |
||
int | verb = QUIET |
||
) | const |
add entities to database and set bit ref level
ents | |
bit | |
only_tets | |
verb |
Definition at line 416 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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.
field_name | |
bit | |
verb |
Definition at line 441 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::setNthBitRefLevel | ( | const int | n, |
const bool | b, | ||
int | verb = QUIET |
||
) | const |
Set nth bit ref level to all entities in database.
n | nth bit |
b | value to set |
Definition at line 587 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::setNthBitRefLevel | ( | const Range & | ents, |
const int | n, | ||
const bool | b, | ||
int | verb = QUIET |
||
) | const |
Set nth bit ref level.
ents | entities to set bit ref level |
n | nth bit |
b | value to set |
Definition at line 579 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::shiftLeftBitRef | ( | const int | shift, |
const BitRefLevel | mask = BitRefLevel().set() , |
||
int | verb = DEFAULT_VERBOSITY |
||
) | const |
left shift bit ref level
this results of deletion of entities on far left side
Definition at line 595 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::shiftRightBitRef | ( | const int | shift, |
const BitRefLevel | mask = BitRefLevel().set() , |
||
int | verb = DEFAULT_VERBOSITY , |
||
MoFEMTypes | mf = MF_ZERO |
||
) | const |
MoFEMErrorCode MoFEM::BitRefManager::updateFieldMeshsetByEntitiesChildren | ( | const BitRefLevel & | child_bit, |
int | verb = 0 |
||
) |
update fields meshesets by child entities
Definition at line 1065 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::updateFieldMeshsetByEntitiesChildren | ( | const std::string | name, |
const BitRefLevel & | child_bit, | ||
int | verb = 0 |
||
) |
MoFEMErrorCode MoFEM::BitRefManager::updateFiniteElementMeshsetByEntitiesChildren | ( | const std::string | name, |
const BitRefLevel & | child_bit, | ||
const EntityType | fe_ent_type, | ||
int | verb = 0 |
||
) |
MoFEMErrorCode MoFEM::BitRefManager::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.
Search for refined entities of given type whose parent are entities in the parent meshset. It can be used for example to transfer information about boundary conditions to refined mesh or split mesh by interface elements. It is used by function refineMeshset, to update MESHSET finite elements.
parent | meshset |
parent_bit | refinement level |
mask | of parent bit ref level |
child_bit | refinement level |
mask | of child bit ref level |
child | meshset where child entities are stored (if the child meshset is set to be the parent meshset, the parent would be updated with the refined entities) |
child_type | meshset is update only by entities of specified type. if type is set to MBMAXTYPE all types are updated. |
recursive | if true parent meshset is searched recursively |
Definition at line 1054 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::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.
Search for refined entities of given type whose parent are entities in the parent meshset. It can be used for example to transfer information about boundary conditions to refined mesh or split mesh by interface elements. It is used by function refineMeshset, to update MESHSET finite elements.
parent | meshset |
parent_bit | refinement level |
mask | of parent bit ref level |
child_bit | refinement level |
mask | of child bit ref level |
child | meshset where child entities are stored (if the child meshset is set to be the parent meshset, the parent would be updated with the refined entities) |
child_type | meshset is update only by entities of specified type. if type is set to MBMAXTYPE all types are updated. |
recursive | if true parent meshset is searched recursively |
Definition at line 1029 of file BitRefManager.cpp.
|
inline |
Definition at line 598 of file BitRefManager.hpp.
MoFEMErrorCode MoFEM::BitRefManager::updateRangeByChildren | ( | const Range & | parent, |
Range & | child, | ||
MoFEMTypes | bh = MF_ZERO |
||
) |
Update range by childrens.
FIXME: NOT TESTED
parent | parent range |
child | children range |
Definition at line 1144 of file BitRefManager.cpp.
MoFEMErrorCode MoFEM::BitRefManager::updateRangeByParent | ( | const Range & | child_ents, |
Range & | parent_ents, | ||
MoFEMTypes | bh = MF_ZERO |
||
) |
Update range by parents.
FIXME: NOT TESTED
child | parent range |
parent | children range |
Definition at line 1187 of file BitRefManager.cpp.