Skip to main content

memory_convolution

Function memory_convolution 

Source
pub fn memory_convolution(kernel_vals: &[f64], f_vals: &[f64], h: f64) -> f64
Expand description

Compute the convolution integral of a memory kernel K with function f on a uniform grid [0, (n-1)*h] using the trapezoidal rule.

Returns the convolution value at the last grid point t_n.

(K * f)(t_n) = ∫_0^{t_n} K(t_n - s) f(s) ds