Repository navigation
Support WENO advection on periodic nonuniform grids in ArrayDiscretization - #649
Merged
ChrisRackauckas merged 2 commits intoAug 20, 2026
Merged
Conversation
utkuyilmaz1903
marked this pull request as ready for review
August 20, 2026 14:25
utkuyilmaz1903
force-pushed
the
feat/weno-nu-periodic-array
branch
from
August 20, 2026 14:46
0381b7d to
fb23bc3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the periodic nonuniform WENO gap deliberately left in #646, finishing the WENO item from #623.
Summary
The machinery was already there: seam-wrapping tap slices (#619) and the coefficient split (#646). The one missing piece was the coefficient windows at seam-adjacent points, where
view(grid, i .+ taps)runs out of bounds. Those windows now take the same periodically shifted coordinates the scalar path'sbcoordproduces, via a newarray_periodic_coordhelper that mirrors_wrapcoordbit for bit (single add/subtract of the parenthesized period, identical FP association). The slots stay numeric per point and the kernel still traces once, so #646's bitwise-parity invariant carries over unchanged — the seam never touches the trace.The blanket rejection of nonuniform interfaces in
array_periodic_dimsis removed; the guard moves to the point of use (array_central_difference,array_upwind_difference,array_nonlinear_laplacian), matching the existing style.Results
All 1D cases verified against
ScalarizedDiscretizationon the current master base:==)isequal) to the scalar coreDx(Dy(u))along a periodic nonuniform directionThe 1D equation count stays independent of the grid resolution. Wrap points remain pointwise for the same structural reason as on a uniform periodic grid: a tap range that straddles the seam is not a contiguous slice.
2D periodic nonuniform advection has no scalar reference: the scalar path eagerly builds mixed-derivative stencils for every multi-dimensional system and still rejects nonuniform interfaces. The array path builds mixed rules only for mixed terms present in the equation, so this system stays in slice form and is checked against the exact advection solution.
tutorials/nonuniform_weno.mdis now fully covered, including its periodic variant.