Skip to content

Refresh FSAL derivatives after solve-level step limiters - #4035

Merged
ChrisRackauckas merged 4 commits into
SciML:masterfrom
svchb:step-limiter-fsal-refresh
Aug 29, 2026
Merged

ChrisRackauckas merged 4 commits into
SciML:masterfrom
svchb:step-limiter-fsal-refresh

Conversation

@svchb

@svchb svchb commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • invalidate cached FSAL derivatives after every non-trivial solve-level step_limiter
  • dispatch reset_fsal! on the algorithm cache so ETD2 can recompute its split derivative while preserving nonlinear history
  • document attempted-step, adaptive-estimator, dense-output, and refresh semantics
  • add in-place, out-of-place, adaptive TRBDF2/Tsit5, ETD2, callback, and RHS-accounting regressions
  • bump OrdinaryDiffEqCore to 4.11.1 and OrdinaryDiffEqExponentialRK to 2.2.1

Root cause

Solve-level step limiters run centrally after perform_step!. FSAL methods have already computed fsallast at the unprojected endpoint by then. The accepted state can therefore be projected while the next step starts with a derivative evaluated at a state that was never accepted.

Marking reeval_fsal restores the invariant fsalfirst == f(uprev, p, tprev) before the next step. ETD2 needs cache-specific handling because its FSAL object stores separate linear/current-nonlinear/previous-nonlinear values; the reset preserves nlprev and recomputes only the current split derivative.

Semantics

The limiter remains outside the embedded adaptive error estimate. It is applied to each attempted endpoint before domain checking and acceptance callbacks. Dense interpolants between accepted endpoints are not projected. The default trivial limiter adds no work; a configured non-trivial limiter adds one RHS refresh between accepted steps, excluding the terminal endpoint where no later step consumes FSAL.

Verification

  • test/Integrators_I/step_limiter_test.jl: 263/263 passed
  • ExponentialRK functional tests: 134 passed, 4 existing expected-broken
  • ExponentialRK QA: 19/19 passed
  • ExponentialRK JET: 1/1 passed
  • ExponentialRK allocation lane: runtime-allocation regression passed, 17 existing expected-broken
  • Core QA: 17/17 passed
  • Core JET: 30 passed, 1 existing expected-broken
  • Runic and git diff --check: passed
  • post-merge FSAL probes for adaptive Tsit5, TRBDF2, and ETD2: passed
  • numerical probe, adaptive Tsit5 at 1e-8 tolerance: endpoint error improved from 2.96e-7 to 5.87e-11; rejections from 16 to 0; RHS calls from 219 to 107

svchb added 2 commits July 27, 2026 15:00
Solve-level limiters run after method stages have computed their endpoint derivatives. Mark non-trivial limiters for FSAL reevaluation so the next step starts from a derivative consistent with the accepted projected state. Add cache-dispatched ETD2 resets that preserve nonlinear history, plus in-place, out-of-place, callback, and evaluation-count regressions.
@svchb

svchb commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

All of the failures seem to be unrelated.

Comment thread lib/OrdinaryDiffEqCore/src/solve.jl Resolved
@svchb

svchb commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@ChrisRackauckas Thanks for your review. Can we get this merged?

@ChrisRackauckas

Copy link
Copy Markdown
Member

oh yes thank you for the reminder.

@ChrisRackauckas
ChrisRackauckas merged commit 440a58e into SciML:master Aug 29, 2026
235 of 263 checks passed
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