AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
A rectangular lattice maps all of space (of dimension NDIMS) into a rectangular grid of cells identified by integer coordinates. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.3.3/src/axom/spin/RectangularLattice.hpp>
Public Types | |
using | GridCell = primal::Point< CellCoordType, NDIMS > |
using | SpacePoint = primal::Point< SpaceCoordType, NDIMS > |
using | SpaceVector = primal::Vector< SpaceCoordType, NDIMS > |
using | SpatialBoundingBox = primal::BoundingBox< SpaceCoordType, NDIMS > |
Public Member Functions | |
RectangularLattice () | |
Default constructor. More... | |
RectangularLattice (const SpacePoint &origin) | |
Constructor from a given origin. More... | |
RectangularLattice (const SpacePoint &origin, const SpaceVector &spacing) | |
Constructor from a given origin and spacing. More... | |
RectangularLattice (SpaceCoordType *origin_data, SpaceCoordType *spacing_data) | |
Constructor from SpaceCoordType arrays. More... | |
const SpacePoint & | origin () const |
const SpaceVector & | spacing () const |
GridCell | gridCell (const SpacePoint &pt) const |
SpacePoint | spacePoint (const GridCell &cell) const |
SpatialBoundingBox | cellBounds (const GridCell &cell) const |
Find the spatial bounding box of a lattice cell. More... | |
std::ostream & | print (std::ostream &os) const |
A rectangular lattice maps all of space (of dimension NDIMS) into a rectangular grid of cells identified by integer coordinates.
NDIMS | the dimension of the space |
SpaceCoordType | the type of the spatial coordinates. Default: double |
CellCoordType | the type of the integral lattice coordinates. Default: int |
A rectangular lattice maps every point in space (a SpacePoint) to a unique rectangular cell with integral coordinates (a GridCell). Each lattice cell is identified with the integer grid point at its lowest corner in each dimension.
RectangularLattice also maps GridCell coordinates back to spatial coordinates or to the bounding box of the GridCell.
GridCells follow a half-open boundary convention. Points on their lower boundaries get mapped to the cell, while points on their upper boundaries get mapped to neighboring cells.
A RectangularLattice is defined by an origin (a SpacePoint) and a grid spacing (a SpaceVector).
using axom::spin::RectangularLattice< NDIMS, SpaceCoordType, CellCoordType >::GridCell = primal::Point< CellCoordType, NDIMS > |
using axom::spin::RectangularLattice< NDIMS, SpaceCoordType, CellCoordType >::SpacePoint = primal::Point< SpaceCoordType, NDIMS > |
using axom::spin::RectangularLattice< NDIMS, SpaceCoordType, CellCoordType >::SpaceVector = primal::Vector< SpaceCoordType, NDIMS > |
using axom::spin::RectangularLattice< NDIMS, SpaceCoordType, CellCoordType >::SpatialBoundingBox = primal::BoundingBox< SpaceCoordType, NDIMS > |
|
inline |
Default constructor.
|
inline |
Constructor from a given origin.
origin | The lattice's origin |
|
inline |
Constructor from a given origin and spacing.
origin | The lattice's origin |
spacing | The lattice's spacing |
|
inline |
Constructor from SpaceCoordType arrays.
origin_date | An array containing the origin's coordinates |
spacing_data | An array containing the spacing coordinates |
|
inline |
Accessor for lattice origin
Referenced by axom::spin::operator==().
|
inline |
Accessor for lattice spacing
Referenced by axom::spin::operator==(), and axom::spin::rectangular_lattice_from_bounding_box().
|
inline |
Returns the lattice cell associated with the given space point pt
Referenced by axom::spin::ImplicitGrid< NDIMS, TheIndexType >::getCandidates(), axom::spin::UniformGrid< T, NDIMS >::insert(), and axom::spin::ImplicitGrid< NDIMS, TheIndexType >::insert().
|
inline |
Returns the space point associated with lowest corner of GridCell cell
Referenced by axom::spin::RectangularLattice< NDIMS, double, int >::cellBounds().
|
inline |
Find the spatial bounding box of a lattice cell.
|
inline |
Simple formatted print of a rectangular lattice
Referenced by axom::spin::operator<<().