include/pops/numerics/spatial/primitives/face_flux.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
|
face_flux.hpp
Go to the documentation of this file.
18#include <pops/core/model/physical_model.hpp> // HasPrimitiveVars: optional primitive reconstruction
28#include <stdexcept> // require_reconstruction_ghosts: state without the stencil width -> clear error
37POPS_HD inline typename Model::State rusanov_flux(const Model& m, const typename Model::State& UL,
114POPS_HD inline typename Model::State reconstruct_pp(const Model& model, const ConstArray4& u, int i,
249void compute_face_fluxes(const Model& model, const MultiFab& U, const MultiFab& aux, MultiFab& Fx,
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
OPTIONAL extension of a PhysicalModel: primitive variables + cons<->prim conversions.
Definition physical_model.hpp:167
Fab2D: single-grid data on a Box2D (in-house equivalent of AMReX's FArrayBox); Array4 / ConstArray4: ...
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).
void require_reconstruction_ghosts(const MultiFab &U)
require_reconstruction_ghosts<Limiter>: STRUCTURAL ENTRY GUARD of the FV spatial operators.
Definition face_flux.hpp:133
Definition amr_hierarchy.hpp:29
POPS_HD Model::State rusanov_flux(const Model &m, const typename Model::State &UL, const Aux &AL, const typename Model::State &UR, const Aux &AR, int dir)
rusanov_flux: free compat, delegates to RusanovFlux{} (policy of numerical_flux.hpp).
Definition face_flux.hpp:37
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
POPS_HD Aux load_aux(const ConstArray4 &a, int i, int j)
load_aux<NComp>: reads NComp components of the auxiliary from an Array4 at (i,j).
Definition state_access.hpp:141
void compute_face_fluxes(const Model &model, const MultiFab &U, const MultiFab &aux, MultiFab &Fx, MultiFab &Fy, Real dx=0, Real dy=0, bool recon_prim=false, Real pos_floor=Real(0))
compute_face_fluxes<Limiter,NumericalFlux>: writes the face fluxes BEFORE divergence.
Definition face_flux.hpp:249
POPS_HD Model::State reconstruct_pp(const Model &model, const ConstArray4 &u, int i, int j, int dir, Real sgn, const Limiter &lim, bool prim, Real pos_floor, int pos_comp)
reconstruct_pp: reconstruct + zhang_shu_scale positivity limiter on the returned state.
Definition face_flux.hpp:114
Box2D xface_box(const Box2D &v)
xface_box / yface_box: face boxes normal to x (resp.
Definition face_flux.hpp:147
POPS_HD Real weno5z(Real vm2, Real vm1, Real v0, Real vp1, Real vp2)
weno5z: WENO5-Z reconstruction (Borges 2008) at one interface, on a 5-point stencil.
Definition reconstruction.hpp:70
POPS_HD Model::State reconstruct(const Model &model, const ConstArray4 &u, int i, int j, int dir, Real sgn, const Limiter &lim, bool prim)
reconstruct<Model,Limiter>: face value at (i,j) extrapolated in direction dir.
Definition face_flux.hpp:51
Single-interface numerical flux policies: Rusanov, HLL, HLLC, Roe.
C++20 concepts defining the contract of the physics layer.
Zhang-Shu positivity limiter and Density-role resolution.
Interface reconstruction policies: MUSCL limiters and WENO5-Z.
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
RusanovFlux (local Lax-Friedrichs): robust flux, compatible with any minimal PhysicalModel.
Definition numerical_flux.hpp:55
FaceFluxXKernel: device kernel for the flux at the radial x face (between i-1 and i).
Definition face_flux.hpp:161
Real pos_floor
Zhang-Shu positivity limiter (<= 0: inactive, bit-identical)
Definition face_flux.hpp:169
POPS_HD void operator()(int i, int j) const
Definition face_flux.hpp:171
int pos_comp
component of the Density role (resolved by the host caller)
Definition face_flux.hpp:170
FaceFluxYKernel: device kernel for the flux at the y face (between j-1 and j).
Definition face_flux.hpp:191
POPS_HD void operator()(int i, int j) const
Definition face_flux.hpp:201
int pos_comp
component of the Density role (resolved by the host caller)
Definition face_flux.hpp:200
Real pos_floor
Zhang-Shu positivity limiter (<= 0: inactive, bit-identical)
Definition face_flux.hpp:199
Generated by