Skip to main content

vol_average

Function vol_average 

Source
pub fn vol_average(backend: ComputeBackend, phi: &VolScalarField) -> f64
Expand description

Volume-weighted average over the internal cells, integral(phi dV) / integral(dV).

Units: the field’s own units (the m^3 cancels). Returns 0.0 when the total volume is zero (an empty mesh) rather than NaN.

§Determinism

Same guarantee as sum.