Skip to main content

l2_norm

Function l2_norm 

Source
pub fn l2_norm(backend: ComputeBackend, x: &Field<f64>) -> f64
Expand description

Euclidean (L2) norm, sqrt(sum_i x[i]^2).

This is the convergence measure a solver evaluates on the residual field every outer iteration. Units: the field’s own units. An empty field gives 0.0.

§Determinism

Same guarantee as sum: reproducible and thread-count independent, not bit-identical to Field::l2_norm.