include/pops/coupling/schur/amr/amr_condensed_schur_source_stepper.hpp File ReferenceΒΆ

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

AmrCondensedSchurSourceStepper: AMR counterpart of the Schur-condensed SOURCE stage (CondensedSchurSourceStepper, #126), carried over a HIERARCHY of levels (AmrLevelMP) rather than over a uniform grid. More...

+ Include dependency graph for amr_condensed_schur_source_stepper.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pops::AmrCondensedSchurSourceStepper
 Schur-condensed SOURCE stage over an AMR hierarchy. More...
 

Namespaces

namespace  pops
 

Detailed Description

AmrCondensedSchurSourceStepper: AMR counterpart of the Schur-condensed SOURCE stage (CondensedSchurSourceStepper, #126), carried over a HIERARCHY of levels (AmrLevelMP) rather than over a uniform grid.

This is the GLOBAL electrostatic/Lorentz source stage of the "amr-schur" path – the refined equivalent of the uniform path System(...).add_equation(time=Strang(hyperbolic=Explicit(ssprk3), source=CondensedSchur(theta, alpha))) and NOT a local cell-by-cell source (cf. the local IMEX backward_euler_source of the amr-imex path, which is NOT the quantitatively-validated reference source treatment; cf. docs/HOFFART_FIDELITY.md).

STRATEGY (option A, mirror of the existing AMR Poisson compute_aux/solve_fields). The AMR elliptic solver of this code solves Poisson on the COARSE LEVEL then injects grad phi to the fine levels (the fine patches refine TRANSPORT, not the elliptic solve). The condensed source stage follows the SAME approach: it assembles and solves the condensed operator A_op = I + theta^2 dt^2 alpha rho B^{-1} on the coarse level (by COMPOSING the uniform stage #126, bit-for-bit), then – for a multi-level hierarchy – injects grad phi^{n+theta} to the fine levels and reconstructs the velocities there, ending with the fine -> coarse cascade (average_down) which restores the consistency of the covered coarse cells (invariant #169). A spatially constant state (mono-level) degenerates EXACTLY into the uniform stage: this is the parity criterion (Step 2).

SCOPE (updated Phase 4a, multi-patch fine). The MONO-LEVEL path is complete and bit-identical to the uniform stage #126. The MULTI-LEVEL path is IMPLEMENTED (COMPOSITE condensed source stage: the tensor Schur elliptic is solved by FAC on coarse + fine, velocity reconstruction PER LEVEL then the average_down cascade – cf. step_multilevel), in the FRAME of 2 levels + 1..N fine patches that are disjoint NON ADJACENT (separated by at least one coarse cell) + coarse replicated mono-block (mono-rank). ONE patch (N == 1) degenerates EXACTLY into Phase 3c (bit-identical). Beyond that (ADJACENT patches / fine-fine join, > 2 levels, MPI, multi-block), step() explicitly REFUSES (clear error) rather than silently applying a partial source: this is Phase 4b.

LIFE CYCLE / DEVICE / MPI. Built ONCE on the COARSE layout (BoxArray + Geometry + Poisson BC); all buffers of the coarse uniform stage are allocated at construction and reused by step(). The coarse Krylov solve is COLLECTIVE (dot/all_reduce over all ranks, including empty ones) – like the uniform stage: no deadlock. theta/dt may change between calls.