fn apply_dipole(
fft_ws: &mut Fft3dWorkspace,
k: &[f64],
x: &[f64],
buf: &mut [Complex64],
out: &mut [f64],
)Expand description
Apply the forward dipole operator D * x in-place buffers.
Equivalent to MATLAB susc2field(kernel, x) = real(ifftn(D .* fftn(x))).
Since the dipole kernel k is real, conj(k) = k, so the same routine
computes the adjoint D^H.