Skip to content

Tighten the AdaptiveRadau Newton tolerance with the stage count - #4431

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:fix-adaptive-radau-newton-tol
Aug 29, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:fix-adaptive-radau-newton-tol

Conversation

@singhharsh1708

@singhharsh1708 singhharsh1708 commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

AdaptiveRadau() on prob_ode_rober at abstol = reltol = 1e-8 takes 188192 accepted and 73644 rejected steps and returns u(1e11) = [-1.44e7, -4.0e-6, 1.44e7] with retcode Success; the reference is [2.08e-8, 8.3e-14, 0.99999998], and min_order = max_order = 5 reproduces RadauIIA5's 167 steps exactly, so the damage is at the higher orders. The out-of-place path does the same (320363 steps at order 13, u3 off by 6e7).
Both the Newton norm and the error estimate already use Hairer's rescaled tolerance 0.1 reltol^((s+1)/2s), but the Newton stopping factor κ stays at 0.01 for every stage count where radau.f uses FNEWT = max(10 eps / rtol, min(0.03, rtol^((s-1)/(s+1)))), which is 6.8e-4 at three stages and 6.7e-5 at seven for this tolerance; with κ that loose the seven-stage Newton iteration stops above the level the error estimate needs, the estimate becomes iteration noise, and once the solution enters the long tail the controller oscillates between 3-iteration and 1-iteration steps until the answer is gone.
When the user passes no κ, both AdaptiveRadau steps now derive it from the stage count and the rescaled tolerance each step; Robertson at 1e-8 becomes 173 steps with the default and 73 at fixed order 13 (78 and 63 out of place), 1e-6 goes from 26281 steps to 1474, and Van der Pol and the linear problem are unchanged within a few steps.
The tighter κ exposed a second problem on inexact linear solves: when GMRES returns an exactly zero increment, θ = 0 made η = 0, which was carried into the next steps as eps^0.8 and let every later Newton stop after one iteration whatever the increment; the Brusselator Krylov test went from 4.8e-9 to 1.2e-6 that way. η now keeps its previous value on a zero increment, and that test lands at 1.9e-10.
One cost to know about: at 1e-10 the default now takes 341 steps against 102, because the tighter Newton needs more iterations and the order controller's hist_iter < 2.6 rule then keeps the order at 5; Hairer's rule promotes on the contraction rate θ instead, which is a separate change.
The test solves the default and the fixed order 13 on Robertson and checks the step count, the end state and mass conservation; on master it fails with the values above.
AI Disclosure: Claude assisted with this change.

@singhharsh1708
singhharsh1708 force-pushed the fix-adaptive-radau-newton-tol branch from 462be58 to 3c2ea16 Compare August 29, 2026 18:46
@singhharsh1708
singhharsh1708 force-pushed the fix-adaptive-radau-newton-tol branch from 3c2ea16 to 0ea6049 Compare August 29, 2026 19:17
@singhharsh1708
singhharsh1708 marked this pull request as ready for review August 29, 2026 21:11
@ChrisRackauckas
ChrisRackauckas merged commit 6f1977c into SciML:master Aug 29, 2026
129 of 131 checks passed
@singhharsh1708
singhharsh1708 deleted the fix-adaptive-radau-newton-tol branch August 30, 2026 06:36
ChrisRackauckas added a commit that referenced this pull request Sep 10, 2026
- Document the limiter keywords with their real names (#4427)
- Tighten the AdaptiveRadau Newton tolerance with the stage count (#4431)
- Fix the AitkenNeville evaluation count and array states (#4428)
- Fix crashes when a cache holds a vector of nonlinear solvers (#4345)
- Tag the AD type for adaptive exponential algorithms (#4429)
- Release 7.20.0 (#4432)
- Release 3.6.1 (#4433)
- Release 2.3.1 (#4434)
- treat AutoSparse(ForwardDiff) as ForwardDiff (#4422)
- Correct skipped sublibrary version numbers (#4435)



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 11, 2026
- Format clean-master drift with Runic 1.10 (#4423)
- Reformat six files for Runic 1.10 (#4424)
- Refresh FSAL derivatives after solve-level step limiters (#4035)
- Require SciMLBase 3.46 where AutoDespecialize is used (#4426)
- Document the limiter keywords with their real names (#4427)
- Tighten the AdaptiveRadau Newton tolerance with the stage count (#4431)
- Fix the AitkenNeville evaluation count and array states (#4428)
- Fix crashes when a cache holds a vector of nonlinear solvers (#4345)
- Tag the AD type for adaptive exponential algorithms (#4429)
- Release 7.20.0 (#4432)



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