Ordered list of boxes tiling a level.
More...
#include <box_array.hpp>
|
| | BoxArray ()=default |
| |
| | BoxArray (std::vector< Box2D > boxes) |
| | Build from an already-computed list of boxes (move). The order is kept as is.
|
| |
| int | size () const |
| | Number of boxes in the tiling.
|
| |
| const Box2D & | operator[] (int i) const |
| | Box at global index i (0 <= i < size()); the index is the box identity throughout the code.
|
| |
| const std::vector< Box2D > & | boxes () const |
| | View on the underlying vector (element-by-element equality = same boxes AND same order).
|
| |
| std::int64_t | num_cells () const |
| | Total number of valid cells (sum of num_cells over all boxes).
|
| |
| Box2D | bounding_box () const |
| | Smallest box enclosing all boxes (empty box if the tiling is empty).
|
| |
|
| 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.
|
| |
Ordered list of boxes tiling a level.
Expected INVARIANT (not checked): boxes disjoint and covering the domain. The ORDER is significant (global box index = position in the vector; shared by MultiFab / DistributionMapping). Copyable (vector of Box2D).
◆ BoxArray() [1/2]
| pops::BoxArray::BoxArray |
( |
| ) |
|
|
default |
◆ BoxArray() [2/2]
| pops::BoxArray::BoxArray |
( |
std::vector< Box2D > |
boxes | ) |
|
|
inlineexplicit |
Build from an already-computed list of boxes (move). The order is kept as is.
◆ bounding_box()
| Box2D pops::BoxArray::bounding_box |
( |
| ) |
const |
|
inline |
Smallest box enclosing all boxes (empty box if the tiling is empty).
◆ boxes()
| const std::vector< Box2D > & pops::BoxArray::boxes |
( |
| ) |
const |
|
inline |
View on the underlying vector (element-by-element equality = same boxes AND same order).
◆ from_domain()
| static BoxArray pops::BoxArray::from_domain |
( |
const Box2D & |
domain, |
|
|
int |
max_grid_size |
|
) |
| |
|
inlinestatic |
Tile the domain into tiles of at most max_grid_size per direction, distributed evenly.
Traversal order is y outer, x inner (deterministic, identical on all ranks).
◆ num_cells()
| std::int64_t pops::BoxArray::num_cells |
( |
| ) |
const |
|
inline |
Total number of valid cells (sum of num_cells over all boxes).
◆ operator[]()
| const Box2D & pops::BoxArray::operator[] |
( |
int |
i | ) |
const |
|
inline |
Box at global index i (0 <= i < size()); the index is the box identity throughout the code.
◆ size()
| int pops::BoxArray::size |
( |
| ) |
const |
|
inline |
Number of boxes in the tiling.
The documentation for this class was generated from the following file: