include/pops/mesh/layout/box_array.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_array.hpp
Go to the documentation of this file.
Box2D: the integer index space of a 2D cell-centered Cartesian grid.
const Box2D & operator[](int i) const
Box at global index i (0 <= i < size()); the index is the box identity throughout the code.
Definition box_array.hpp:44
BoxArray(std::vector< Box2D > boxes)
Build from an already-computed list of boxes (move). The order is kept as is.
Definition box_array.hpp:26
std::int64_t num_cells() const
Total number of valid cells (sum of num_cells over all boxes).
Definition box_array.hpp:49
Box2D bounding_box() const
Smallest box enclosing all boxes (empty box if the tiling is empty).
Definition box_array.hpp:57
const std::vector< Box2D > & boxes() const
View on the underlying vector (element-by-element equality = same boxes AND same order).
Definition box_array.hpp:46
BoxArray()=default
static BoxArray from_domain(const Box2D &domain, int max_grid_size)
Tile the domain into tiles of at most max_grid_size per direction, distributed evenly.
Definition box_array.hpp:30
Definition amr_hierarchy.hpp:29
Generated by