pub fn fgrad_inplace(
gx: &mut [f64],
gy: &mut [f64],
gz: &mut [f64],
x: &[f64],
nx: usize,
ny: usize,
nz: usize,
vsx: f64,
vsy: f64,
vsz: f64,
)Expand description
Forward difference gradient operator (in-place)
Computes forward differences along each axis with periodic boundary conditions. Writes results directly into pre-allocated output buffers.
ยงArguments
gx,gy,gz- Output gradient components (must be pre-allocated to nxnynz)x- Input array (nx * ny * nz)nx,ny,nz- Array dimensionsvsx,vsy,vsz- Voxel sizes