field_reduce
Stable function · Simulation
Tier: stable · Kind: function · Topic: Simulation
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
field_reduce | outside profile | not exported | field_reduce | outside profile |
Julia
field_reduce(kind::AbstractString, actual::AbstractVector{<:Real}; reference)
field_reduce(kind, actual; reference=nothing) -> Float64
Collapse a spatial field to the scalar a §6.6.5 reduce assertion compares
(esm-spec §6.6.5):
"L2_error"—‖actual − reference‖₂ / ‖reference‖₂(relative L2 over the domain; requiresreference)."Linf_error"—max |actual − reference|(absolute supremum norm; requiresreference)."integral"— the uniform-cell Riemann sum under a UNIT total domain measure per axis:Σ field / N_cells, i.e. exactlymean. This is the pinned cross-binding convention (the same measure convention under which the relative-L2 reduction is measure-free); non-unit physical domains must be scaled by the author until the spec grows a measure concept."mean" | "max" | "min"— pure collapsers ofactual.
TypeScript
Not available in TypeScript. TypeScript is outside the simulation capability profile (Julia, Python, Rust): build an RHS and integrate it; TypeScript and Go are deliberately non-simulating.
Python
Python does not export this function.
Rust
pub fn field_reduce(kind: &str, actual: &[f64], reference: Option<&[f64]>) -> Result<f64, String>
Collapse a spatial field to the scalar a §6.6.5 reduce assertion
compares (esm-spec §6.6.5); semantics identical to the Julia / Python
references:
"L2_error"—‖actual − reference‖₂ / ‖reference‖₂(relative L2 over the domain; requiresreference)."Linf_error"—max |actual − reference|(absolute supremum norm; requiresreference)."integral"— the uniform-cell Riemann sum under a UNIT total domain measure per axis:Σ field / N_cells, i.e. exactlymean. This is the pinned cross-binding convention (the same measure convention under which the relative-L2 reduction is measure-free); non-unit physical domains must be scaled by the author until the spec grows a measure concept."mean" | "max" | "min"— pure collapsers ofactual.
Go
Not available in Go. Go is outside the simulation capability profile (Julia, Python, Rust): build an RHS and integrate it; TypeScript and Go are deliberately non-simulating.