include/pops/mesh/index/box_hash.hpp Source FileΒΆ
|
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
|
box_hash.hpp
Go to the documentation of this file.
Box2D: the integer index space of a 2D cell-centered Cartesian grid.
BoxArray: the set of boxes tiling a level (disjoint, covering).
BoxHash(const BoxArray &ba, int bin)
Builds the index: bin = side of a bin (cells); bin <= 0 forces bin = 1.
Definition box_hash.hpp:30
std::vector< int > query(const Box2D &q) const
Indices (SORTED, without duplicates) of the boxes that may intersect q: guaranteed SUPERSET (no inter...
Definition box_hash.hpp:41
Definition amr_hierarchy.hpp:29
POPS_HD constexpr int floor_div(int a, int b)
Integer division of a by b rounded down (handles a < 0 AND b < 0). POPS_HD constexpr (kernels).
Definition box2d.hpp:28
int suggest_bin(const BoxArray &ba)
Recommended bin size for a BoxArray: the largest box extent (at least 1), so that neighboring boxes f...
Definition box_hash.hpp:72
bool empty() const
true if the box contains no cell (hi < lo in one direction).
Definition box2d.hpp:58
Generated by