include/pops/numerics/spatial/operators/masked_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
|
masked_operator.hpp
Go to the documentation of this file.
20#include <pops/numerics/spatial/primitives/face_flux.hpp> // reconstruct_pp, require_reconstruction_ghosts
29// The mask makes the FV transport aware of an ACTIVE sub-domain (e.g. a bounded disk-shaped region).
31// computed) if BOTH adjacent cells are active; it is CLOSED (normal flux set to ZERO) if at least
33// over the active sub-domain: no mass crosses the boundary, so the total mass over the active cells
34// is conserved to machine precision (telescoping internal fluxes, zero boundary fluxes). This is the
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
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).
POPS_HD bool mask_active(const ConstArray4 &mask, int i, int j)
Activity indicator of a cell from a 0/1 cell-centered mask (>= 0.5 -> active).
Definition masked_operator.hpp:44
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_masked(const Model &model, const MultiFab &U, const MultiFab &aux, const MultiFab &mask, const Geometry &geom, MultiFab &R, bool recon_prim=false, Real pos_floor=Real(0))
assemble_rhs_masked<Limiter,NumericalFlux>: residual R = -div Fhat + S RESTRICTED to a 0/1 cell-cente...
Definition masked_operator.hpp:133
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
AssembleRhsMaskedKernel: variant of AssembleRhsKernel AWARE of a domain mask.
Definition masked_operator.hpp:59
POPS_HD void operator()(int i, int j) const
Definition masked_operator.hpp:69
Real pos_floor
Zhang-Shu positivity limiter (<= 0: inactive, bit-identical)
Definition masked_operator.hpp:67
int pos_comp
component of the Density role (resolved by the host caller)
Definition masked_operator.hpp:68
Generated by