AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Adds spatial extents to an OctreeBase, allowing point location. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.3.3/src/axom/spin/SpatialOctree.hpp>
Public Types | |
using | GeometricBoundingBox = primal::BoundingBox< double, DIM > |
using | SpacePt = primal::Point< double, DIM > |
using | SpaceVector = primal::Vector< double, DIM > |
using | BaseOctree = OctreeBase< DIM, BlockDataType > |
using | GridPt = typename BaseOctree::GridPt |
using | CoordType = typename GridPt::CoordType |
using | BlockIndex = typename BaseOctree::BlockIndex |
using | SpaceVectorLevelMap = slam::Map< slam::Set<>, SpaceVector > |
using | GridVec = primal::Vector< CoordType, DIM > |
using | MAX_LEVEL_SIZE = slam::policies::CompileTimeSize< CoordType, std::numeric_limits< CoordType >::digits > |
using | OctreeLevels = slam::OrderedSet< CoordType, CoordType, MAX_LEVEL_SIZE > |
using | OctreeLevelType = OctreeLevel< DIM, BlockDataType > |
using | LeafIndicesLevelMap = slam::Map< slam::Set< CoordType, CoordType >, OctreeLevelType * > |
Public Member Functions | |
SpatialOctree (const GeometricBoundingBox &bb) | |
Construct a spatial octree from a spatial bounding box. More... | |
const GeometricBoundingBox & | boundingBox () const |
Returns a reference to the octree's bounding box (i.e. the bounding box of the root block) More... | |
GeometricBoundingBox | blockBoundingBox (const BlockIndex &block) const |
Return the spatial bounding box of a grid cell at the given level or resolution. More... | |
GeometricBoundingBox | blockBoundingBox (const GridPt &gridPt, int level) const |
Return the spatial bounding box of a grid cell at the given level or resolution. More... | |
const SpaceVector & | spacingAtLevel (int level) const |
BlockIndex | findLeafBlock (const SpacePt &pt, int startingLevel=-1) const |
Finds the index of the leaf block covering the query point pt. More... | |
GridPt | findGridCellAtLevel (const SpacePt &pt, int lev) const |
Utility function to find the quantized grid cell at level lev for query point pt. More... | |
int | maxLeafLevel () const |
The max level for leaf blocks of the octree. More... | |
int | maxInternalLevel () const |
The max level for internal blocks of the octree. More... | |
OctreeLevelType & | getOctreeLevel (int lev) |
Accessor for a reference to the octree level instance at level lev. More... | |
const OctreeLevelType & | getOctreeLevel (int lev) const |
Const accessor for a reference to the octree level instance at level lev. More... | |
bool | isLevelValid (int lev) const |
Predicate to determine if level lev is in the range. More... | |
bool | isLeaf (const GridPt &pt, int lev) const |
Determine whether the octree contains a leaf block associated with grid point pt at level lev. More... | |
bool | isLeaf (const BlockIndex &block) const |
Determine whether the octree contains a leaf block associated with this BlockIndex. More... | |
bool | isInternal (const GridPt &pt, int lev) const |
Determine whether the octree contains an internal block associated with grid point pt at level lev. More... | |
bool | isInternal (const BlockIndex &block) const |
Determine whether the octree contains an internal block associated with this BlockIndex. More... | |
bool | hasBlock (const GridPt &pt, int lev) const |
Determine whether the octree contains a block (internal or leaf) associated with grid point pt at level lev. More... | |
bool | hasBlock (const BlockIndex &block) const |
Determine whether the octree contains a block (internal or leaf) associated with this BlockIndex. More... | |
bool | inBounds (const GridPt &pt, int lev) const |
Determine whether the octree block associated with grid point pt and level lev is a possible block in this octree. More... | |
bool | inBounds (const BlockIndex &block) const |
Determine whether the octree block associated with BlockIndex is a possible block in this octree. More... | |
void | refineLeaf (const BlockIndex &leafBlock) |
Refines the given leaf block in the octree. More... | |
BlockDataType & | operator[] (const BlockIndex &block) |
Accessor to the data associated with block. More... | |
const BlockDataType & | operator[] (const BlockIndex &block) const |
Const accessor to the data associated with block. More... | |
BlockIndex | coveringLeafBlock (const BlockIndex &blk, bool checkInBounds=true) const |
Finds the finest octree leaf covering BlockIndex blk. More... | |
BlockIndex | parent (const GridPt &pt, int level) const |
Finds the grid index and level of the current octree block's parent. More... | |
BlockIndex | parent (const BlockIndex &block) const |
Finds the BlockIndex of the given block's parent. More... | |
BlockIndex | child (const GridPt &pt, int level, int childIndex) const |
Finds the BlockIndex of the given block's child. More... | |
BlockIndex | child (const BlockIndex &block, int childIndex) const |
Finds the BlockIndex of the given block's child. More... | |
Static Public Member Functions | |
static CoordType | maxCoordAtLevel (int level) |
Utility function to find the number of (possible) grid cells at a given level or resolution. More... | |
static BlockIndex | root () |
Protected Member Functions | |
TreeBlockStatus | blockStatus (const GridPt &pt, int lev) const |
Helper function to determine the status of a BlockIndex within an octree instance. More... | |
TreeBlockStatus | blockStatus (const BlockIndex &blk) const |
Helper function to determine the status of a BlockIndex within an octree instance. More... | |
Protected Attributes | |
SpaceVectorLevelMap | m_deltaLevelMap |
SpaceVectorLevelMap | m_invDeltaLevelMap |
GeometricBoundingBox | m_boundingBox |
OctreeLevels | m_levels |
LeafIndicesLevelMap | m_leavesLevelMap |
Adds spatial extents to an OctreeBase, allowing point location.
using axom::spin::SpatialOctree< DIM, BlockDataType >::GeometricBoundingBox = primal::BoundingBox<double,DIM> |
using axom::spin::SpatialOctree< DIM, BlockDataType >::SpacePt = primal::Point<double,DIM> |
using axom::spin::SpatialOctree< DIM, BlockDataType >::SpaceVector = primal::Vector<double,DIM> |
using axom::spin::SpatialOctree< DIM, BlockDataType >::BaseOctree = OctreeBase<DIM, BlockDataType> |
using axom::spin::SpatialOctree< DIM, BlockDataType >::GridPt = typename BaseOctree::GridPt |
using axom::spin::SpatialOctree< DIM, BlockDataType >::CoordType = typename GridPt::CoordType |
using axom::spin::SpatialOctree< DIM, BlockDataType >::BlockIndex = typename BaseOctree::BlockIndex |
using axom::spin::SpatialOctree< DIM, BlockDataType >::SpaceVectorLevelMap = slam::Map<slam::Set<>, SpaceVector> |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inline |
Construct a spatial octree from a spatial bounding box.
[in] | bb | The spatial extent to be indexed by the octree |
|
inline |
Returns a reference to the octree's bounding box (i.e. the bounding box of the root block)
|
inline |
Return the spatial bounding box of a grid cell at the given level or resolution.
Referenced by axom::spin::SpatialOctree< DIM, InOutBlockData >::blockBoundingBox().
|
inline |
Return the spatial bounding box of a grid cell at the given level or resolution.
|
inline |
Returns the width of an octree block at level of resolution level
level | The level of resolution that we are checking |
|
inline |
Finds the index of the leaf block covering the query point pt.
[in] | pt | The query point in space |
[in] | startingLevel | (Optional) starting level for the query |
|
inline |
Utility function to find the quantized grid cell at level lev for query point pt.
[in] | pt | The point at which we are querying. |
[in] | lev | The level or resolution. |
Referenced by axom::spin::SpatialOctree< DIM, InOutBlockData >::findLeafBlock().
|
inlineinherited |
The max level for leaf blocks of the octree.
Referenced by axom::spin::SpatialOctree< DIM, InOutBlockData >::findLeafBlock().
|
inlineinherited |
The max level for internal blocks of the octree.
|
inlinestaticinherited |
Utility function to find the number of (possible) grid cells at a given level or resolution.
[in] | level | The level or resolution. |
Referenced by axom::spin::SpatialOctree< DIM, InOutBlockData >::findGridCellAtLevel().
|
inlinestaticinherited |
Auxiliary function to return the root of the octree
|
inlineinherited |
Finds the grid index and level of the current octree block's parent.
[in] | pt | The grid index of the block whose parent we want to find. |
[in] | level | The level of the block whose parent we want to find. |
|
inlineinherited |
Finds the BlockIndex of the given block's parent.
[in] | block | The block whose parent we want to find |
|
inlineinherited |
Finds the BlockIndex of the given block's child.
[in] | pt | The grid index of the block whose child we want to find. |
[in] | level | The level of the block whose child we want to find. |
[in] | childIndex | The index of the child to find |
|
inlineinherited |
Finds the BlockIndex of the given block's child.
[in] | block | The block whose child we want to find |
[in] | childIndex | The index of the child to find |
|
inlineinherited |
Accessor for a reference to the octree level instance at level lev.
|
inlineinherited |
Const accessor for a reference to the octree level instance at level lev.
|
inlineinherited |
Predicate to determine if level lev is in the range.
|
inlineinherited |
Determine whether the octree contains a leaf block associated with grid point pt at level lev.
[in] | pt | The grid point to check |
[in] | lev | The level of the grid point |
|
inlineinherited |
Determine whether the octree contains a leaf block associated with this BlockIndex.
[in] | block | The BlockIndex of the tree to check |
|
inlineinherited |
Determine whether the octree contains an internal block associated with grid point pt at level lev.
[in] | pt | The grid point to check |
[in] | lev | The level of the grid point |
|
inlineinherited |
Determine whether the octree contains an internal block associated with this BlockIndex.
[in] | block | The BlockIndex of the tree to check |
|
inlineinherited |
Determine whether the octree contains a block (internal or leaf) associated with grid point pt at level lev.
[in] | pt | The grid point to check |
[in] | lev | The level of the grid point |
|
inlineinherited |
Determine whether the octree contains a block (internal or leaf) associated with this BlockIndex.
[in] | block | The BlockIndex of the tree to check |
|
inlineinherited |
Determine whether the octree block associated with grid point pt and level lev is a possible block in this octree.
|
inlineinherited |
Determine whether the octree block associated with BlockIndex is a possible block in this octree.
|
inlineinherited |
Refines the given leaf block in the octree.
Marks leafBlock as internal (non-leaf) and adds its children to the tree
|
inlineinherited |
Accessor to the data associated with block.
block | A block (internal or leaf) in the tree |
|
inlineinherited |
Const accessor to the data associated with block.
block | A block (internal or leaf) in the tree |
|
inlineinherited |
Finds the finest octree leaf covering BlockIndex blk.
blk | A BlockIndex, not necessarily in the octree |
checkInBounds | A flag to determine if we should check that the block lies within the octree bounds (default=true) |
|
inlineprotectedinherited |
Helper function to determine the status of a BlockIndex within an octree instance.
pt | The grid point of the block index that we are testing |
lev | The level of the block index that we are testing |
Referenced by axom::spin::SpatialOctree< DIM, InOutBlockData >::findLeafBlock().
|
inlineprotectedinherited |
Helper function to determine the status of a BlockIndex within an octree instance.
blk | The block index we are testing |
|
protected |
|
protected |
|
protected |
Referenced by axom::spin::SpatialOctree< DIM, InOutBlockData >::blockBoundingBox(), axom::spin::SpatialOctree< DIM, InOutBlockData >::boundingBox(), axom::spin::SpatialOctree< DIM, InOutBlockData >::findGridCellAtLevel(), axom::spin::SpatialOctree< DIM, InOutBlockData >::findLeafBlock(), and axom::spin::SpatialOctree< DIM, InOutBlockData >::SpatialOctree().
|
protectedinherited |
|
protectedinherited |