pub fn gs_residual_l2(
psi: &Array2<f64>,
source: &Array2<f64>,
r_axis: &[f64],
dr: f64,
dz: f64,
) -> f64Expand description
Compute the L2 norm of the GS residual: ||LΨ - f||₂.
L is the 5-point GS operator: LΨ = (Ψ_{i-1,j} + Ψ_{i+1,j})/dz² + (1/dr² - 1/(2R dr))Ψ_{i,j-1} + (1/dr² + 1/(2R dr))Ψ_{i,j+1} - 2(1/dr² + 1/dz²)Ψ_{i,j}