Skip to main content

dot

Function dot 

Source
pub fn dot(backend: ComputeBackend, a: &Field<f64>, b: &Field<f64>) -> f64
Expand description

Inner product of two scalar fields, sum_i a[i]*b[i].

The Krylov-solver inner product, and — with cell volumes as b — the volume-weighted integral. Units multiply: [a]*[b].

§Panics

Panics if a.len() != b.len().

§Determinism

Same guarantee as sum.