CondensedSchurSourceStepper Class ReferenceΒΆ

adc_cpp: pops::CondensedSchurSourceStepper Class 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
pops::CondensedSchurSourceStepper Class Reference

Schur-condensed SOURCE STAGE, STANDALONE (transport frozen), GENERIC over any fluid block that exposes the Density / MomentumX / MomentumY roles (+ optional Energy). More...

#include <condensed_schur_source_stepper.hpp>

+ Collaboration diagram for pops::CondensedSchurSourceStepper:

Public Member Functions

 CondensedSchurSourceStepper (const VariableSet &vars, const Geometry &geom, const BoxArray &ba, const BCRec &bcPhi, Real alpha, int n_precond_vcycles=1)
 vars: descriptor of the fluid block; MUST expose Density / MomentumX / MomentumY (Energy optional).
 
 CondensedSchurSourceStepper (const VariableSet &vars, int c_rho, int c_mx, int c_my, int c_E, const Geometry &geom, const BoxArray &ba, const BCRec &bcPhi, Real alpha, int n_precond_vcycles=1)
 Variant with EXPLICIT COMPONENTS (audit 2026-06, wave 2: roles/fields carried in the ABI).
 
bool has_energy () const
 true if the model carries an Energy role (energy update active).
 
void step (MultiFab &state, MultiFab &phi, const MultiFab &bz_field, int c_bz, Real theta, Real dt)
 Condensed SOURCE STAGE, IN-PLACE on state and phi.
 
const KrylovResultlast_solve () const
 Diagnostic of the last solve (BiCGStab iterations, relative residual, convergence).
 
void set_krylov (Real tol, int max_iters)
 Tolerance / iteration budget of the stage Krylov solve (BiCGStab).
 
int density_comp () const
 
int momentum_x_comp () const
 
int momentum_y_comp () const
 
int energy_comp () const
 

Detailed Description

Schur-condensed SOURCE STAGE, STANDALONE (transport frozen), GENERIC over any fluid block that exposes the Density / MomentumX / MomentumY roles (+ optional Energy).

Names no scenario: a polar-ring model with ExB drift is just ONE client, a two-species magnetized model would be another.

LIFE CYCLE: built ONCE on a fixed layout (BoxArray + DistributionMapping + Geometry); allocates all its buffers at construction (GeometricMG operator + preconditioner + A_op, RHS, phi^n, v^n, grad fields, + the Krylov solver kry_ and its MultiFab handle). step() REUSES them without reallocation: kry_.solve() recomputes the ENTIRETY of its state per solve (prepare_solve, r0, descent directions), so the persistent buffer is bit-identical to the old per-call construction of a TensorKrylovSolver. theta/dt may change between calls (step() parameters).

Constructor & Destructor Documentation

◆ CondensedSchurSourceStepper() [1/2]

pops::CondensedSchurSourceStepper::CondensedSchurSourceStepper ( const VariableSet vars,
const Geometry geom,
const BoxArray ba,
const BCRec bcPhi,
Real  alpha,
int  n_precond_vcycles = 1 
)
inline

vars: descriptor of the fluid block; MUST expose Density / MomentumX / MomentumY (Energy optional).

The contract is validated HERE (host), before any kernel. geom: geometry (cartesian); ba: partition; bcPhi: BC of the potential phi. alpha: electrostatic coupling constant. n_precond_vcycles: N MG V-cycles per application of the BiCGStab preconditioner (1 or 2).

◆ CondensedSchurSourceStepper() [2/2]

pops::CondensedSchurSourceStepper::CondensedSchurSourceStepper ( const VariableSet vars,
int  c_rho,
int  c_mx,
int  c_my,
int  c_E,
const Geometry geom,
const BoxArray ba,
const BCRec bcPhi,
Real  alpha,
int  n_precond_vcycles = 1 
)
inline

Variant with EXPLICIT COMPONENTS (audit 2026-06, wave 2: roles/fields carried in the ABI).

The caller DESIGNATES the components (rho, mx, my[, E]) instead of letting the stepper resolve the canonical roles – for a block whose descriptor does not expose Density/ MomentumX/MomentumY (free names, Custom roles) or stores its fields elsewhere. c_E < 0 = no energy. The canonical ctor above DELEGATES here (role resolution unchanged, bit-identical).

Member Function Documentation

◆ density_comp()

int pops::CondensedSchurSourceStepper::density_comp ( ) const
inline
+ Here is the caller graph for this function:

◆ energy_comp()

int pops::CondensedSchurSourceStepper::energy_comp ( ) const
inline
+ Here is the caller graph for this function:

◆ has_energy()

bool pops::CondensedSchurSourceStepper::has_energy ( ) const
inline

true if the model carries an Energy role (energy update active).

◆ last_solve()

const KrylovResult & pops::CondensedSchurSourceStepper::last_solve ( ) const
inline

Diagnostic of the last solve (BiCGStab iterations, relative residual, convergence).

+ Here is the caller graph for this function:

◆ momentum_x_comp()

int pops::CondensedSchurSourceStepper::momentum_x_comp ( ) const
inline
+ Here is the caller graph for this function:

◆ momentum_y_comp()

int pops::CondensedSchurSourceStepper::momentum_y_comp ( ) const
inline
+ Here is the caller graph for this function:

◆ set_krylov()

void pops::CondensedSchurSourceStepper::set_krylov ( Real  tol,
int  max_iters 
)
inline

Tolerance / iteration budget of the stage Krylov solve (BiCGStab).

DEFAULTS = historical constants (1e-10, 400), made configurable by the audit 2026-06 (explicit numeric constants).

Exceptions
std::invalid_argumentout of domain.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ step()

void pops::CondensedSchurSourceStepper::step ( MultiFab state,
MultiFab phi,
const MultiFab bz_field,
int  c_bz,
Real  theta,
Real  dt 
)
inline

Condensed SOURCE STAGE, IN-PLACE on state and phi.

state: fluid state (rho, mom_x, mom_y [, E]); WRITES mom (+ E); rho FROZEN. phi: potential; INPUT phi^n (warm start of the solve); OUTPUT phi^{n+1}. bz_field: B_z field (aux channel), component c_bz read at the center. theta/dt: theta-scheme. No transport: this is the SOURCE stage alone (the (2)-(3) implicit stage of docs/SCHUR_CONDENSATION_DESIGN.md).

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: