Repository navigation
Skip zero-extent BC extrapolation on small grids - #708
Merged
ChrisRackauckas merged 3 commits intoOct 13, 2026
Merged
ChrisRackauckas merged 3 commits into
ChrisRackauckas merged 3 commits into
Conversation
When stencil extents are zero (pure reaction PDEs), the inclusive extrapolation loops still fired once and evaluated the 6-point boundary stencil on grids too small to support it. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.28-64d2043 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/MethodOfLines.jl/jobs/677-cursor/log.txt on amdci2.julia.csail.mit.edu
Covers pure reaction PDE symbolic_discretize on 4- and 6-point grids. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.28-64d2043 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/MethodOfLines.jl/jobs/677-cursor/log.txt on amdci2.julia.csail.mit.edu
Solve the DAE and compare to (1+x)*exp(-t) at t=0.2 so the test checks correctness, not only that discretize returns. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.28-64d2043 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/MethodOfLines.jl/jobs/677-cursor/log.txt on amdci2.julia.csail.mit.edu
ChrisRackauckas
marked this pull request as ready for review
October 13, 2026 16:57
This was referenced Oct 13, 2026
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.
Please ignore until reviewed by @ChrisRackauckas.
Summary
For pure reaction PDEs (no spatial derivatives / BCs), stencil extents are zero, but
generate_extrap_eqs!still entered its inclusivewhile ninterp >= vlower/vupperloops once and evaluated the fixed 6-point boundary extrapolator — whichBoundsErrors on a 4-point grid. Guard both loops withlowerextents[j] > 0/upperextents[j] > 0so padding only runs when there is something outside the BC-truncated interior to pad, preserving the WENO-motivated>=behavior from 3c34574 when extents are nonzero.Fixes #677
Fail-before / pass-after (strengthened regression)
Regression solves the DAE from
discretizeand compares to exact(1+x)*exp(-t)att=0.2(tol< 1e-9; measured max error ~1e-11 atabstol=reltol=1e-10; no spatial truncation). Uses existing test depOrdinaryDiffEq(no new[extras]).Fail-before (intervals=5 ok; intervals=3 BoundsError):
Pass-after (fix restored):
WENO regression (commit 3c34574)
GROUP=Convection_WENO julia +1.12 --startup-file=no --project=. -e 'using Pkg; Pkg.test(coverage=false)'Independent review also reports Components and Burgers groups pass; generated equations byte-identical to master for previously-working cases.
Runic
--checkandtyposclean on changed files.Not verified (this agent)
>comparisons.interior_map.jl.Reviewer pushback
>(triage tried both; both fix the repro).Risk assessment
generate_extrap_eqs!padding loops; equations with nonzero stencil extents keep the existing>=iterationsPlease ignore this draft until reviewed by @ChrisRackauckas.
Harness: Cursor Agent CLI 2026.09.28-64d2043; model: auto; transcript: /home/crackauc/sandbox/goals/issue-backlog/ibd/MethodOfLines.jl/jobs/677-cursor/log.txt on amdci2.julia.csail.mit.edu