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
Scalars arrive by dispatch on a field-bundle type, not a keyword reinterpreting u's rows — a keyword would make (3,N) mean either a 3-component velocity or 2 components plus a tracer depending on a flag, which is two ways to say one thing.
Vector channels are parallel-transported by the geometry; scalar channels are differenced where they stand, because a scalar has nothing to transport. Internally one packed (V·D + K, N) array, so the kernels keep exactly the existing load path.
Operators added:ScalarSFType{P} (⟨(δθ)^P⟩), MixedSFType{NL,NT,P} (⟨δu_L^NL ‖δu_T‖^NT (δθ)^P⟩, with {1,0,2} being Yaglom), and the cross-channel ScalarDotSFType(a,b) / VectorDotSFType(a,b). Note VectorDotSFType(1,1)isS2SF — the existing second-order operator is this one's diagonal, not a separate thing.
Fields(vectors = (u,)) is the array path, not a copy of it — it forwards to the existing entry, so a bare u and a one-vector bundle give bit-identical sums.
Performance. The first cut was up to 6.1× slower than the array path; that was two separate losses — missing culling (the gap grew with N) and a missing SIMD compute/scatter split (a flat 1.6× everywhere). Both reused existing machinery. A multi-channel field now costs 1.1× a single-channel one for the same pairs.
Threaded backend supported. KHM gained epsilon_theta_from_yaglom / yaglom_residual for the mixed moment.
A live defect this surfaced and fixed:epsilon_from_four_fifths(r, S3) named its argument S3, but the four-fifths law is for ⟨δu_L³⟩ — the package's L3SF — while the package's S3SF is ⟨δu_L‖δu‖²⟩, which obeys the four-thirds law. Passing results.S3, the obvious reading, returned ε too small by exactly 5/3 with nothing complaining. Argument renamed, and epsilon_from_four_thirds added alongside; a test now asserts the two are not interchangeable.
Activity
jbphyswx commentedon Sep 6, 2026
Implemented.
Scalars arrive by dispatch on a field-bundle type, not a keyword reinterpreting
u's rows — a keyword would make(3,N)mean either a 3-component velocity or 2 components plus a tracer depending on a flag, which is two ways to say one thing.Vector channels are parallel-transported by the geometry; scalar channels are differenced where they stand, because a scalar has nothing to transport. Internally one packed
(V·D + K, N)array, so the kernels keep exactly the existing load path.Operators added:
ScalarSFType{P}(⟨(δθ)^P⟩),MixedSFType{NL,NT,P}(⟨δu_L^NL ‖δu_T‖^NT (δθ)^P⟩, with{1,0,2}being Yaglom), and the cross-channelScalarDotSFType(a,b)/VectorDotSFType(a,b). NoteVectorDotSFType(1,1)isS2SF— the existing second-order operator is this one's diagonal, not a separate thing.Fields(vectors = (u,))is the array path, not a copy of it — it forwards to the existing entry, so a bareuand a one-vector bundle give bit-identical sums.Performance. The first cut was up to 6.1× slower than the array path; that was two separate losses — missing culling (the gap grew with N) and a missing SIMD compute/scatter split (a flat 1.6× everywhere). Both reused existing machinery. A multi-channel field now costs 1.1× a single-channel one for the same pairs.
Threaded backend supported.
KHMgainedepsilon_theta_from_yaglom/yaglom_residualfor the mixed moment.A live defect this surfaced and fixed:
epsilon_from_four_fifths(r, S3)named its argumentS3, but the four-fifths law is for⟨δu_L³⟩— the package'sL3SF— while the package'sS3SFis⟨δu_L‖δu‖²⟩, which obeys the four-thirds law. Passingresults.S3, the obvious reading, returned ε too small by exactly 5/3 with nothing complaining. Argument renamed, andepsilon_from_four_thirdsadded alongside; a test now asserts the two are not interchangeable.