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/v0.6.0/src/axom/spin/DenseOctreeLevel.hpp>
Classes | |
class | IteratorHelper |
Concrete instance of the BlockIteratorHelper class defined in the OctreeLevel base class. More... | |
Public Types | |
using | Base = OctreeLevel< DIM, BlockDataType > |
using | GridPt = typename Base::GridPt |
using | BroodData = typename Base::BroodData |
using | BaseBlockIteratorHelper = typename Base::BlockIteratorHelper |
using | ConstBaseBlockIteratorHelper = typename Base::ConstBlockIteratorHelper |
using | IterHelper = IteratorHelper< DenseOctreeLevel, BaseBlockIteratorHelper > |
using | ConstIterHelper = IteratorHelper< const DenseOctreeLevel, ConstBaseBlockIteratorHelper > |
using | BroodType = Brood< GridPt, MortonIndexType > |
enum | { BROOD_SIZE = 1 << DIM } |
using | CoordType = axom::IndexType |
using | BlockIter = BlockIterator< OctreeLevel, BlockIteratorHelper, BlockDataType > |
using | ConstBlockIter = BlockIterator< const OctreeLevel, ConstBlockIteratorHelper, const BlockDataType > |
Public Member Functions | |
DenseOctreeLevel (int level=-1) | |
Default constructor for an octree level. More... | |
~DenseOctreeLevel () | |
BaseBlockIteratorHelper * | getIteratorHelper (bool begin) |
Factory function to return a GridBlockIterHelper for this level. More... | |
ConstBaseBlockIteratorHelper * | getIteratorHelper (bool begin) const |
Factory function to return a ConstGridBlockIterHelper 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... | |
virtual TreeBlockStatus | blockStatus (const GridPt &pt) const =0 |
Virtual function to check the status of a block (e.g. Leaf, Internal, NotInTree) More... | |
virtual bool | hasBlock (const GridPt &pt) const =0 |
Virtual predicate to determine if the OctreeLevel has a block with the given grid point pt. More... | |
virtual void | addAllChildren (const GridPt &pt)=0 |
Virtual function to add all children of the given grid point pt to the OctreeLevel. More... | |
virtual const BlockDataType & | operator[] (const GridPt &pt) const =0 |
Virtual const accessor for the data associated with grid point pt. More... | |
virtual BlockDataType & | operator[] (const GridPt &pt)=0 |
Virtual accessor for the data associated with grid point pt. More... | |
virtual BroodData & | getBroodData (const GridPt &pt)=0 |
Virtual accessor for the data associated with all children of the given grid point (i.e. the brood) More... | |
virtual const BroodData & | getBroodData (const GridPt &pt) const =0 |
Virtual const accessor for the data associated with all children of the given grid point (i.e. the brood) More... | |
Protected Attributes | |
int | m_level |
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::Base = OctreeLevel<DIM, BlockDataType> |
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::GridPt = typename Base::GridPt |
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::BroodData = typename Base::BroodData |
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::BaseBlockIteratorHelper = typename Base::BlockIteratorHelper |
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::ConstBaseBlockIteratorHelper = typename Base::ConstBlockIteratorHelper |
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::IterHelper = IteratorHelper<DenseOctreeLevel, BaseBlockIteratorHelper> |
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::ConstIterHelper = IteratorHelper<const DenseOctreeLevel, ConstBaseBlockIteratorHelper> |
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::BroodType = Brood<GridPt, MortonIndexType> |
|
inherited |
The coordinate type of a block in the octree
|
inherited |
|
inherited |
|
inline |
Default constructor for an octree level.
References axom::spin::OctreeLevel< DIM, BlockDataType >::BROOD_SIZE, and axom::spin::OctreeLevel< DIM, BlockDataType >::level().
|
inline |
|
inlinevirtual |
Factory function to return a GridBlockIterHelper 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 >.
|
inlinevirtual |
Factory function to return a ConstGridBlockIterHelper 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 >.
|
inline |
Predicate to check whether the block associated with the given GridPt pt is in the current level.
References axom::spin::Brood< GridPt, MortonIndexType >::base(), and axom::spin::Brood< GridPt, MortonIndexType >::offset().
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::operator[]().
|
inline |
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 |
References axom::spin::OctreeLevel< DIM, BlockDataType >::BROOD_SIZE, axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::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.
|
inline |
Accessor for the data associated with pt.
References axom::spin::Brood< GridPt, MortonIndexType >::base(), and axom::spin::Brood< GridPt, MortonIndexType >::offset().
|
inline |
Const accessor for the data associated with pt.
References axom::spin::Brood< GridPt, MortonIndexType >::base(), axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::hasBlock(), axom::spin::OctreeLevel< DIM, BlockDataType >::m_level, axom::spin::Brood< GridPt, MortonIndexType >::offset(), and SLIC_ASSERT_MSG.
|
inline |
Access the data associated with the entire brood.
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren().
|
inline |
Const access to data associated with the entire brood.
|
inlinevirtual |
Predicate to check if there are any blocks in this octree level.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::numLeafBlocks().
|
inlinevirtual |
Returns the number of blocks (internal and leaf) in the level.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::numInternalBlocks().
|
inlinevirtual |
Returns the number of internal blocks in the level.
Implements axom::spin::OctreeLevel< DIM, BlockDataType >.
References axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::numBlocks(), and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::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::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::empty(), and axom::spin::OctreeLevel< DIM, BlockDataType >::isLeaf().
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::numInternalBlocks().
|
inline |
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 |
References axom::spin::Brood< GridPt, MortonIndexType >::base(), axom::spin::BlockNotInTree, DISABLE_COPY_AND_ASSIGNMENT, DISABLE_MOVE_AND_ASSIGNMENT, axom::spin::OctreeLevel< DIM, BlockDataType >::inBounds(), axom::spin::InternalBlock, axom::spin::LeafBlock, and axom::spin::Brood< GridPt, MortonIndexType >::offset().
|
inlineinherited |
Returns the maximum coordinate value in the level.
References axom::spin::OctreeLevel< DIM, BlockDataType >::m_level.
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren(), axom::spin::OctreeLevel< DIM, BlockDataType >::inBounds(), and axom::spin::OctreeLevel< DIM, BlockDataType >::maxGridCell().
|
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.
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren(), and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::DenseOctreeLevel().
|
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().
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren(), and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::blockStatus().
|
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.
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::numLeafBlocks().
|
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.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::BlockIterator< OctreeLevel, IterHelper, DataType >::BlockIterator().
|
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.
References axom::spin::OctreeLevel< DIM, BlockDataType >::addAllChildren(), axom::spin::OctreeLevel< DIM, BlockDataType >::blockStatus(), axom::spin::OctreeLevel< DIM, BlockDataType >::empty(), axom::spin::OctreeLevel< DIM, BlockDataType >::getBroodData(), axom::spin::OctreeLevel< DIM, BlockDataType >::getIteratorHelper(), axom::spin::OctreeLevel< DIM, BlockDataType >::hasBlock(), axom::spin::OctreeLevel< DIM, BlockDataType >::numBlocks(), axom::spin::OctreeLevel< DIM, BlockDataType >::numInternalBlocks(), axom::spin::OctreeLevel< DIM, BlockDataType >::numLeafBlocks(), axom::spin::OctreeLevel< DIM, BlockDataType >::operator[](), and axom::spin::OctreeLevel< DIM, BlockDataType >::BlockIteratorHelper::pt().
|
pure virtualinherited |
Virtual function to check the status of a block (e.g. Leaf, Internal, NotInTree)
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end(), axom::spin::OctreeLevel< DIM, BlockDataType >::isInternal(), and axom::spin::OctreeLevel< DIM, BlockDataType >::isLeaf().
|
pure virtualinherited |
Virtual predicate to determine if the OctreeLevel has a block with the given grid point pt.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end().
|
pure virtualinherited |
Virtual function to add all children of the given grid point pt to the OctreeLevel.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end(), and axom::spin::OctreeBase< DIM, InOutBlockData >::refineLeaf().
|
pure virtualinherited |
Virtual const accessor for the data associated with grid point pt.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end().
|
pure virtualinherited |
Virtual accessor for the data associated with grid point pt.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.
|
pure virtualinherited |
Virtual accessor for the data associated with all children of the given grid point (i.e. the brood)
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end().
|
pure virtualinherited |
Virtual const accessor for the data associated with all children of the given grid point (i.e. the brood)
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.
|
protectedinherited |
Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren(), axom::spin::OctreeLevel< DIM, BlockDataType >::level(), axom::spin::OctreeLevel< DIM, BlockDataType >::maxCoord(), and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::operator[]().