Template Struct UniformGrid

Struct Documentation

template<unsigned dim>
struct UniformGrid

Public Functions

inline LO GetNumCells() const
inline LO ClosestCellID(const Omega_h::Vector<dim> &point) const

return the grid cell ID that the input point is inside or closest to if the point lies outside

inline LO AxisCellIndex(size_t axis, Real coord) const

Index of the cell containing coord along axis, clamped to the grid. The single definition of the grid’s binning rule: keeping the point query and the cell-range query on this one formula is what guarantees a point always lands in a cell that its own element was binned into.

inline LO CellIndexFromAxisIndices(Kokkos::Array<LO, dim> indexes) const

Linear cell ID from per-axis indices given in coordinate order (x,y,z).

inline AABBox<dim> GetCellBBOX(LO idx) const
inline bool IsPointInBounds(const Omega_h::Vector<dim> &point) const

Check if a point is within the grid bounds.

inline Kokkos::Array<LO, dim> GetDimensionedIndex(LO idx) const
inline LO GetCellIndex(Kokkos::Array<LO, dim> dimensionedIndex) const

Public Members

Kokkos::Array<Real, dim> edge_length
Kokkos::Array<Real, dim> bot_left
Kokkos::Array<LO, dim> divisions