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/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.
|
inlinevirtual |
Virtual destructor of an OctreeLevel.
|
inline |
Returns the maximum coordinate value in the level.
References axom::spin::OctreeLevel< DIM, BlockDataType >::m_level.
|
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.
|
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().
|
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.
|
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.
|
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.
|
pure virtual |
Virtual function to check the status of a block (e.g. Leaf, Internal, NotInTree)
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
|
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 >.
|
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 >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
|
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 >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
|
pure virtual |
Virtual const accessor for the data associated with grid point pt.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
|
pure virtual |
Virtual accessor for the data associated with grid point pt.
Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
|
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 >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
|
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 >, and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >.
|
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 >.
|
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 >.
|
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 >.
|
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 >.
|
protected |