include/pops/numerics/spatial/operators/cartesian_operator.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
|
cartesian_operator.hpp
Go to the documentation of this file.
20#include <pops/numerics/spatial/primitives/face_flux.hpp> // reconstruct_pp, require_reconstruction_ghosts
22#include <pops/numerics/spatial/primitives/state_access.hpp> // load_state, load_aux, DiffusiveModel
36// instantiated from an EXTERNAL TU through the std::function / host-lambda nesting of block_builder:
37// the test passes on Serial and under compute-sanitizer but segfaults at runtime on Cuda (Heisenbug).
38// A device-callable class does not have these instantiation-context restrictions. Body IDENTICAL to
107void assemble_rhs(const Model& model, const MultiFab& U, const MultiFab& aux, const Geometry& geom,
ConstArray4 const_array() const
READ handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
Definition fab2d.hpp:96
Array4 array()
WRITE handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
Definition fab2d.hpp:91
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
const Box2D & box(int li) const
VALID box of local fab li.
Definition multifab.hpp:71
int local_size() const
Number of fabs OWNED by this rank (bound on local indices).
Definition multifab.hpp:65
DiffusiveModel: optional concept for models with isotropic scalar diffusion.
Definition state_access.hpp:38
Fab2D: single-grid data on a Box2D (in-house equivalent of AMReX's FArrayBox); Array4 / ConstArray4: ...
Face-state reconstruction and face fluxes of the Cartesian spatial operator.
for_each_cell and reductions: the parallelism SEAM over the cells of a Box2D; sync_host / sync_device...
Geometry: index-space (Box2D) <-> Cartesian physical-space mapping; PolarGeometry: SIBLING for a glob...
MultiFab: a field DISTRIBUTED over a level (equivalent of AMReX's MultiFab).
Definition amr_hierarchy.hpp:29
void for_each_cell(const Box2D &b, F f)
Applies f to EACH cell (i, j) of box b (bounds inclusive), via Kokkos::parallel_for (Serial / OpenMP ...
Definition for_each.hpp:138
void assemble_rhs(const Model &model, const MultiFab &U, const MultiFab &aux, const Geometry &geom, MultiFab &R, bool recon_prim=false, Real pos_floor=Real(0))
assemble_rhs<Limiter,NumericalFlux>: residual R = -div Fhat + S over all boxes.
Definition cartesian_operator.hpp:107
void assemble_rhs_hll_cached(const Model &model, const MultiFab &U, const MultiFab &aux, const Geometry &geom, MultiFab &R, MultiFab &cache, bool recon_prim=false, Real pos_floor=Real(0))
assemble_rhs_hll_cached<Limiter>: residual R = -div Fhat + S at the HLL flux, wave speeds PRE-COMPUTE...
Definition cartesian_operator.hpp:205
void 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).
Definition wave_speed.hpp:277
POPS_HD Model::State hll_flux_with_speeds(const Model &m, const typename Model::State &UL, const Aux &AL, const typename Model::State &UR, const Aux &AR, int dir, Real sL, Real sR)
hll_flux_with_speeds: HLL flux from ALREADY estimated signal speeds (sL, sR).
Definition numerical_flux.hpp:96
Single-interface numerical flux policies: Rusanov, HLL, HLLC, Roe.
Zhang-Shu positivity limiter and Density-role resolution.
Model/state/aux access layer of the Cartesian spatial operator.
WRITE POD handle (raw pointer + strides) over a Fab2D buffer, indexed by (i, j, c) IN GLOBAL INDICES ...
Definition fab2d.hpp:29
POINTWISE auxiliary fields shared with the physics: single coupling channel.
Definition state.hpp:123
READ-only handle (const counterpart of Array4): same layout and same contract (POD device-copyable,...
Definition fab2d.hpp:44
Cartesian geometry of a level: index domain + physical bounds [xlo, xhi] x [ylo, yhi].
Definition geometry.hpp:20
POPS_HD Real dy() const
Grid spacing in y (= (yhi - ylo) / domain.ny()). POPS_HD.
Definition geometry.hpp:33
POPS_HD Real dx() const
Grid spacing in x (= (xhi - xlo) / domain.nx()). POPS_HD.
Definition geometry.hpp:31
AssembleRhsHllCachedKernel: kernel of the residual R = -div Fhat + S for the HLL flux with wave speed...
Definition cartesian_operator.hpp:132
bool recon_prim
Definition cartesian_operator.hpp:138
POPS_HD void operator()(int i, int j) const
Definition cartesian_operator.hpp:141
Real pos_floor
Zhang-Shu positivity limiter (<= 0: inactive, bit-identical)
Definition cartesian_operator.hpp:139
int pos_comp
Density role component (resolved by the host caller)
Definition cartesian_operator.hpp:140
AssembleRhsKernel<Limiter,NumericalFlux,Model>: device kernel of the central residual of assemble_rhs...
Definition cartesian_operator.hpp:41
Real pos_floor
Zhang-Shu positivity limiter (<= 0: inactive, bit-identical)
Definition cartesian_operator.hpp:49
POPS_HD void operator()(int i, int j) const
Definition cartesian_operator.hpp:51
int pos_comp
component of the Density role (resolved by the host caller)
Definition cartesian_operator.hpp:50
Global wave-speed / step-bound reductions and the HLL wave-speed cache.
Generated by