You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Karman-Howarth-Monin (KHM) tensor and equation #25
Partly done. The tensor exists and a real defect in it is fixed; the backend coverage this issue is really asking about is still open.
Fixed: the tensor bypassed the geometry abstraction entirely. It was the one calculation file with no pair_frame / pair_delta call — it formed dx = X2 - X1 and U2 - U1 as flat differences while binning with the metric's distance. So on a non-Euclidean metric it got the distance right and the increment wrong: no parallel transport, components left in raw (east, north) coordinates rather than a common pair frame, meaning ⟨δu_a δu_b⟩ on a sphere was not a tensor in any consistent frame. The D = 3 spherical case at least failed loudly on a reshape; D = 2 was the silent one.
Now routed through pair_frame/pair_delta like every other kernel.
Gated by an invariance rather than a value. The trace of the second-order tensor is the second-order structure function in any frame, so trace(D_ab) == S2SF is a direct test of the transport — and it is silent on a flat geometry, where a raw coordinate difference and a transported increment coincide. The test therefore asserts it on a sphere as well as a plane, which nothing did before: the tensor had no curved-geometry coverage at all. Verified discriminating by re-injecting the raw difference — the flat assertion still passes while the curved one fails, 393 against 734 for the trace.
Also asserted: on a sphere the pair frame is the basis, so the tensor's longitudinal component equals L2SF.
The gridded transform produces the full second-order tensor natively — Σ_x δu_a δu_b expands into four correlations of the padded field, so the whole tensor for every lag costs 1 + D + D(D+1)/2 forward transforms and D(D+1)/2 inverse ones. Third order is verified to expand the same way (into six cross-correlations between the D component fields and the D(D+1)/2 quadratic fields) but is not wired up.
Still open, and probably the substance of this issue: the tensor path is serial-only. Threaded, distributed and GPU all throw "not implemented yet".
Activity
jbphyswx commentedon Sep 6, 2026
Partly done. The tensor exists and a real defect in it is fixed; the backend coverage this issue is really asking about is still open.
Fixed: the tensor bypassed the geometry abstraction entirely. It was the one calculation file with no
pair_frame/pair_deltacall — it formeddx = X2 - X1andU2 - U1as flat differences while binning with the metric's distance. So on a non-Euclidean metric it got the distance right and the increment wrong: no parallel transport, components left in raw(east, north)coordinates rather than a common pair frame, meaning⟨δu_a δu_b⟩on a sphere was not a tensor in any consistent frame. TheD = 3spherical case at least failed loudly on a reshape;D = 2was the silent one.Now routed through
pair_frame/pair_deltalike every other kernel.Gated by an invariance rather than a value. The trace of the second-order tensor is the second-order structure function in any frame, so
trace(D_ab) == S2SFis a direct test of the transport — and it is silent on a flat geometry, where a raw coordinate difference and a transported increment coincide. The test therefore asserts it on a sphere as well as a plane, which nothing did before: the tensor had no curved-geometry coverage at all. Verified discriminating by re-injecting the raw difference — the flat assertion still passes while the curved one fails, 393 against 734 for the trace.Also asserted: on a sphere the pair frame is the basis, so the tensor's longitudinal component equals
L2SF.The gridded transform produces the full second-order tensor natively —
Σ_x δu_a δu_bexpands into four correlations of the padded field, so the whole tensor for every lag costs1 + D + D(D+1)/2forward transforms andD(D+1)/2inverse ones. Third order is verified to expand the same way (into six cross-correlations between theDcomponent fields and theD(D+1)/2quadratic fields) but is not wired up.Still open, and probably the substance of this issue: the tensor path is serial-only. Threaded, distributed and GPU all throw "not implemented yet".