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
feat: WENO5 sum-of-squares beta on uniform grids to eliminate cancellation
On uniform Cartesian grids, compute WENO5 smoothness indicators using the
Jiang & Shu (1996) sum-of-squares form:
beta(0) = 13/12*(dvd1-dvd0)^2 + 1/4*(dvd1-3*dvd0)^2
beta(1) = 13/12*(dvd0-dvd(-1))^2 + 1/4*(dvd0+dvd(-1))^2
beta(2) = 13/12*(dvd(-1)-dvd(-2))^2 + 1/4*(3*dvd(-1)-dvd(-2))^2
Each term is a perfect square — no negative cross-terms, no cancellation.
Algebraically equivalent to the precomputed beta_coef form on uniform grids.
Non-uniform grids fall back to the existing precomputed coefficients.
Uniformity is detected once at init in s_compute_weno_coefficients by
comparing each cell spacing to the mean; result stored in uniform_grid(3)
and uploaded to GPU.
0 commit comments