include/pops/coupling/schur/core/schur_source_kernels.hpp File ReferenceΒΆ

adc_cpp: include/pops/coupling/schur/core/schur_source_kernels.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
schur_source_kernels.hpp File Reference

Geometry-INDEPENDENT device kernels shared by the Schur SOURCE-STAGE steppers: the Cartesian condensed_schur_source_stepper.hpp, the polar polar_condensed_schur_source_stepper.hpp, and (transitively) the AMR variant. More...

#include <pops/core/foundation/types.hpp>
#include <pops/mesh/storage/fab2d.hpp>
#include <stdexcept>
#include <string>
+ Include dependency graph for schur_source_kernels.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pops::detail::SchurExtrapolateScalarKernel
 Linear extrapolation of a SCALAR field from the theta-stage to the full step: f^{n+1} = f^n + (1/theta) (f^{n+theta} - f^n). More...
 
struct  pops::detail::SchurExtrapolateVelocityKernel
 Linear extrapolation of the VELOCITY (vx, vy) from the theta-stage to the full step, then recompose mom = rho^n v^{n+1} into the state. More...
 
struct  pops::detail::SchurEnergyKernel
 Energy update: E^{n+1} = E^n + (1/2) rho^n (|v^{n+1}|^2 - |v^n|^2). More...
 
struct  pops::detail::ExtractVelocityKernel
 Extracts the velocity v = (mx, my) / rho from the state (Density / MomentumX / MomentumY roles) into two scalar fields vx, vy. More...
 
struct  pops::detail::CopyBzKernel
 Copies the B_z field (aux channel) into an internal scalar MultiFab (0 ghost is enough, read at (i,j)). More...
 

Namespaces

namespace  pops
 
namespace  pops::detail
 

Functions

void pops::detail::validate_krylov_params (Real tol, int max_iters, const char *who)
 Validates the Krylov tolerance / iteration budget shared by the Schur source steppers (historical constants made configurable by the audit 2026-06).
 

Detailed Description

Geometry-INDEPENDENT device kernels shared by the Schur SOURCE-STAGE steppers: the Cartesian condensed_schur_source_stepper.hpp, the polar polar_condensed_schur_source_stepper.hpp, and (transitively) the AMR variant.

These functors carry NO geometry: the polar metric (1/r, r-cell math) enters ONLY the reconstruct / RHS-assemble / operator-coeff / explicit-flux kernels, which stay LOCAL to each stepper. Factored out (ADC-263) so the byte-identical copies stop drifting independently.

MINIMAL DEPENDENCIES (the reason this header exists). It depends ONLY on the lightweight POD handles (Array4 / ConstArray4) plus the scalar types – NOT on the elliptic solver stack (geometric_mg.hpp / krylov_solver.hpp). The polar path deliberately avoids that stack, so it can now include these shared kernels instead of re-declaring them.

NAMED device-clean functors (recipe #93: no extended lambda first-instantiated cross-TU, nvcc limit #64/#97): each captures Array4 handles (POD) plus scalars.