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.3.3/src/axom/spin/OctreeLevel.hpp>
Classes | |
class | BlockIterator |
class | BlockIteratorHelper |
A virtual base class to help with iteration of an OctreeLevel's blocks. More... | |
class | ConstBlockIteratorHelper |
A virtual base class to help with constant iteration of an OctreeLevel's blocks. More... | |
Public Types | |
enum | { BROOD_SIZE = 1 << DIM } |
using | CoordType = axom::IndexType |
using | GridPt = primal::Point< CoordType, DIM > |
A type for the grid points of the octree. More... | |
using | BroodData = primal::NumericArray< BlockDataType, BROOD_SIZE > |
using | BlockIter = BlockIterator< OctreeLevel, BlockIteratorHelper, BlockDataType > |
using | ConstBlockIter = BlockIterator< const OctreeLevel, ConstBlockIteratorHelper, const BlockDataType > |
Public Member Functions | |
OctreeLevel (int level=-1) | |
Constructor of an OctreeLevel at level lev. More... | |
virtual | ~OctreeLevel () |
Virtual destructor of an OctreeLevel. 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 | empty () const =0 |
Virtual predicate to determine if the OctreeLevel is empty. 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... | |
virtual BlockIteratorHelper * | getIteratorHelper (bool)=0 |
Virtual factory function to create an iterator helper. More... | |
virtual ConstBlockIteratorHelper * | getIteratorHelper (bool) const =0 |
Virtual factory function to create a const iterator helper. More... | |
virtual int | numBlocks () const =0 |
Virtual function to compute the number of blocks (internal and leaf) in the level. More... | |
virtual int | numInternalBlocks () const =0 |
Virtual function to compute the number of internal blocks in the level. More... | |
virtual int | numLeafBlocks () const =0 |
Virtual function to compute the number of leaf blocks in the level. More... | |
Protected Attributes | |
int | m_level |
using axom::spin::OctreeLevel< DIM, BlockDataType >::CoordType = axom::IndexType |
The coordinate type of a block in the octree
using axom::spin::OctreeLevel< DIM, BlockDataType >::GridPt = primal::Point<CoordType,DIM> |
A type for the grid points of the octree.
using axom::spin::OctreeLevel< DIM, BlockDataType >::BroodData = primal::NumericArray< BlockDataType, BROOD_SIZE> |
A brood is a collection of sibling blocks that are generated simultaneously
using axom::spin::OctreeLevel< DIM, BlockDataType >::BlockIter = BlockIterator<OctreeLevel, BlockIteratorHelper, BlockDataType> |
using axom::spin::OctreeLevel< DIM, BlockDataType >::ConstBlockIter = BlockIterator<const OctreeLevel, ConstBlockIteratorHelper, const BlockDataType> |
|
inline |
Constructor of an OctreeLevel at level lev.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::ConstBlockIteratorHelper::~ConstBlockIteratorHelper().
|
inlinevirtual |
Virtual destructor of an OctreeLevel.
|
inline |
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().
|
inline |
Returns a GridPt whose coordinates are set to maxCoord.
References axom::spin::OctreeLevel< DIM, BlockDataType >::maxCoord().
|
inline |
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().
|
inline |
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().
|
inline |
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().
|
inline |
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.
|
inline |
Begin iterator to points and data in tree level.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::BlockIterator< OctreeLevel, IterHelper, DataType >::BlockIterator().
|
inline |
Const begin iterator to points and data in tree level.
|
inline |
End iterator to points and data in tree level.
|
inline |
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 virtual |
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 virtual |
Virtual predicate to determine if the OctreeLevel is empty.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end().
|
pure virtual |
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 virtual |
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 virtual |
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 virtual |
Virtual accessor for the data associated with grid point pt.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.
|
pure virtual |
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 virtual |
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 >.
|
pure virtual |
Virtual factory function to create an iterator helper.
A | boolean to determine if the iterator should be a begin iterator (true) or an end iterator (false) |
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::BlockIterator< OctreeLevel, IterHelper, DataType >::BlockIterator(), and axom::spin::OctreeLevel< DIM, BlockDataType >::end().
|
pure virtual |
Virtual factory function to create a const iterator helper.
A | boolean to determine if the iterator should be a begin iterator (true) or an end iterator (false) |
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
|
pure virtual |
Virtual function to compute the number of blocks (internal and leaf) in the level.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end().
|
pure virtual |
Virtual function to compute the number of internal blocks in the level.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end().
|
pure virtual |
Virtual function to compute the number of leaf blocks in the level.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
Referenced by axom::spin::OctreeLevel< DIM, BlockDataType >::end().
|
protected |
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[]().