Skip to main content

kernel_spiky_grad

Function kernel_spiky_grad 

Source
pub fn kernel_spiky_grad(r_vec: [f64; 3], r: f64, h: f64) -> [f64; 3]
Expand description

Gradient of the Spiky kernel: ∇W_spiky(r_vec, r, h).

Returns −45/(π·h⁶) · (h−r)² · r̂ for r < h and r > 0, else zero vector.