pub fn adi_diffusion_step_2d(
u: &[f64],
nx: usize,
ny: usize,
dx: f64,
dy: f64,
dt: f64,
alpha: f64,
) -> Vec<f64>Expand description
One full ADI time step for 2D diffusion ∂u/∂t = α(∂²u/∂x² + ∂²u/∂y²).
Uses the Peaceman-Rachford splitting: half-step implicit in x, half-step implicit in y. Boundary values are held fixed (Dirichlet zero on all edges).