AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType > Class Template Referenceabstract

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/spin/DenseOctreeLevel.hpp>

Inheritance diagram for axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >:

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 ()
 
BaseBlockIteratorHelpergetIteratorHelper (bool begin)
 Factory function to return a GridBlockIterHelper for this level. More...
 
ConstBaseBlockIteratorHelpergetIteratorHelper (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...
 
BroodDatagetBroodData (const GridPt &pt)
 Access the data associated with the entire brood. More...
 
const BroodDatagetBroodData (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 BroodDatagetBroodData (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 BroodDatagetBroodData (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
 

Member Typedef Documentation

◆ Base

template<int DIM, typename BlockDataType , typename MortonIndexType >
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::Base = OctreeLevel<DIM, BlockDataType>

◆ GridPt

template<int DIM, typename BlockDataType , typename MortonIndexType >
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::GridPt = typename Base::GridPt

◆ BroodData

template<int DIM, typename BlockDataType , typename MortonIndexType >
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::BroodData = typename Base::BroodData

◆ BaseBlockIteratorHelper

template<int DIM, typename BlockDataType , typename MortonIndexType >
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::BaseBlockIteratorHelper = typename Base::BlockIteratorHelper

◆ ConstBaseBlockIteratorHelper

template<int DIM, typename BlockDataType , typename MortonIndexType >
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::ConstBaseBlockIteratorHelper = typename Base::ConstBlockIteratorHelper

◆ IterHelper

template<int DIM, typename BlockDataType , typename MortonIndexType >
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::IterHelper = IteratorHelper<DenseOctreeLevel, BaseBlockIteratorHelper>

◆ ConstIterHelper

template<int DIM, typename BlockDataType , typename MortonIndexType >
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::ConstIterHelper = IteratorHelper<const DenseOctreeLevel, ConstBaseBlockIteratorHelper>

◆ BroodType

template<int DIM, typename BlockDataType , typename MortonIndexType >
using axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::BroodType = Brood<GridPt, MortonIndexType>

◆ CoordType

template<int DIM, typename BlockDataType >
using axom::spin::OctreeLevel< DIM, BlockDataType >::CoordType = axom::IndexType
inherited

The coordinate type of a block in the octree

◆ BlockIter

template<int DIM, typename BlockDataType >
using axom::spin::OctreeLevel< DIM, BlockDataType >::BlockIter = BlockIterator<OctreeLevel, BlockIteratorHelper, BlockDataType>
inherited

◆ ConstBlockIter

template<int DIM, typename BlockDataType >
using axom::spin::OctreeLevel< DIM, BlockDataType >::ConstBlockIter = BlockIterator<const OctreeLevel, ConstBlockIteratorHelper, const BlockDataType>
inherited

Member Enumeration Documentation

◆ anonymous enum

template<int DIM, typename BlockDataType >
anonymous enum
inherited
Enumerator
BROOD_SIZE 

Constructor & Destructor Documentation

◆ DenseOctreeLevel()

template<int DIM, typename BlockDataType , typename MortonIndexType >
axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::DenseOctreeLevel ( int  level = -1)
inline

◆ ~DenseOctreeLevel()

template<int DIM, typename BlockDataType , typename MortonIndexType >
axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::~DenseOctreeLevel ( )
inline

Member Function Documentation

◆ getIteratorHelper() [1/2]

template<int DIM, typename BlockDataType , typename MortonIndexType >
BaseBlockIteratorHelper* axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::getIteratorHelper ( bool  begin)
inlinevirtual

Factory function to return a GridBlockIterHelper for this level.

Parameters
beginA boolean to determine if this is to be a begin (true) or end (false) iterator

Implements axom::spin::OctreeLevel< DIM, BlockDataType >.

◆ getIteratorHelper() [2/2]

template<int DIM, typename BlockDataType , typename MortonIndexType >
ConstBaseBlockIteratorHelper* axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::getIteratorHelper ( bool  begin) const
inlinevirtual

Factory function to return a ConstGridBlockIterHelper for this level.

Parameters
beginA boolean to determine if this is to be a begin (true) or end (false) iterator

Implements axom::spin::OctreeLevel< DIM, BlockDataType >.

◆ hasBlock() [1/2]

template<int DIM, typename BlockDataType , typename MortonIndexType >
bool axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::hasBlock ( const GridPt pt) const
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[]().

◆ addAllChildren() [1/2]

template<int DIM, typename BlockDataType , typename MortonIndexType >
void axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren ( const GridPt pt)
inline

◆ operator[]() [1/4]

template<int DIM, typename BlockDataType , typename MortonIndexType >
BlockDataType& axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::operator[] ( const GridPt pt)
inline

◆ operator[]() [2/4]

template<int DIM, typename BlockDataType , typename MortonIndexType >
const BlockDataType& axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::operator[] ( const GridPt pt) const
inline

◆ getBroodData() [1/4]

template<int DIM, typename BlockDataType , typename MortonIndexType >
BroodData& axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::getBroodData ( const GridPt pt)
inline

Access the data associated with the entire brood.

Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren().

◆ getBroodData() [2/4]

template<int DIM, typename BlockDataType , typename MortonIndexType >
const BroodData& axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::getBroodData ( const GridPt pt) const
inline

Const access to data associated with the entire brood.

◆ empty()

template<int DIM, typename BlockDataType , typename MortonIndexType >
bool axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::empty ( ) const
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().

◆ numBlocks()

template<int DIM, typename BlockDataType , typename MortonIndexType >
int axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::numBlocks ( ) const
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().

◆ numInternalBlocks()

template<int DIM, typename BlockDataType , typename MortonIndexType >
int axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::numInternalBlocks ( ) const
inlinevirtual

◆ numLeafBlocks()

template<int DIM, typename BlockDataType , typename MortonIndexType >
int axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::numLeafBlocks ( ) const
inlinevirtual

◆ blockStatus() [1/2]

template<int DIM, typename BlockDataType , typename MortonIndexType >
TreeBlockStatus axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::blockStatus ( const GridPt pt) const
inline

Helper function to determine the status of an octree block within this octree level.

Parameters
ptThe grid point of the block index that we are testing
Returns
The status of the grid point pt (e.g. LeafBlock, InternalBlock, ...)

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().

◆ maxCoord()

template<int DIM, typename BlockDataType >
CoordType axom::spin::OctreeLevel< DIM, BlockDataType >::maxCoord ( ) const
inlineinherited

◆ maxGridCell()

template<int DIM, typename BlockDataType >
GridPt axom::spin::OctreeLevel< DIM, BlockDataType >::maxGridCell ( ) const
inlineinherited

Returns a GridPt whose coordinates are set to maxCoord.

See also
maxCoord()

References axom::spin::OctreeLevel< DIM, BlockDataType >::maxCoord().

◆ level()

template<int DIM, typename BlockDataType >
int axom::spin::OctreeLevel< DIM, BlockDataType >::level ( ) const
inlineinherited

◆ inBounds()

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeLevel< DIM, BlockDataType >::inBounds ( const GridPt pt) const
inlineinherited

Predicate to check whether the block associated with the given GridPt pt is an allowed block in the level.

Parameters
[in]ptThe gridpoint of the block to check
Note
pt is inBounds if each of its coordinates is a non-negative integer less than maxCoord()
See also
maxCoord()

References axom::spin::OctreeLevel< DIM, BlockDataType >::maxCoord().

Referenced by axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::addAllChildren(), and axom::spin::DenseOctreeLevel< DIM, BlockDataType, MortonIndexType >::blockStatus().

◆ isLeaf()

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeLevel< DIM, BlockDataType >::isLeaf ( const GridPt pt) const
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().

◆ isInternal()

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeLevel< DIM, BlockDataType >::isInternal ( const GridPt pt) const
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.

◆ begin() [1/2]

template<int DIM, typename BlockDataType >
BlockIter axom::spin::OctreeLevel< DIM, BlockDataType >::begin ( )
inlineinherited

◆ begin() [2/2]

template<int DIM, typename BlockDataType >
ConstBlockIter axom::spin::OctreeLevel< DIM, BlockDataType >::begin ( ) const
inlineinherited

Const begin iterator to points and data in tree level.

◆ end() [1/2]

template<int DIM, typename BlockDataType >
BlockIter axom::spin::OctreeLevel< DIM, BlockDataType >::end ( )
inlineinherited

End iterator to points and data in tree level.

◆ end() [2/2]

◆ blockStatus() [2/2]

template<int DIM, typename BlockDataType >
virtual TreeBlockStatus axom::spin::OctreeLevel< DIM, BlockDataType >::blockStatus ( const GridPt pt) const
pure virtualinherited

◆ hasBlock() [2/2]

template<int DIM, typename BlockDataType >
virtual bool axom::spin::OctreeLevel< DIM, BlockDataType >::hasBlock ( const GridPt pt) const
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().

◆ addAllChildren() [2/2]

template<int DIM, typename BlockDataType >
virtual void axom::spin::OctreeLevel< DIM, BlockDataType >::addAllChildren ( const GridPt pt)
pure virtualinherited

◆ operator[]() [3/4]

template<int DIM, typename BlockDataType >
virtual const BlockDataType& axom::spin::OctreeLevel< DIM, BlockDataType >::operator[] ( const GridPt pt) const
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().

◆ operator[]() [4/4]

template<int DIM, typename BlockDataType >
virtual BlockDataType& axom::spin::OctreeLevel< DIM, BlockDataType >::operator[] ( const GridPt pt)
pure virtualinherited

Virtual accessor for the data associated with grid point pt.

Implemented in axom::spin::SparseOctreeLevel< DIM, BlockDataType, PointRepresenationType >.

◆ getBroodData() [3/4]

template<int DIM, typename BlockDataType >
virtual BroodData& axom::spin::OctreeLevel< DIM, BlockDataType >::getBroodData ( const GridPt pt)
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().

◆ getBroodData() [4/4]

template<int DIM, typename BlockDataType >
virtual const BroodData& axom::spin::OctreeLevel< DIM, BlockDataType >::getBroodData ( const GridPt pt) const
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 >.

Member Data Documentation

◆ m_level


The documentation for this class was generated from the following file: