AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::quest::InOutOctree< DIM > Class Template Reference

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/quest/InOutOctree.hpp>

Inheritance diagram for axom::quest::InOutOctree< DIM >:

Public Types

using OctreeBaseType = spin::OctreeBase< DIM, InOutBlockData >
 
using SpatialOctreeType = spin::SpatialOctree< DIM, InOutBlockData >
 
using GeometricBoundingBox = typename SpatialOctreeType::GeometricBoundingBox
 
using SpacePt = typename SpatialOctreeType::SpacePt
 
using SpaceVector = typename SpatialOctreeType::SpaceVector
 
using BlockIndex = typename SpatialOctreeType::BlockIndex
 
using GridPt = typename OctreeBaseType::GridPt
 
using SpaceRay = primal::Ray< double, DIM >
 
using SurfaceMesh = typename MeshWrapper< DIM >::SurfaceMesh
 
using VertexIndex = axom::IndexType
 
using CellIndex = axom::IndexType
 
using IndexRegistry = slam::FieldRegistry< slam::Set< VertexIndex >, VertexIndex >
 
using SpaceCell = typename MeshWrapper< DIM >::SpaceCell
 
using MeshVertexSet = typename MeshWrapper< DIM >::MeshVertexSet
 
using MeshElementSet = typename MeshWrapper< DIM >::MeshElementSet
 
using CellVertIndices = typename MeshWrapper< DIM >::CellVertIndices
 
using VertexIndexMap = typename MeshWrapper< DIM >::VertexIndexMap
 
using VertexBlockMap = slam::Map< BlockIndex >
 
using STLIndirection = slam::policies::STLVectorIndirection< VertexIndex, VertexIndex >
 
using GrayLeafSet = slam::PositionSet<>
 
using BVStride = slam::policies::CompileTimeStride< VertexIndex, MAX_VERTS_PER_BLOCK >
 
using ConstantCardinality = slam::policies::ConstantCardinality< VertexIndex, BVStride >
 
using GrayLeafVertexRelation = slam::StaticRelation< VertexIndex, VertexIndex, ConstantCardinality, STLIndirection, GrayLeafSet, MeshVertexSet >
 
using VariableCardinality = slam::policies::VariableCardinality< VertexIndex, STLIndirection >
 
using GrayLeafElementRelation = slam::StaticRelation< VertexIndex, VertexIndex, VariableCardinality, STLIndirection, GrayLeafSet, MeshElementSet >
 
using CellIndexSet = typename GrayLeafElementRelation::RelationSubset
 
using GrayLeafsLevelMap = slam::Map< GrayLeafSet >
 
using GrayLeafVertexRelationLevelMap = slam::Map< GrayLeafVertexRelation >
 
using GrayLeafElementRelationLevelMap = slam::Map< GrayLeafElementRelation >
 
using BaseOctree = OctreeBase< DIM, InOutBlockData >
 
using CoordType = typename GridPt::CoordType
 
using SpaceVectorLevelMap = slam::Map< 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< OctreeLevelType * >
 

Public Member Functions

 InOutOctree (const GeometricBoundingBox &bb, SurfaceMesh *&meshPtr)
 Construct an InOutOctree to handle containment queries on a surface mesh. More...
 
void generateIndex ()
 Generate the spatial index over the surface mesh. More...
 
bool within (const SpacePt &pt) const
 The point containment query. More...
 
void setVertexWeldThreshold (double thresh)
 Sets the threshold for welding vertices during octree construction. More...
 
