AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::spin Namespace Reference

Classes

struct  Brood
 
struct  Brood< GridPt, GridPt >
 
struct  BVHPolicy
 
struct  BVHPolicy< FloatType, NDIMS, ExecType, BVHType::LinearBVH >
 
class  BVH
 Defines a Bounding Volume Hierarchy (BVH) spatial acceleration data structure over a set of geometric entities. More...
 
class  DenseOctreeLevel
 
class  ImplicitGrid
 An implicit grid is an occupancy-based spatial index over an indexed set of objects in space. More...
 
struct  MortonBase
 
class  Mortonizer
 Helper class for MortonIndexing of a point's coordinate. More...
 
struct  Mortonizer< CoordType, MortonIndexType, 2 >
 
struct  Mortonizer< CoordType, MortonIndexType, 3 >
 
struct  PointHash
 
class  BlockData
 Minimal implementation of a BlockDataType for an OctreeBase. More...
 
class  OctreeBase
 Handles the non-geometric operations for our octree such as refinement, finding the parents and children of a node and determining whether a leaf node exists. More...
 
class  OctreeLevel
 
class  RectangularLattice
 A rectangular lattice maps all of space (of dimension NDIMS) into a rectangular grid of cells identified by integer coordinates. More...
 
struct  BroodRepresentationTraits
 Traits class to manage types for different point representations in a SparseOctreeLevel. More...
 
struct  BroodRepresentationTraits< CoordType, DIM, BroodDataType, primal::Point< CoordType, DIM > >
 Traits class to manage types for different point representations in a SparseOctreeLevel. More...
 
class  SparseOctreeLevel
 
class  SpatialOctree
 Adds spatial extents to an OctreeBase, allowing point location. More...
 
class  UniformGrid
 A spatial index defined by origin, spacing, and resolution. More...
 

Enumerations

enum  BVHReturnCodes { BVH_BUILD_FAILED = -1 , BVH_BUILD_OK }
 Enumerates the list of return codes for various BVH operations. More...
 
enum class  BVHType { LinearBVH }
 
enum  TreeBlockStatus { BlockNotInTree , LeafBlock , InternalBlock }
 Helper enumeration for status of a BlockIndex within an OctreeLevel instance. More...
 

Functions

template<typename MortonIndexType , typename CoordType , int DIM>
AXOM_HOST_DEVICE MortonIndexType convertPointToMorton (const primal::Point< CoordType, DIM > &pt)
 A helper function to convert a point directly to a MortonIndex. More...
 
template<typename CoordType , int DIM, typename MortonIndexType >
primal::Point< CoordType, DIM > convertMortonToPoint (MortonIndexType idx)
 A helper function to convert a MortonIndex back to a point. More...
 
template<int NDIMS, typename SpaceCoordType , typename CellCoordType >
RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > rectangular_lattice_from_bounding_box (const primal::BoundingBox< SpaceCoordType, NDIMS > &bbox, const primal::NumericArray< CellCoordType, NDIMS > &gridRes)
 Helper function to create a Rectangular Lattice from a supplied bounding box and grid resolution. More...
 
template<int NDIMS, typename SpaceCoordType , typename CellCoordType >
bool operator== (const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &lhs, const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &rhs)
 
template<int NDIMS, typename SpaceCoordType , typename CellCoordType >
bool operator!= (const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &lhs, const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &rhs)
 
template<int NDIMS, typename SpaceCoordType , typename CellCoordType >
std::ostream & operator<< (std::ostream &os, const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &lattice)
 

Enumeration Type Documentation

◆ BVHReturnCodes

Enumerates the list of return codes for various BVH operations.

Enumerator
BVH_BUILD_FAILED 

indicates that generation of the BVH failed

BVH_BUILD_OK 

indicates that the BVH was generated successfully

◆ BVHType

enum axom::spin::BVHType
strong
Enumerator
LinearBVH 

◆ TreeBlockStatus

Helper enumeration for status of a BlockIndex within an OctreeLevel instance.

Enumerator
BlockNotInTree 
LeafBlock 

Status of blocks that are not in the tree

InternalBlock 

Status of blocks that are leaves in the tree Status of blocks that are internal to the tree

Function Documentation

◆ convertPointToMorton()

template<typename MortonIndexType , typename CoordType , int DIM>
AXOM_HOST_DEVICE MortonIndexType axom::spin::convertPointToMorton ( const primal::Point< CoordType, DIM > &  pt)
inline

A helper function to convert a point directly to a MortonIndex.

Returns
The Morton index of the point

◆ convertMortonToPoint()

template<typename CoordType , int DIM, typename MortonIndexType >
primal::Point<CoordType, DIM> axom::spin::convertMortonToPoint ( MortonIndexType  idx)
inline

A helper function to convert a MortonIndex back to a point.

Returns
The demortonized Point

◆ rectangular_lattice_from_bounding_box()

template<int NDIMS, typename SpaceCoordType , typename CellCoordType >
RectangularLattice<NDIMS, SpaceCoordType, CellCoordType> axom::spin::rectangular_lattice_from_bounding_box ( const primal::BoundingBox< SpaceCoordType, NDIMS > &  bbox,
const primal::NumericArray< CellCoordType, NDIMS > &  gridRes 
)

Helper function to create a Rectangular Lattice from a supplied bounding box and grid resolution.

Parameters
bboxThe bounding box from which to construct a RectangularLattice
gridResThe resolution of the input grid

This is a convenience function to simplify working with bounding boxes. It extracts the lattice spacing from the supplied bounding box and resolution, and sets the lattice origin to the bounding box's minimum corner position.

Note
If the bounding box range along a dimension is near zero (i.e. smaller than primal::PRIMAL_TINY, the grid resolution in that dimension will be set to zero in that dimension.

References axom::primal::BoundingBox< T, NDIMS >::getMax(), and axom::primal::BoundingBox< T, NDIMS >::getMin().

◆ operator==()

template<int NDIMS, typename SpaceCoordType , typename CellCoordType >
bool axom::spin::operator== ( const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &  lhs,
const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &  rhs 
)

Free functions implementing comparison and arithmetic operators

Equality operator on two RectangularLattices

References axom::spin::RectangularLattice< NDIMS, SpaceCoordType, CellCoordType >::origin(), and axom::spin::RectangularLattice< NDIMS, SpaceCoordType, CellCoordType >::spacing().

◆ operator!=()

template<int NDIMS, typename SpaceCoordType , typename CellCoordType >
bool axom::spin::operator!= ( const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &  lhs,
const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &  rhs 
)

Inequality operator on two RectangularLattices

◆ operator<<()

template<int NDIMS, typename SpaceCoordType , typename CellCoordType >
std::ostream& axom::spin::operator<< ( std::ostream &  os,
const RectangularLattice< NDIMS, SpaceCoordType, CellCoordType > &  lattice 
)