pub fn periodic_heat(
u0: &[f64],
alpha: f64,
t: f64,
length: f64,
) -> Result<Vec<f64>, ErrorsJSL>Expand description
Advances u_t = α u_xx with periodic boundaries over length exactly in Fourier space:
each mode decays by e^{−α k² t}. Exact in time and spectrally accurate in space.