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
Right now the package takes u and v on cartesian x and y.
we should relax the 2D requirement, it is not necessary.
we should one day relax the cartesian requirement and support spherical (though I don't fully know how the math works, somethign about legendre polynomials times spherical harmonics)
Done. Dimension support now follows what each operator actually needs, rather than a blanket restriction.
Measured across D ∈ {1,2,3,4,5} through the public entry:
operator
consumes
works at
S2SF, L2SF, T2SF, L3SF, L1T2SF
δu_L, ‖δu‖² — defined at any D
everyD
T2ComponentSF
‖δu_T‖²/(D−1) — needs a transverse subspace
D ≥ 2
T3SF
an orientedn̂
D ∈ {2,3}
The remaining restriction is real rather than incidental: an orientation exists only at D = 2 (the quarter turn) and D = 3 (the turn about ẑ), and only operators odd in the transverse component need one. n̂'s refusal was a bare error("Only 2D and 3D supported"); it now states which operators need an orientation and that everything else consumes δu_T² and works at any dimension.
One latent silent-wrong-answer this exposed:_sf_raw for the transverse-component operator divided by length(dx) - 1unguarded, so at D = 1 it would have returned Inf/NaN the moment the validator was relaxed. Guarded now, matching the guard the underlying norm already had — and the guard is free: dx is an SVector, so length(dx) is a type-level constant and the guarded and unguarded operators generate byte-identical LLVM with no throw path emitted.
Activity
jbphyswx commentedon Sep 6, 2026
Done. Dimension support now follows what each operator actually needs, rather than a blanket restriction.
Measured across
D ∈ {1,2,3,4,5}through the public entry:S2SF,L2SF,T2SF,L3SF,L1T2SFδu_L,‖δu‖²— defined at anyDDT2ComponentSF‖δu_T‖²/(D−1)— needs a transverse subspaceD ≥ 2T3SFn̂D ∈ {2,3}The remaining restriction is real rather than incidental: an orientation exists only at
D = 2(the quarter turn) andD = 3(the turn aboutẑ), and only operators odd in the transverse component need one.n̂'s refusal was a bareerror("Only 2D and 3D supported"); it now states which operators need an orientation and that everything else consumesδu_T²and works at any dimension.One latent silent-wrong-answer this exposed:
_sf_rawfor the transverse-component operator divided bylength(dx) - 1unguarded, so atD = 1it would have returnedInf/NaNthe moment the validator was relaxed. Guarded now, matching the guard the underlying norm already had — and the guard is free:dxis anSVector, solength(dx)is a type-level constant and the guarded and unguarded operators generate byte-identical LLVM with no throw path emitted.The spherical half of this issue is #30.