include/pops/amr/tagging/tag_box.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
|
tag_box.hpp
Go to the documentation of this file.
Box2D: the integer index space of a 2D cell-centered Cartesian grid.
Definition amr_hierarchy.hpp:29
TagBox tag_union(const std::vector< TagBox > &parts)
Union (cell-by-cell logical OR) of several TagBox sharing EXACTLY the same box.
Definition tag_box.hpp:74
POPS_HD int nx() const
Width (direction 0). POPS_HD (called from Geometry::dx() in a device kernel).
Definition box2d.hpp:50
bool contains(int i, int j) const
true if cell (i, j) is inside the box (lo/hi bounds inclusive).
Definition box2d.hpp:61
Dense grid of 0/1 markers over a box, input to Berger-Rigoutsos clustering.
Definition tag_box.hpp:35
TagBox(const Box2D &b)
Build a TagBox covering b, all markers at 0 (buffer sized on b.num_cells()).
Definition tag_box.hpp:41
std::int64_t count() const
Number of tagged cells (sum of markers).
Definition tag_box.hpp:52
bool tagged(int i, int j) const
true if (i, j) is in box AND tagged; safe (bound check included, unlike operator()).
Definition tag_box.hpp:49
char & operator()(int i, int j)
Write access to marker (i, j); (i, j) MUST be in box (no bound check).
Definition tag_box.hpp:45
TagBox()=default
char operator()(int i, int j) const
Read access to marker (i, j); (i, j) MUST be in box (no bound check).
Definition tag_box.hpp:47
Generated by