include/pops/amr/regridding/regrid.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
|
regrid.hpp
Go to the documentation of this file.
AmrHierarchy: the stack of refinement levels (container of the AMR hierarchy).
Box2D: the integer index space of a 2D cell-centered Cartesian grid.
BoxArray: the set of boxes tiling a level (disjoint, covering).
Stack of refined levels (domain + BoxArray + MultiFab per level), level 0 the coarsest.
Definition amr_hierarchy.hpp:38
void clear_above(int lev)
Removes all levels strictly finer than lev (no-op if lev is already the finest).
Definition amr_hierarchy.hpp:90
MultiFab & data(int lev)
Field of level lev (mutable access).
Definition amr_hierarchy.hpp:112
int ncomp() const
Number of field components per cell.
Definition amr_hierarchy.hpp:103
int n_grow() const
Number of ghost layers of the MultiFab.
Definition amr_hierarchy.hpp:105
int ref_ratio() const
Integer refinement ratio between consecutive levels.
Definition amr_hierarchy.hpp:101
const Box2D & domain(int lev) const
Domain of level lev in index space (INCLUSIVE lo/hi corners).
Definition amr_hierarchy.hpp:108
int num_levels() const
Number of levels present (>= 1: level 0 always exists).
Definition amr_hierarchy.hpp:99
void install_level(int lev, const BoxArray &fine_ba, MultiFab data)
Installs (adds or replaces) a fine level at index lev.
Definition amr_hierarchy.hpp:72
Single-grid data on a Box2D: VALID box + ng ghost layers, ncomp components, component-slow layout.
Definition fab2d.hpp:59
ConstArray4 const_array() const
READ handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
Definition fab2d.hpp:96
Field distributed over a level: decomposition (BoxArray) + distribution (DistributionMapping) + ncomp...
Definition multifab.hpp:33
Fab2D & fab(int li)
Local fab at index li (0 <= li < local_size()), for writing.
Definition multifab.hpp:67
int local_size() const
Number of fabs OWNED by this rank (bound on local indices).
Definition multifab.hpp:65
Berger-Rigoutsos clustering: tag grid -> small set of boxes covering the tagged cells.
Parallel seam: minimal MPI abstraction (rank/size + collectives) with serial fallback.
DistributionMapping: maps each box (by global index) to its owning MPI rank.
Fab2D: single-grid data on a Box2D (in-house equivalent of AMReX's FArrayBox); Array4 / ConstArray4: ...
MultiFab: a field DISTRIBUTED over a level (equivalent of AMReX's MultiFab).
Definition amr_hierarchy.hpp:29
void regrid_level(AmrHierarchy &h, int coarse_lev, Crit crit, const RegridParams &rp={})
(Re)builds level coarse_lev+1 from the tagging of level coarse_lev.
Definition regrid.hpp:87
void interpolate(const MultiFab &coarse, MultiFab &fine, int r, MultiFab &cfine)
Interpolation coarse -> fine (ratio r) by piecewise-CONSTANT injection: each fine cell (including the...
Definition refinement.hpp:220
void parallel_copy(MultiFab &dst, const MultiFab &src)
Copies the valid regions that OVERLAP from src to dst (same indices, no shift).
Definition refinement.hpp:50
std::vector< Box2D > berger_rigoutsos(const TagBox &tags, const ClusterParams &p={})
Cluster a TagBox into boxes covering the tagged cells (Berger-Rigoutsos), then final chop.
Definition cluster.hpp:185
TagBox grow_tags(const TagBox &in, int n, const Box2D &domain)
Grows the tags by n cells (square neighborhood), staying within the domain.
Definition regrid.hpp:58
TagBox tag_cells(const MultiFab &mf, const Box2D &domain, Crit crit)
Marks the valid cells where the predicate is true, on a TagBox covering the domain.
Definition regrid.hpp:40
AMR inter-level transfer operators (integer ratio r) + parallel_copy.
bool contains(int i, int j) const
true if cell (i, j) is inside the box (lo/hi bounds inclusive).
Definition box2d.hpp:61
Berger-Rigoutsos clustering parameters (configuration object).
Definition cluster.hpp:31
READ-only handle (const counterpart of Array4): same layout and same contract (POD device-copyable,...
Definition fab2d.hpp:44
ClusterParams cluster
Berger-Rigoutsos clustering parameters.
Definition regrid.hpp:76
int n_buffer
tag dilation radius (grow_tags) before clustering.
Definition regrid.hpp:75
Dense grid of 0/1 markers over a box, input to Berger-Rigoutsos clustering.
Definition tag_box.hpp:35
TagBox: dense grid of markers (0/1) over a region, input to Berger-Rigoutsos clustering.
Generated by