Expand description
The internal fields between two adjacent stacks: a certified Krylov or pivoted LU
solve of (I - L1 U2) up = rhs, kept for the pullback.
Upstream: the numpy.linalg.solve inside treams.SMatrices.illuminate with a
second S-matrix. The Krylov branch and its contraction test are treams-rs
extensions.
L1 is the reflection of the lower stack for waves incident from the positive side
(above) and U2 the reflection of the upper stack for waves incident from the
negative side (below), so up holds the upgoing fields between the stacks.
Modulesยง
- saved ๐
- The original internal solve strategy and its numerical state, with a fixed factor slot that never builds a reflection product solely for serialization.
Structsยง
- Adjoint
Solve ๐ - The adjoint solution of an internal system, beside its borrowed forward solution.
- Internal
Solve ๐ - The forward solution of the internal system and what its adjoint solve reuses.
Enumsยง
- Internal
Factor ๐ - What the pullback reuses to solve the adjoint system.
Constantsยง
- ITERATIVE_
MAX_ ๐COLUMNS - Most right-hand sides for which the Krylov solve is tried; wider batches factor.
- ITERATIVE_
MIN_ ๐ROWS - Rows from which a certified contraction tries the bounded Krylov solve before falling back to a dense LU factorization.
- KRYLOV_
STEPS ๐ - Krylov iterations, without restart, of one internal solve before the dense fallback.
Functionsยง
- absolute_
row_ ๐sums - Positive row sums of
(|re A| + |im A|) weights, rounded upward. - internal_
iteration ๐ - The unrestarted Krylov solve of the operator, or of its adjoint, for a thin batch, or
Nonewhen it fails numerically and the caller should factor the operator instead. - internal_
operator ๐ - The internal operator
I - lower upper. - is_
contraction ๐ - Whether
||L U||_inf < 1holds for the operatorI - L U, which proves it invertible. - reflection_
action ๐ - Apply
I - L U, or its adjoint, using only thin products. - reflections_
contract ๐ - Certify
||L U||_inf < 1using|L| |U| 1, in quadratic work.