const GeometricBoundingBoxboundingBox () 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 SpaceVectorspacingAtLevel (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...
 
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...
 
OctreeLevelTypegetOctreeLevel (int lev)
 Accessor for a reference to the octree level instance at level lev. More...
 
const OctreeLevelTypegetOctreeLevel (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...
 

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

Static Public Attributes

static const int MAX_VERTS_PER_BLOCK = 1
 

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

MeshWrapper< DIM > m_meshWrapper
 
VertexBlockMap m_vertexToBlockMap
 
GrayLeafsLevelMap m_grayLeafsMap
 
GrayLeafVertexRelationLevelMap m_grayLeafToVertexRelationLevelMap
 
GrayLeafElementRelationLevelMap m_grayLeafToElementRelationLevelMap
 
GenerationState m_generationState
 
IndexRegistry m_indexRegistry
 
double m_vertexWeldThresholdSquared
 
double m_boundingBoxScaleFactor {DEFAULT_BOUNDING_BOX_SCALE_FACTOR}
 Bounding box scaling factor for dealing with grazing triangles. More...
 
SpaceVectorLevelMap m_deltaLevelMap
 
SpaceVectorLevelMap m_invDeltaLevelMap
 
GeometricBoundingBox m_boundingBox
 
OctreeLevels m_levels
 
LeafIndicesLevelMap m_leavesLevelMap
 

Friends

class detail::InOutOctreeStats< DIM >
 
class detail::InOutOctreeValidator< DIM >
 
class detail::InOutOctreeMeshDumper< DIM >
 
class detail::InOutOctreeMeshDumperBase< DIM, detail::InOutOctreeMeshDumper< DIM > >
 

Member Typedef Documentation

◆ OctreeBaseType

template<int DIM>
using axom::quest::InOutOctree< DIM >::OctreeBaseType = spin::OctreeBase<DIM, InOutBlockData>

◆ SpatialOctreeType

template<int DIM>
using axom::quest::InOutOctree< DIM >::SpatialOctreeType = spin::SpatialOctree<DIM, InOutBlockData>

◆ GeometricBoundingBox

◆ SpacePt

template<int DIM>
using axom::quest::InOutOctree< DIM >::SpacePt = typename SpatialOctreeType::SpacePt

◆ SpaceVector

template<int DIM>
using axom::quest::InOutOctree< DIM >::SpaceVector = typename SpatialOctreeType::SpaceVector

◆ BlockIndex

template<int DIM>
using axom::quest::InOutOctree< DIM >::BlockIndex = typename SpatialOctreeType::BlockIndex

◆ GridPt

template<int DIM>
using axom::quest::InOutOctree< DIM >::GridPt = typename OctreeBaseType::GridPt

◆ SpaceRay

template<int DIM>
using axom::quest::InOutOctree< DIM >::SpaceRay = primal::Ray<double, DIM>

◆ SurfaceMesh

template<int DIM>
using axom::quest::InOutOctree< DIM >::SurfaceMesh = typename MeshWrapper<DIM>::SurfaceMesh

◆ VertexIndex

template<int DIM>
using axom::quest::InOutOctree< DIM >::VertexIndex = axom::IndexType

◆ CellIndex

template<int DIM>
using axom::quest::InOutOctree< DIM >::CellIndex = axom::IndexType

◆ IndexRegistry

◆ SpaceCell

template<int DIM>
using axom::quest::InOutOctree< DIM >::SpaceCell = typename MeshWrapper<DIM>::SpaceCell

◆ MeshVertexSet

template<int DIM>
using axom::quest::InOutOctree< DIM >::MeshVertexSet = typename MeshWrapper<DIM>::MeshVertexSet

◆ MeshElementSet

template<int DIM>
using axom::quest::InOutOctree< DIM >::MeshElementSet = typename MeshWrapper<DIM>::MeshElementSet

◆ CellVertIndices

template<int DIM>
using axom::quest::InOutOctree< DIM >::CellVertIndices = typename MeshWrapper<DIM>::CellVertIndices

◆ VertexIndexMap

template<int DIM>
using axom::quest::InOutOctree< DIM >::VertexIndexMap = typename MeshWrapper<DIM>::VertexIndexMap

◆ VertexBlockMap

template<int DIM>
using axom::quest::InOutOctree< DIM >::VertexBlockMap = slam::Map<BlockIndex>

◆ STLIndirection

◆ GrayLeafSet

template<int DIM>
using axom::quest::InOutOctree< DIM >::GrayLeafSet = slam::PositionSet<>

◆ BVStride

◆ ConstantCardinality

◆ GrayLeafVertexRelation

◆ VariableCardinality

◆ GrayLeafElementRelation

◆ CellIndexSet

◆ GrayLeafsLevelMap

◆ GrayLeafVertexRelationLevelMap

◆ GrayLeafElementRelationLevelMap

◆ BaseOctree

using axom::spin::SpatialOctree< DIM, InOutBlockData >::BaseOctree = OctreeBase<DIM, InOutBlockData >
inherited

◆ CoordType

using axom::spin::SpatialOctree< DIM, InOutBlockData >::CoordType = typename GridPt::CoordType
inherited

◆ SpaceVectorLevelMap

using axom::spin::SpatialOctree< DIM, InOutBlockData >::SpaceVectorLevelMap = slam::Map<SpaceVector>
inherited

◆ GridVec

template<int DIM, typename BlockDataType >
using axom::spin::OctreeBase< DIM, BlockDataType >::GridVec = primal::Vector<CoordType, DIM>
inherited

◆ MAX_LEVEL_SIZE

template<int DIM, typename BlockDataType >
using axom::spin::OctreeBase< DIM, BlockDataType >::MAX_LEVEL_SIZE = slam::policies::CompileTimeSize<CoordType, std::numeric_limits<CoordType>::digits>
inherited

◆ OctreeLevels

template<int DIM, typename BlockDataType >
using axom::spin::OctreeBase< DIM, BlockDataType >::OctreeLevels = slam::OrderedSet<CoordType, CoordType, MAX_LEVEL_SIZE>
inherited

◆ OctreeLevelType

template<int DIM, typename BlockDataType >
using axom::spin::OctreeBase< DIM, BlockDataType >::OctreeLevelType = OctreeLevel<DIM, BlockDataType>
inherited

◆ LeafIndicesLevelMap

template<int DIM, typename BlockDataType >
using axom::spin::OctreeBase< DIM, BlockDataType >::LeafIndicesLevelMap = slam::Map<OctreeLevelType*>
inherited

Constructor & Destructor Documentation

◆ InOutOctree()

template<int DIM>
axom::quest::InOutOctree< DIM >::InOutOctree ( const GeometricBoundingBox bb,
SurfaceMesh *&  meshPtr 
)
inline

Construct an InOutOctree to handle containment queries on a surface mesh.

Parameters
[in]bbThe spatial extent covered by the octree
Note
We slightly scale the bounding box so all mesh elements are guaranteed to be enclosed by the octree and to remedy problems we've encountered related to meshes that are aligned with the octree grid
The InOutOctree modifies its mesh in an effort to repair common problems. Please make sure to discard all old copies of the meshPtr.

References axom::quest::InOutOctree< DIM >::setVertexWeldThreshold().

Member Function Documentation

◆ generateIndex()

template<int DIM>
void axom::quest::InOutOctree< DIM >::generateIndex

Generate the spatial index over the surface mesh.

References SLIC_INFO.

◆ within()

template<int DIM>
bool axom::quest::InOutOctree< DIM >::within ( const SpacePt pt) const

The point containment query.

Parameters
ptThe point at which we are checking for containment
Returns
True if the point is within (or on) the surface, false otherwise
Note
Points outside the octree bounding box are considered outside

References SLIC_ASSERT_MSG.

◆ setVertexWeldThreshold()

template<int DIM>
void axom::quest::InOutOctree< DIM >::setVertexWeldThreshold ( double  thresh)
inline

Sets the threshold for welding vertices during octree construction.

Parameters
[in]threshThe cutoff distance at which we consider two vertices to be identical during the octree construction
Precondition
thresh >= 0
This function cannot be called after the octree has been constructed
Note
The InOutOctree requires the input surface to be watertight so this parameter should be set with care. A welding threshold that is too high could unnecessarily merge vertices and create topological defects, while a value that is too low risks leaving gaps in meshes with tolerances between vertices. The default value tends to work well in practice.
The code actually uses the square of the threshold for comparisons

References axom::quest::InOutOctree< DIM >::m_generationState, axom::quest::InOutOctree< DIM >::m_vertexWeldThresholdSquared, and SLIC_WARNING_IF.

◆ boundingBox()

const GeometricBoundingBox& axom::spin::SpatialOctree< DIM, InOutBlockData >::boundingBox ( ) const
inlineinherited

Returns a reference to the octree's bounding box (i.e. the bounding box of the root block)

◆ blockBoundingBox() [1/2]

GeometricBoundingBox axom::spin::SpatialOctree< DIM, InOutBlockData >::blockBoundingBox ( const BlockIndex block) const
inlineinherited

Return the spatial bounding box of a grid cell at the given level or resolution.

◆ blockBoundingBox() [2/2]

GeometricBoundingBox axom::spin::SpatialOctree< DIM, InOutBlockData >::blockBoundingBox ( const GridPt gridPt,
int  level 
) const
inlineinherited

Return the spatial bounding box of a grid cell at the given level or resolution.

◆ spacingAtLevel()

const SpaceVector& axom::spin::SpatialOctree< DIM, InOutBlockData >::spacingAtLevel ( int  level) const
inlineinherited

Returns the width of an octree block at level of resolution level

Parameters
levelThe level of resolution that we are checking

◆ findLeafBlock()

BlockIndex axom::spin::SpatialOctree< DIM, InOutBlockData >::findLeafBlock ( const SpacePt pt,
int  startingLevel = -1 
) const
inlineinherited

Finds the index of the leaf block covering the query point pt.

Parameters
[in]ptThe query point in space
[in]startingLevel(Optional) starting level for the query
Precondition
pt must be in the bounding box of the octree (i.e. boundingBox.contains(pt) == true )
Note
The collection of leaves covers the bounding box, and the interiors of the leaves do not intersect, so every point in the bounding box should be located in a unique leaf block.
We are assuming a half-open interval on the bounding boxes.
Returns
The block index (i.e. grid point and level) of the leaf block containing the query point

◆ findGridCellAtLevel()

GridPt axom::spin::SpatialOctree< DIM, InOutBlockData >::findGridCellAtLevel ( const SpacePt pt,
int  lev 
) const
inlineinherited

Utility function to find the quantized grid cell at level lev for query point pt.

Parameters
[in]ptThe point at which we are querying.
[in]levThe level or resolution.
Precondition
\( 0 \le lev < octree.maxLeafLevel() \)
Postcondition
Each coordinate of the returned gridPt is in range \( [0, 2^{lev}) \)
Returns
The grid point of the block covering this point at this level

◆ maxLeafLevel()

template<int DIM, typename BlockDataType >
int axom::spin::OctreeBase< DIM, BlockDataType >::maxLeafLevel ( ) const
inlineinherited

◆ maxInternalLevel()

template<int DIM, typename BlockDataType >
int axom::spin::OctreeBase< DIM, BlockDataType >::maxInternalLevel ( ) const
inlineinherited

◆ maxCoordAtLevel()

template<int DIM, typename BlockDataType >
static CoordType axom::spin::OctreeBase< DIM, BlockDataType >::maxCoordAtLevel ( int  level)
inlinestaticinherited

Utility function to find the number of (possible) grid cells at a given level or resolution.

Parameters
[in]levelThe level or resolution.
Precondition
\( 0 \le lev */ static GridPt maxGridCellAtLevel(int level) { return GridPt(maxCoordAtLevel(level)); } /** \brief Finds the highest coordinate value at a given level or resolution \param [in] level The level or resolution. \pre \) 0 \le lev

◆ root()

template<int DIM, typename BlockDataType >
static BlockIndex axom::spin::OctreeBase< DIM, BlockDataType >::root ( )
inlinestaticinherited

Auxiliary function to return the root of the octree

Note
The root block has no parent. Its parent is an invalid BlockIndex. I.e. octree.parent( octree.root()).isValid() = false.

◆ parent() [1/2]

template<int DIM, typename BlockDataType >
BlockIndex axom::spin::OctreeBase< DIM, BlockDataType >::parent ( const GridPt pt,
int  level 
) const
inlineinherited

Finds the grid index and level of the current octree block's parent.

Note
The root level is 0 and its children are at level 1
The root node has no parent. The returned level will be '-1'
Parameters
[in]ptThe grid index of the block whose parent we want to find.
[in]levelThe level of the block whose parent we want to find.
Returns
The parent of the provided octree leaf.

References axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::parent().

◆ parent() [2/2]

template<int DIM, typename BlockDataType >
BlockIndex axom::spin::OctreeBase< DIM, BlockDataType >::parent ( const BlockIndex block) const
inlineinherited

Finds the BlockIndex of the given block's parent.

Parameters
[in]blockThe block whose parent we want to find
Returns
The BlockIndex of the parent of the provided octree leaf.

References axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::parent().

◆ child() [1/2]

template<int DIM, typename BlockDataType >
BlockIndex axom::spin::OctreeBase< DIM, BlockDataType >::child ( const GridPt pt,
int  level,
int  childIndex 
) const
inlineinherited

Finds the BlockIndex of the given block's child.

Parameters
[in]ptThe grid index of the block whose child we want to find.
[in]levelThe level of the block whose child we want to find.
[in]childIndexThe index of the child to find
Precondition
\( 0 \le childIndex < 2^{DIM} \)
Returns
The BlockIndex of the child of the provided octree leaf.

References axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::child().

◆ child() [2/2]

template<int DIM, typename BlockDataType >
BlockIndex axom::spin::OctreeBase< DIM, BlockDataType >::child ( const BlockIndex block,
int  childIndex 
) const
inlineinherited

Finds the BlockIndex of the given block's child.

Parameters
[in]blockThe block whose child we want to find
[in]childIndexThe index of the child to find
Precondition
\( 0 \le childIndex < 2^{DIM} \)
Returns
The BlockIndex of the child of the provided octree leaf.

References axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::child().

◆ getOctreeLevel() [1/2]

template<int DIM, typename BlockDataType >
OctreeLevelType& axom::spin::OctreeBase< DIM, BlockDataType >::getOctreeLevel ( int  lev)
inlineinherited

Accessor for a reference to the octree level instance at level lev.

References axom::spin::OctreeBase< DIM, BlockDataType >::m_leavesLevelMap.

◆ getOctreeLevel() [2/2]

template<int DIM, typename BlockDataType >
const OctreeLevelType& axom::spin::OctreeBase< DIM, BlockDataType >::getOctreeLevel ( int  lev) const
inlineinherited

Const accessor for a reference to the octree level instance at level lev.

References axom::spin::OctreeBase< DIM, BlockDataType >::m_leavesLevelMap.

◆ isLevelValid()

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid ( int  lev) const
inlineinherited

Predicate to determine if level lev is in the range.

Note
lev is in range if 0 <= lev <= maxLeafLevel()

References axom::spin::OctreeBase< DIM, BlockDataType >::maxLeafLevel().

◆ isLeaf() [1/2]

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeBase< DIM, BlockDataType >::isLeaf ( const GridPt pt,
int  lev 
) const
inlineinherited

Determine whether the octree contains a leaf block associated with grid point pt at level lev.

Parameters
[in]ptThe grid point to check
[in]levThe level of the grid point
Returns
true if the associated block is a leaf in the octree, false otherwise

References axom::spin::OctreeBase< DIM, BlockDataType >::getOctreeLevel(), axom::spin::OctreeLevel< DIM, BlockDataType >::isLeaf(), and axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid().

◆ isLeaf() [2/2]

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeBase< DIM, BlockDataType >::isLeaf ( const BlockIndex block) const
inlineinherited

Determine whether the octree contains a leaf block associated with this BlockIndex.

Parameters
[in]blockThe BlockIndex of the tree to check
Returns
true if the associated block is a leaf in the octree, false otherwise

References axom::spin::OctreeBase< DIM, BlockDataType >::getOctreeLevel(), axom::spin::OctreeLevel< DIM, BlockDataType >::isLeaf(), axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid(), axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::level(), and axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::pt().

◆ isInternal() [1/2]

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeBase< DIM, BlockDataType >::isInternal ( const GridPt pt,
int  lev 
) const
inlineinherited

Determine whether the octree contains an internal block associated with grid point pt at level lev.

Parameters
[in]ptThe grid point to check
[in]levThe level of the grid point
Returns
true if the associated block is an internal block of the octree, false otherwise

References axom::spin::OctreeBase< DIM, BlockDataType >::getOctreeLevel(), axom::spin::OctreeLevel< DIM, BlockDataType >::isInternal(), and axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid().

◆ isInternal() [2/2]

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeBase< DIM, BlockDataType >::isInternal ( const BlockIndex block) const
inlineinherited

Determine whether the octree contains an internal block associated with this BlockIndex.

Parameters
[in]blockThe BlockIndex of the tree to check
Returns
true if the associated block is an internal block of the octree, false otherwise

References axom::spin::OctreeBase< DIM, BlockDataType >::getOctreeLevel(), axom::spin::OctreeLevel< DIM, BlockDataType >::isInternal(), axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid(), axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::level(), and axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::pt().

◆ hasBlock() [1/2]

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeBase< DIM, BlockDataType >::hasBlock ( const GridPt pt,
int  lev 
) const
inlineinherited

Determine whether the octree contains a block (internal or leaf) associated with grid point pt at level lev.

Parameters
[in]ptThe grid point to check
[in]levThe level of the grid point
Returns
true if the associated block is in the octree, false otherwise

References axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid(), axom::spin::OctreeBase< DIM, BlockDataType >::m_leavesLevelMap, and SLIC_ASSERT.

◆ hasBlock() [2/2]

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeBase< DIM, BlockDataType >::hasBlock ( const BlockIndex block) const
inlineinherited

Determine whether the octree contains a block (internal or leaf) associated with this BlockIndex.

Parameters
[in]blockThe BlockIndex of the tree to check
Returns
true if the associated block is a block of the octree, false otherwise

References axom::spin::OctreeBase< DIM, BlockDataType >::hasBlock(), axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::level(), and axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::pt().

◆ inBounds() [1/2]

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

Determine whether the octree block associated with grid point pt and level lev is a possible block in this octree.

Note
A block index is out of bounds if its level is not in the tree, or its grid point is out of the range of possible grid points for its level

References axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::inBounds(), and axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid().

◆ inBounds() [2/2]

template<int DIM, typename BlockDataType >
bool axom::spin::OctreeBase< DIM, BlockDataType >::inBounds ( const BlockIndex block) const
inlineinherited

Determine whether the octree block associated with BlockIndex is a possible block in this octree.

Note
A block index is out of bounds if its level is not in the tree, or its grid point is out of the range of possible grid points for its level

References axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::inBounds(), axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid(), and axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::level().

◆ refineLeaf()

template<int DIM, typename BlockDataType >
void axom::spin::OctreeBase< DIM, BlockDataType >::refineLeaf ( const BlockIndex leafBlock)
inlineinherited

◆ operator[]() [1/2]

template<int DIM, typename BlockDataType >
BlockDataType& axom::spin::OctreeBase< DIM, BlockDataType >::operator[] ( const BlockIndex block)
inlineinherited

◆ operator[]() [2/2]

template<int DIM, typename BlockDataType >
const BlockDataType& axom::spin::OctreeBase< DIM, BlockDataType >::operator[] ( const BlockIndex block) const
inlineinherited

◆ coveringLeafBlock()

template<int DIM, typename BlockDataType >
BlockIndex axom::spin::OctreeBase< DIM, BlockDataType >::coveringLeafBlock ( const BlockIndex blk,
bool  checkInBounds = true 
) const
inlineinherited

Finds the finest octree leaf covering BlockIndex blk.

Parameters
blkA BlockIndex, not necessarily in the octree
checkInBoundsA flag to determine if we should check that the block lies within the octree bounds (default=true)
Postcondition
The returned block, if valid, is blk or one of its ancestor blocks.
Returns
The blockIndex of the finest octree leaf covering blk, if it exists, BlockIndex::invalid_index otherwise (e.g. blk is an internal block of the tree or is out of bounds)

References axom::spin::BlockNotInTree, axom::spin::OctreeBase< DIM, BlockDataType >::blockStatus(), axom::spin::OctreeBase< DIM, BlockDataType >::hasBlock(), axom::spin::OctreeBase< DIM, BlockDataType >::inBounds(), axom::spin::InternalBlock, axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::invalid_index(), axom::spin::OctreeBase< DIM, BlockDataType >::isLeaf(), axom::spin::LeafBlock, axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::parent(), SLIC_ASSERT, and SLIC_ASSERT_MSG.

◆ blockStatus() [1/2]

template<int DIM, typename BlockDataType >
TreeBlockStatus axom::spin::OctreeBase< DIM, BlockDataType >::blockStatus ( const GridPt pt,
int  lev 
) const
inlineprotectedinherited

Helper function to determine the status of a BlockIndex within an octree instance.

Note
This function is meant to help with implementing basic octree functionality and is not meant to be exposed in the public API
Parameters
ptThe grid point of the block index that we are testing
levThe level of the block index that we are testing

References axom::spin::BlockNotInTree, axom::spin::OctreeBase< DIM, BlockDataType >::isLevelValid(), axom::spin::OctreeBase< DIM, BlockDataType >::m_leavesLevelMap, and SLIC_ASSERT.

◆ blockStatus() [2/2]

template<int DIM, typename BlockDataType >
TreeBlockStatus axom::spin::OctreeBase< DIM, BlockDataType >::blockStatus ( const BlockIndex blk) const
inlineprotectedinherited

Helper function to determine the status of a BlockIndex within an octree instance.

Note
This function is meant to help with implementing basic octree functionality and is not meant to be exposed in the public API
Parameters
blkThe block index we are testing

References axom::spin::OctreeBase< DIM, BlockDataType >::blockStatus(), axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::level(), and axom::spin::OctreeBase< DIM, BlockDataType >::BlockIndex::pt().

Friends And Related Function Documentation

◆ detail::InOutOctreeStats< DIM >

template<int DIM>
friend class detail::InOutOctreeStats< DIM >
friend

◆ detail::InOutOctreeValidator< DIM >

template<int DIM>
friend class detail::InOutOctreeValidator< DIM >
friend

◆ detail::InOutOctreeMeshDumper< DIM >

template<int DIM>
friend class detail::InOutOctreeMeshDumper< DIM >
friend

◆ detail::InOutOctreeMeshDumperBase< DIM, detail::InOutOctreeMeshDumper< DIM > >

template<int DIM>
friend class detail::InOutOctreeMeshDumperBase< DIM, detail::InOutOctreeMeshDumper< DIM > >
friend

Member Data Documentation

◆ MAX_VERTS_PER_BLOCK

template<int DIM>
const int axom::quest::InOutOctree< DIM >::MAX_VERTS_PER_BLOCK = 1
static

◆ m_meshWrapper

template<int DIM>
MeshWrapper<DIM> axom::quest::InOutOctree< DIM >::m_meshWrapper
protected

◆ m_vertexToBlockMap

template<int DIM>
VertexBlockMap axom::quest::InOutOctree< DIM >::m_vertexToBlockMap
protected

◆ m_grayLeafsMap

template<int DIM>
GrayLeafsLevelMap axom::quest::InOutOctree< DIM >::m_grayLeafsMap
protected

◆ m_grayLeafToVertexRelationLevelMap

template<int DIM>
GrayLeafVertexRelationLevelMap axom::quest::InOutOctree< DIM >::m_grayLeafToVertexRelationLevelMap
protected

◆ m_grayLeafToElementRelationLevelMap

template<int DIM>
GrayLeafElementRelationLevelMap axom::quest::InOutOctree< DIM >::m_grayLeafToElementRelationLevelMap
protected

◆ m_generationState

template<int DIM>
GenerationState axom::quest::InOutOctree< DIM >::m_generationState
protected

◆ m_indexRegistry

template<int DIM>
IndexRegistry axom::quest::InOutOctree< DIM >::m_indexRegistry
protected

◆ m_vertexWeldThresholdSquared

template<int DIM>
double axom::quest::InOutOctree< DIM >::m_vertexWeldThresholdSquared
protected

◆ m_boundingBoxScaleFactor

template<int DIM>
double axom::quest::InOutOctree< DIM >::m_boundingBoxScaleFactor {DEFAULT_BOUNDING_BOX_SCALE_FACTOR}
protected

Bounding box scaling factor for dealing with grazing triangles.

◆ m_deltaLevelMap

SpaceVectorLevelMap axom::spin::SpatialOctree< DIM, InOutBlockData >::m_deltaLevelMap
protectedinherited

◆ m_invDeltaLevelMap

SpaceVectorLevelMap axom::spin::SpatialOctree< DIM, InOutBlockData >::m_invDeltaLevelMap
protectedinherited

◆ m_boundingBox

GeometricBoundingBox axom::spin::SpatialOctree< DIM, InOutBlockData >::m_boundingBox
protectedinherited

◆ m_levels

template<int DIM, typename BlockDataType >
OctreeLevels axom::spin::OctreeBase< DIM, BlockDataType >::m_levels
protectedinherited

◆ m_leavesLevelMap

template<int DIM, typename BlockDataType >
LeafIndicesLevelMap axom::spin::OctreeBase< DIM, BlockDataType >::m_leavesLevelMap
protectedinherited

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