pub(crate) fn reg(
x: &[f64],
wvw: &[Vec<f64>; 3],
dims: (usize, usize, usize),
vs: [f64; 3],
out: &mut [f64],
)Expand description
reg(dx) = div(wG.*(Vr.*(wG.*grad(real(dx))))) into out, with wvw = wG.*Vr.*wG: bdiv
of the weighted fgrad, a z plane at a time so the gradients never leave the cache. Each
value is computed with the same operations as fgrad followed by bdiv.