include/pops/numerics/spatial/primitives/wave_speed.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
|
wave_speed.hpp File Reference
Global wave-speed / step-bound reductions and the HLL wave-speed cache. More...
#include <pops/core/state/state.hpp>#include <pops/core/foundation/types.hpp>#include <pops/mesh/storage/fab2d.hpp>#include <pops/mesh/execution/for_each.hpp>#include <pops/mesh/storage/multifab.hpp>#include <pops/numerics/spatial/primitives/state_access.hpp>#include <pops/parallel/comm.hpp>#include <algorithm>#include <limits>
Include dependency graph for wave_speed.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | pops::detail::MaxWaveSpeedKernel< Model > |
| MaxWaveSpeedKernel<Model>: device reduction functor for max_wave_speed_mf. More... | |
| struct | pops::detail::WaveSpeedMatchKernel< Model > |
| Locates the cell DOMINATING the CFL (dt_hotspot diagnostic, ADC-182): EQUALITY scan of the recomputed w – same functor and same data as MaxWaveSpeedKernel, hence bit-equal to the max returned by max_wave_speed_mf – which encodes the GLOBAL index j*nx + i as Real (exact as long as nx*ny < 2^53) and reduces to the MIN (first cell in lexicographic order: deterministic). More... | |
| struct | pops::detail::StabilitySpeedKernel< Model > |
| StabilitySpeedKernel: max over cells/directions of model.stability_speed (replaces MaxWaveSpeedKernel when the trait is declared). More... | |
| struct | pops::detail::SourceFrequencyKernel< Model > |
| SourceFrequencyKernel: max over cells of model.source_frequency (mu >= 0, 1/s). More... | |
| struct | pops::detail::InvStabilityDtKernel< Model > |
| InvStabilityDtKernel: max over cells of 1/model.stability_dt. More... | |
| struct | pops::detail::WaveSpeedCacheKernel< Model > |
| WaveSpeedCacheKernel: evaluates model.wave_speeds per cell in both directions and stores (lo_x, hi_x, lo_y, hi_y) in a 4-component scratch. More... | |
Namespaces | |
| namespace | pops |
| namespace | pops::detail |
Functions | |
| template<class Model > | |
| Real | pops::max_wave_speed_mf (const Model &model, const MultiFab &U, const MultiFab &aux) |
| max_wave_speed_mf: global max of the wave speed over the whole MultiFab (CFL). | |
| template<class Model > | |
| void | pops::max_wave_speed_hotspot_mf (const Model &model, const MultiFab &U, const MultiFab &aux, int nx, Real &w_out, int &i_out, int &j_out) |
| dt_hotspot diagnostic (ADC-182): the cell (GLOBAL indices) that dominates the block's transport CFL bound, and its speed w = max(wx, wy). | |
| template<class Model > | |
| Real | pops::max_stability_speed_mf (const Model &model, const MultiFab &U, const MultiFab &aux) |
| Global max of the STABILITY speed (HasStabilitySpeed trait) – counterpart of max_wave_speed_mf. | |
| template<class Model > | |
| Real | pops::max_source_frequency_mf (const Model &model, const MultiFab &U, const MultiFab &aux) |
| Global max of the source frequency (HasSourceFrequency trait). 0 if the source does not constrain. | |
| template<class Model > | |
| Real | pops::min_stability_dt_mf (const Model &model, const MultiFab &U, const MultiFab &aux) |
| Global min of the declared admissible step (HasStabilityDt trait), via max(1/dt) (cf. | |
| template<class Model > | |
| void | pops::fill_wave_speed_cache (const Model &model, const MultiFab &U, const MultiFab &aux, MultiFab &cache) |
| fill_wave_speed_cache: fills the per-cell wave speed scratch (lo_x, hi_x, lo_y, hi_y). | |
Detailed Description
Global wave-speed / step-bound reductions and the HLL wave-speed cache.
CONTRACT: the CFL and step-bound reductions over a whole MultiFab (device reduction + MPI all_reduce), plus the OPT-IN per-cell wave-speed scratch fill.
- max_wave_speed_mf: global max CFL speed (collective under MPI).
- max_wave_speed_hotspot_mf: cell dominating the CFL bound (diagnostic, ADC-182).
- max_stability_speed_mf / max_source_frequency_mf / min_stability_dt_mf: optional step-bound traits (HasStabilitySpeed / HasSourceFrequency / HasStabilityDt).
- fill_wave_speed_cache: per-cell (lo_x, hi_x, lo_y, hi_y) scratch for the HLL cache path (the scratch is CONSUMED in cartesian_operator.hpp).
COLLECTIVE UNDER MPI: every reduction aggregates via all_reduce over ALL ranks; without it each rank would choose a different dt and the simulation desynchronizes (see notes below).
Generated by