Skip to content

Add adaptive step size control to SDC - #4346

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:sdc-adaptive
Sep 12, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:sdc-adaptive

Conversation

@singhharsh1708

@singhharsh1708 singhharsh1708 commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Makes SDC adaptive: the embedded solution is the previous sweep's step update, already in the cache, so the estimate costs a few axpys and no extra right-hand side evaluations; the algorithm moves to OrdinaryDiffEqNewtonAdaptiveAlgorithm with alg_adaptive_order one below the order. Fixed steps remain available with adaptive = false and a dt.

On the reference problem at M = 3, K = 3 the adaptive solve takes 272 steps with 188x fewer Jacobian evaluations than the fixed-step run at the same accuracy; on Prothero-Robinson at lambda = -1e4 and tolerance 1e-8, K = 3 takes 22768 steps and 206203 nonlinear solves for an error of 4.1e-9.

The base type change alters results slightly even under adaptive = false; I bisected that rather than assuming, and the pre-existing numbers return exactly when the base type is reverted. The nonlinear tests now pick step sizes by expected order, as the Dahlquist gate already did, with a regression residual gate of 0.1 rather than qmat's 0.05.

The change here is the single "Add adaptive step size control to SDC" commit. Full suite passes.

AI Disclosure: Claude assisted with this change.

@singhharsh1708

singhharsh1708 commented Sep 1, 2026 •

Copy link
Copy Markdown
Member Author

@ChrisRackauckas ready for review, base of the stack (#4346, then #4347, then #4348).

@ChrisRackauckas
ChrisRackauckas merged commit 3262923 into SciML:master Sep 12, 2026
132 checks passed
@singhharsh1708
singhharsh1708 deleted the sdc-adaptive branch September 12, 2026 11:58
ChrisRackauckas added a commit that referenced this pull request Sep 13, 2026
- qa: allow JET 0.12 in OrdinaryDiffEqCore/BDF/NonlinearSolve QA envs (#4516)
- Add regression tests for issues verified fixed in recent releases (#4517)
- fix: save all simultaneous events in a VCC (#4129)
- Add 4th-order Friedli Exponential Runge-Kutta solver (#4481)
- Release DiffEqBase 7.21.1 (#4521)
- Fix BDF rejected-step controller for backward (tdir < 0) solves (#4519)
- Require OrdinaryDiffEqCore 4.17.1 where its new internals are used (#4525)
- 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)



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]>
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants