include/pops/amr/hierarchy/refinement_ratio.hpp File ReferenceΒΆ

adc_cpp: include/pops/amr/hierarchy/refinement_ratio.hpp File Reference
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
refinement_ratio.hpp File Reference

Single source of truth for the native AMR refinement ratio. More...

#include <stdexcept>
#include <string>
+ Include dependency graph for refinement_ratio.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pops
 

Functions

void pops::require_supported_ref_ratio (int ratio)
 Validates a requested AMR refinement ratio at the hierarchy boundary.
 

Variables

constexpr int pops::kAmrRefRatio = 2
 The native AMR refinement ratio between two consecutive levels.
 

Detailed Description

Single source of truth for the native AMR refinement ratio.

Layer: include/pops/amr. Role: the in-house (non-SAMRAI) AMR hierarchy refines and coarsens by a FIXED integer ratio between consecutive levels. That ratio is 2, and several coarse/fine paths (aux/density injection, reflux, Berger-Oliger subcycling, the condensed-Schur composite FAC) are written for ratio 2. Rather than scatter the literal 2 across those files, the ratio lives here as one named constant, and require_supported_ref_ratio rejects any other value at the hierarchy boundary. A future non-2 ratio therefore has a single entry point instead of a literal hunt: bump kAmrRefRatio, then the static_asserts guarding the ratio-2-structural kernels (e.g. the 2x2 average-down unroll in numerics/time/amr_reflux.hpp) fail loudly at exactly the sites that need generalizing.

Scope note: this is the AMR INTER-LEVEL ratio. The geometric-multigrid V-cycle coarsens its OWN domain by 2 internally; that is the linear solver's coarsening factor, a separate concern, and is deliberately NOT governed by this constant.