Minimal implementation of a BlockDataType for an OctreeBase.
More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/spin/OctreeBase.hpp>
Minimal implementation of a BlockDataType for an OctreeBase.
BlockData is default constructible and provides the following functions: isLeaf(), setInternal(), setNonBlock() and isBlock().
- Note
- This implementation uses ones-complement to differentiate between leaf and internal blocks. This has the nice properties that (a) all internal LeafData have an id with a negative number, (b) all BlockDatas – representing leaf and internal blocks can live in the same index space.
◆ BlockData() [1/2]
axom::spin::BlockData::BlockData |
( |
| ) |
|
|
inline |
◆ BlockData() [2/2]
axom::spin::BlockData::BlockData |
( |
const BlockData & |
other | ) |
|
|
inline |
◆ operator=()
◆ isLeaf()
bool axom::spin::BlockData::isLeaf |
( |
| ) |
const |
|
inline |
Predicate to determine if this BlockData represents a leaf block in the tree.
References m_id.
◆ setData()
void axom::spin::BlockData::setData |
( |
int |
blockID | ) |
|
|
inline |
Sets the data associated with this block.
References m_id.
◆ setNonBlock()
void axom::spin::BlockData::setNonBlock |
( |
| ) |
|
|
inline |
Marks the block as not in the octree
References m_id.
◆ isBlock()
bool axom::spin::BlockData::isBlock |
( |
| ) |
const |
|
inline |
Predicate to check if the associated block is in the octree
References m_id.
◆ getID()
int axom::spin::BlockData::getID |
( |
| ) |
const |
|
inline |
Returns the normalized form of the id for this BlockData instance
- Note
- The normalized form is a non-negative integer.
References isLeaf(), and m_id.
◆ dataIndex()
const int& axom::spin::BlockData::dataIndex |
( |
| ) |
const |
|
inline |
◆ setInternal()
void axom::spin::BlockData::setInternal |
( |
| ) |
|
|
inline |
Sets the block type to internal.
References isLeaf(), and m_id.
◆ operator==
Equality operator for comparing two BlockData instances
◆ m_id
int axom::spin::BlockData::m_id |
|
protected |
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/spin/OctreeBase.hpp