AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/spin/SparseOctreeLevel.hpp>
Classes | |
class | IteratorHelper |
Concrete instance of the BlockIteratorHelper class defined in the OctreeLevel base class. More... | |
Public Member Functions | |
SparseOctreeLevel (int level=-1) | |
Default constructor for an octree level. More... | |
BaseBlockIteratorHelper * | getIteratorHelper (bool begin) |
Factory function to return a SparseBlockIterHelper for this level. More... | |
ConstBaseBlockIteratorHelper * | getIteratorHelper (bool begin) const |
Factory function to return a ConstSparseBlockIterHelper for this level. More... | |
bool | hasBlock (const GridPt &pt) const |
Predicate to check whether the block associated with the given GridPt pt is in the current level. More... | |
void | addAllChildren (const GridPt &pt) |
Adds all children of the given grid point to the octree level. More... | |
BlockDataType & | operator[] (const GridPt &pt) |
Accessor for the data associated with pt. More... | |
const BlockDataType & | operator[] (const GridPt &pt) const |
Const accessor for the data associated with pt. More... | |
BroodData & | getBroodData (const GridPt &pt) |
Access the data associated with the entire brood. More... | |
const BroodData & | getBroodData (const GridPt &pt) const |
Const access to data associated with the entire brood. More... | |
bool | empty () const |
Predicate to check if there are any blocks in this octree level. More... | |
int | numBlocks () const |
Returns the number of blocks (internal and leaf) in the level. More... | |
int | numInternalBlocks () const |
Returns the number of internal blocks in the level. More... | |
int | numLeafBlocks () const |
Returns the number of leaf blocks in the level. More... | |
TreeBlockStatus | blockStatus (const GridPt &pt) const |
Helper function to determine the status of an octree block within this octree level. More... | |
CoordType | maxCoord () const |
Returns the maximum coordinate value in the level. More... | |
GridPt | maxGridCell () const |
Returns a GridPt whose coordinates are set to maxCoord. More... | |
int | level () const |
bool | inBounds (const GridPt &pt) const |
Predicate to check whether the block associated with the given GridPt pt is an allowed block in the level. More... | |
bool | isLeaf (const GridPt &pt) const |
Predicate to check whether the block associated with the given GridPt pt is a leaf block. More... | |
bool | isInternal (const GridPt &pt) const |
Predicate to check whether the block associated with the given GridPt pt is an internal block. More... | |
BlockIter | begin () |
Begin iterator to points and data in tree level. More... | |
ConstBlockIter | begin () const |
Const begin iterator to points and data in tree level. More... | |
BlockIter | end () |
End iterator to points and data in tree level. More... | |
ConstBlockIter | end () const |
Const end iterator to points and data in tree level. More... | |
Protected Attributes | |
int | m_level |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::Base = OctreeLevel<DIM, BlockDataType> |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::GridPt = typename Base::GridPt |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::BroodData = typename Base::BroodData |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::BaseBlockIteratorHelper = typename Base::BlockIteratorHelper |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::ConstBaseBlockIteratorHelper = typename Base::ConstBlockIteratorHelper |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::BroodTraits = BroodRepresentationTraits<typename GridPt::CoordType, GridPt::DIMENSION, BroodData, PointRepresenationType> |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::MapType = typename BroodTraits::MapType |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::BroodType = typename BroodTraits::BroodType |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::MapIter = typename MapType::iterator |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::ConstMapIter = typename MapType::const_iterator |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::IterHelper = IteratorHelper<SparseOctreeLevel, MapIter, BaseBlockIteratorHelper> |
using axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::ConstIterHelper = IteratorHelper<const SparseOctreeLevel, ConstMapIter, ConstBaseBlockIteratorHelper> |
|
inherited |
The coordinate type of a block in the octree
|
inherited |
|
inherited |
|
inline |
Default constructor for an octree level.
References axom::spin::BroodRepresentationTraits< CoordType, DIM, BroodDataType, RepresentationType >::initializeMap().
|
inlinevirtual |
Factory function to return a SparseBlockIterHelper for this level.
begin | A boolean to determine if this is to be a begin (true) or end (false) iterator |
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::OctreeLevel< DIM, BlockDataType >::begin().
|
inlinevirtual |
Factory function to return a ConstSparseBlockIterHelper for this level.
begin | A boolean to determine if this is to be a begin (true) or end (false) iterator |
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::OctreeLevel< DIM, BlockDataType >::begin().
|
inlinevirtual |
Predicate to check whether the block associated with the given GridPt pt is in the current level.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
|
inlinevirtual |
Adds all children of the given grid point to the octree level.
[in] | pt | The gridPoint associated with the parent of the children that are being added |
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::OctreeLevel< DIM, BlockDataType >::BROOD_SIZE, axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::getBroodData(), axom::spin::OctreeLevel< DIM, BlockDataType >::inBounds(), axom::spin::OctreeLevel< DIM, BlockDataType >::level(), axom::spin::OctreeLevel< DIM, BlockDataType >::m_level, axom::spin::OctreeLevel< DIM, BlockDataType >::maxCoord(), and SLIC_ASSERT_MSG.
|
inlinevirtual |
Accessor for the data associated with pt.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
|
inlinevirtual |
Const accessor for the data associated with pt.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::hasBlock(), axom::spin::OctreeLevel< DIM, BlockDataType >::m_level, and SLIC_ASSERT_MSG.
|
inlinevirtual |
Access the data associated with the entire brood.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::BroodRepresentationTraits< CoordType, DIM, BroodDataType, RepresentationType >::convertPoint().
|
inlinevirtual |
Const access to data associated with the entire brood.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::BroodRepresentationTraits< CoordType, DIM, BroodDataType, RepresentationType >::convertPoint(), axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::hasBlock(), axom::spin::OctreeLevel< DIM, BlockDataType >::m_level, and SLIC_ASSERT_MSG.
|
inlinevirtual |
Predicate to check if there are any blocks in this octree level.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
|
inlinevirtual |
Returns the number of blocks (internal and leaf) in the level.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::OctreeLevel< DIM, BlockDataType >::BROOD_SIZE, axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::empty(), and axom::spin::OctreeLevel< DIM, BlockDataType >::m_level.
|
inlinevirtual |
Returns the number of internal blocks in the level.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::numBlocks(), and axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::numLeafBlocks().
|
inlinevirtual |
Returns the number of leaf blocks in the level.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::OctreeLevel< DIM, BlockDataType >::BROOD_SIZE, axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >::empty(), and axom::spin::OctreeLevel< DIM, BlockDataType >::isLeaf().
|
inlinevirtual |
Helper function to determine the status of an octree block within this octree level.
pt | The grid point of the block index that we are testing |
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::BlockNotInTree, axom::spin::InternalBlock, and axom::spin::LeafBlock.
|
inlineinherited |
Returns the maximum coordinate value in the level.
References axom::spin::OctreeLevel< DIM, BlockDataType >::m_level.
|
inlineinherited |
Returns a GridPt whose coordinates are set to maxCoord.
References axom::spin::OctreeLevel< DIM, BlockDataType >::maxCoord().
|
inlineinherited |
Accessor for the instance's level
References axom::spin::OctreeLevel< DIM, BlockDataType >::m_level.
|
inlineinherited |
Predicate to check whether the block associated with the given GridPt pt is an allowed block in the level.
[in] | pt | The gridpoint of the block to check |
References axom::spin::OctreeLevel< DIM, BlockDataType >::maxCoord().
|
inlineinherited |
Predicate to check whether the block associated with the given GridPt pt is a leaf block.
References axom::spin::OctreeLevel< DIM, BlockDataType >::blockStatus(), and axom::spin::LeafBlock.
|
inlineinherited |
Predicate to check whether the block associated with the given GridPt pt is an internal block.
References axom::spin::OctreeLevel< DIM, BlockDataType >::blockStatus(), and axom::spin::InternalBlock.
|
inlineinherited |
Begin iterator to points and data in tree level.
|
inlineinherited |
Const begin iterator to points and data in tree level.
|
inlineinherited |
End iterator to points and data in tree level.
|
inlineinherited |
Const end iterator to points and data in tree level.
|
protectedinherited |