include/pops/coupling/base/elliptic_rhs.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
|
elliptic_rhs.hpp
Go to the documentation of this file.
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
void set_val(Real v)
Fills all cells (valid + ghosts) of every local fab with v.
Definition multifab.hpp:85
int local_size() const
Number of fabs OWNED by this rank (bound on local indices).
Definition multifab.hpp:65
Coupled multi-species system, composed at runtime from generic bricks.
Definition system.hpp:89
CoupledSystem: heterogeneous collection of equation blocks (multi-species, multi-scheme).
for_each_cell and reductions: the parallelism SEAM over the cells of a Box2D; sync_host / sync_device...
MultiFab: a field DISTRIBUTED over a level (equivalent of AMReX's MultiFab).
Definition amr_hierarchy.hpp:29
void add_scaled_component(const MultiFab &U, Real q, int comp, MultiFab &rhs)
rhs(.,.,0) += q * U(.,.,comp) over the valid cells.
Definition elliptic_rhs.hpp:136
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
Cartesian spatial operator: assembles R(U, aux) = -div F + S over the cells of a level.
WRITE POD handle (raw pointer + strides) over a Fab2D buffer, indexed by (i, j, c) IN GLOBAL INDICES ...
Definition fab2d.hpp:29
N-species Poisson RHS: f = Sum_s q_s n_s over ALL blocks of the system.
Definition elliptic_rhs.hpp:153
void operator()(const System &system, MultiFab &rhs) const
rhs <- 0 then += q_s n_s for each block. Throws if species.size() != n_blocks.
Definition elliptic_rhs.hpp:158
READ-only handle (const counterpart of Array4): same layout and same contract (POD device-copyable,...
Definition fab2d.hpp:44
SINGLE-model RHS assembler: rhs(.,.,0) = model.elliptic_rhs(U) over the valid cells.
Definition elliptic_rhs.hpp:43
void operator()(const MultiFab &state, MultiFab &rhs) const
rhs <- elliptic_rhs(state) cell by cell (identical layouts between state and rhs).
Definition elliptic_rhs.hpp:47
Charge (with sign) and density component of a species for the elliptic RHS assembly.
Definition elliptic_rhs.hpp:116
Two-block RHS: same computation as TwoFieldChargeDensityRhs but reads blocks 0 and 1 of a CoupledSyst...
Definition elliptic_rhs.hpp:94
void operator()(const System &system, MultiFab &rhs) const
rhs <- q0 n_0 + q1 n_1 from blocks 0 and 1 of the system.
Definition elliptic_rhs.hpp:102
Two-field RHS: rhs = q0 * U0(.,.,comp0) + q1 * U1(.,.,comp1) (two-species charge density).
Definition elliptic_rhs.hpp:72
void operator()(const MultiFab &U0, const MultiFab &U1, MultiFab &rhs) const
rhs <- q0 U0 + q1 U1 over the valid cells (identical layouts).
Definition elliptic_rhs.hpp:79
NAMED functor (not an POPS_HD lambda) of the accumulation: r(i,j,0) += a * u(i,j,c).
Definition elliptic_rhs.hpp:124
POPS_HD void operator()(int i, int j) const
Definition elliptic_rhs.hpp:129
NAMED functor (not an POPS_HD lambda) of the single-model RHS: f(i,j,0) = model.elliptic_rhs(U).
Definition elliptic_rhs.hpp:29
POPS_HD void operator()(int i, int j) const
Definition elliptic_rhs.hpp:33
NAMED functor (not an POPS_HD lambda) of the two-field RHS: r(i,j,0) = a0 u0 + a1 u1.
Definition elliptic_rhs.hpp:61
POPS_HD void operator()(int i, int j) const
Definition elliptic_rhs.hpp:66
Base scalar types and the POPS_HD macro (host+device portability).
Generated by