Skip to main content

mol_diffusion_rhs

Function mol_diffusion_rhs 

Source
pub fn mol_diffusion_rhs(u: &[f64], dx: f64, alpha: f64) -> Vec<f64>
Expand description

Method-of-lines spatial operator for the 1D diffusion equation.

Returns du/dt = α d²u/dx² evaluated at all interior points. u is the full solution vector including boundary nodes.