pub fn grad_magnitude_squared(gx: &[f64], gy: &[f64], gz: &[f64]) -> Vec<f64>
Compute gradient magnitude squared: |∇x|² = gx² + gy² + gz²