pub fn kernel_gradient(
r_vec: [f64; 3],
r: f64,
params: &SphKernelParams,
kernel: SphKernel,
) -> [f64; 3]Expand description
Evaluate the gradient nabla W(r_vec, h) of the smoothing kernel.
r_vec is the vector from particle j to particle i (r_i - r_j).
r is its magnitude. Returns the zero vector when r < 1e-12 or r >= h.