Repository navigation
Carry the QNDF2 difference array across steps - #4526
Merged
ChrisRackauckas merged 1 commit intoSep 12, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local Devin CLI session (workspace /home/crackauc/sandbox/tmp_20260912_121314_35902)
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 13, 2026
- OrdinaryDiffEqDefault: require OrdinaryDiffEqCore 4.17.1 (#4520) - Add adaptive step size control to SDC (#4346) - Allow JET 0.12 in every QA test environment (#4513) - Resolve OrdinaryDiffEqDefault against the local sublibraries (#4514) - NonlinearSolveAlg: stale-Jacobian retry + rejected-step W reassembly (carries #4282 to current master) (#4505) - Do not seed a retry from the previous-step interpolant (#4473) - Say why the linear path ignores new_W_dt_cutoff (#4527) - Carry the QNDF2 difference array across steps (#4526) - Pass Θ = 0, not the absolute time, to the AN5 startup interpolant (#4534) - Make the stabilized-RK step cap and eigenvalue tolerance direction-agnostic (#4536) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This was referenced Oct 2, 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.
Summary
Rebase of #4455 (authored by @singhharsh1708 — original commit authorship is preserved) onto current master, resolving merge conflicts. Fixes #4332.
QNDF2rebuilt its backward differences fromuprev,uprev2anduprev3on every step and corrected a change of step size with a first-order scaling, so an O(h²) error sat inside a quantity whose signal is O(h³) and the local error estimate trackeddt/dtₙ₋₁instead of the error. There was no step size at which the estimate settled near 1, so the controller alternated between growing by the maximum factor and rejecting.Dnow stays at the step size its differences were formed with, a step that changesdtscales them through the exactR * Utransform into locals, and a successful step commits the new differences incrementally, which is what variable-orderQNDFalready does. ReadingDand writing locals also removes the aliasing inD[2] = D[1] * R[1, 2] + D[2] * R[2, 2], which used theD[1]assigned on the line above; that was inert because(R * U)[1, 2]is zero fork = 2.Rebase notes
Conflicts vs. #4455's base were trivial:
Project.toml(master is now at 2.4.8, so this bumps to 2.4.9) andbdf_regression_tests.jl(both sides appended testsets — all kept).bdf_perform_step.jlandbdf_caches.jlmerged cleanly.Test evidence
The regression test asserts
QNDF2/QBDF2reject fewer than a tenth of accepted steps onu' = -uat1e-8.On current master (
d63b9c8fce), the bug still reproduces —solve(ODEProblem((u,p,t)->-u, 1.0, (0.0,10.0)), alg, reltol=1e-8, abstol=1e-8):On this branch:
test/bdf_regression_tests.jlrun in full on the rebased branch: all testsets pass, including the new"QNDF2 step size control does not thrash (#4332)"(6/6) and the existing backward-integration rejection tests.typosclean; the changed files match master's existing formatting state (master itself is not raw-SciMLStyleclean in these files, so no formatting sweep was folded in).🤖 Generated with Devin (harness: Devin CLI 3000.10.21, model: SWE-2 Max, session: local CLI session, workspace
/home/crackauc/sandbox/tmp_20260912_121314_35902) — rebase + conflict resolution + verification only; the fix itself is @singhharsh1708's.