AmrCondensedSchurSourceStepper Class ReferenceΒΆ

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

Schur-condensed SOURCE stage over an AMR hierarchy. More...

#include <amr_condensed_schur_source_stepper.hpp>

+ Collaboration diagram for pops::AmrCondensedSchurSourceStepper:

Public Member Functions

 AmrCondensedSchurSourceStepper (const VariableSet &vars, const Geometry &coarse_geom, const BoxArray &coarse_ba, const BCRec &bcPhi, Real alpha, int n_precond_vcycles=1)
 vars: descriptor of the fluid block (MUST expose Density / MomentumX / MomentumY; Energy optional).
 
 AmrCondensedSchurSourceStepper (const VariableSet &vars, int c_rho, int c_mx, int c_my, int c_E, const Geometry &coarse_geom, const BoxArray &coarse_ba, const BCRec &bcPhi, Real alpha, int n_precond_vcycles=1)
 EXPLICIT-COMPONENT variant (audit wave 3, parity with the System steppers): roles carried by the ABI instead of being resolved canonically.
 
void set_krylov (Real tol, int max_iters)
 Tolerance / budget of the COARSE stage Krylov solve (delegated to the uniform stage #126; historical defaults 1e-10 / 400).
 
bool has_energy () const
 true if the model carries an Energy role (energy update active in the coarse stage).
 
void step (std::vector< AmrLevelMP > &levels, MultiFab &coarse_phi, const MultiFab &coarse_bz, int c_bz, Real theta, Real dt)
 Condensed SOURCE stage, IN-PLACE on the hierarchy levels and the coarse potential coarse_phi.
 
const KrylovResultlast_solve () const
 Diagnostic of the last coarse stage solve (BiCGStab iterations, relative residual, convergence).
 
int density_comp () const
 
int momentum_x_comp () const
 
int momentum_y_comp () const
 
int energy_comp () const
 

Detailed Description

Schur-condensed SOURCE stage over an AMR hierarchy.

GENERIC over any fluid block that exposes the Density / MomentumX / MomentumY roles (+ optional Energy), exactly like the uniform stage.

Constructor & Destructor Documentation

◆ AmrCondensedSchurSourceStepper() [1/2]

pops::AmrCondensedSchurSourceStepper::AmrCondensedSchurSourceStepper ( const VariableSet vars,
const Geometry coarse_geom,
const BoxArray coarse_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).

Validated HERE (host) by the ctor of the coarse uniform stage. coarse_geom: geometry of the COARSE LEVEL (cartesian). coarse_ba: decomposition of the coarse level (replicated mono-box or distributed multi-box). bcPhi: BC of the potential phi (same as the coarse Poisson). alpha: electrostatic coupling constant. n_precond_vcycles: N MG V-cycles per application of the BiCGStab preconditioner (1 or 2).

◆ AmrCondensedSchurSourceStepper() [2/2]

pops::AmrCondensedSchurSourceStepper::AmrCondensedSchurSourceStepper ( const VariableSet vars,
int  c_rho,
int  c_mx,
int  c_my,
int  c_E,
const Geometry coarse_geom,
const BoxArray coarse_ba,
const BCRec bcPhi,
Real  alpha,
int  n_precond_vcycles = 1 
)
inline

EXPLICIT-COMPONENT variant (audit wave 3, parity with the System steppers): roles carried by the ABI instead of being resolved canonically.

The canonical ctor DELEGATES here.

Member Function Documentation

◆ density_comp()

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

◆ energy_comp()

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

◆ has_energy()

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

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

+ Here is the call graph for this function:

◆ last_solve()

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

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

+ Here is the call graph for this function:

◆ momentum_x_comp()

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

◆ momentum_y_comp()

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

◆ set_krylov()

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

Tolerance / budget of the COARSE stage Krylov solve (delegated to the uniform stage #126; historical defaults 1e-10 / 400).

The COMPOSITE multi-level solve (FAC, Phase 3c) keeps its own tolerances (Phase 4 follow-up).

+ Here is the call graph for this function:

◆ step()

void pops::AmrCondensedSchurSourceStepper::step ( std::vector< AmrLevelMP > &  levels,
MultiFab coarse_phi,
const MultiFab coarse_bz,
int  c_bz,
Real  theta,
Real  dt 
)
inline

Condensed SOURCE stage, IN-PLACE on the hierarchy levels and the coarse potential coarse_phi.

levels: multi-patch hierarchy; levels[0] = COARSE (level 0), levels[k>=1] = FINE (ratio 2). The conservative state of each level is levels[k].U (rho FROZEN, mom/E updated; same convention as the uniform stage). coarse_phi: potential of the coarse level. INPUT phi^n (warm start of the solve); OUTPUT phi^{n+1}. Same object as the coarse Poisson (mg_.phi() of the coupler) on the facade side. coarse_bz: B_z field of the coarse level (aux channel), component c_bz read at the center. theta / dt: theta-scheme (theta in (0, 1]); dt = effective step (stride factor included by the caller, like s.advance / run_source_stage of the uniform path).

+ 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: