fn apply_kernel(x: &[f64], k: &[f64], dims: (usize, usize, usize)) -> Vec<f64>
F⁻¹[k F(x)], real part.
F⁻¹[k F(x)]