Repository navigation
ForceFreeStates - BUGFIX - Report an aborted Euler-Lagrange integration instead of failing in the edge scan - #564
Merged
Conversation
…on instead of failing in the edge scan solve_el never checked the solver's return code, so a solve that stopped short (e.g. the step size underflowing) was stored as if it had reached the end of its interval, and the forward sweep later failed in findmax_dW_edge! with a MethodError. solve_el now errors with the ψ reached, the target and the return code. Covers the forward solve and the Riccati propagator solves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
logan-nc
reviewed
Oct 26, 2026
logan-nc
left a comment
Collaborator
There was a problem hiding this comment.
Read in full. Ready to approve from my read; nothing to add. successful_retcode is the right gate given no FFS callback calls terminate!, the message names a real key (eulerlagrange_tolerance), and the blow-up/decay pair tests the gate directly rather than through a full solve.
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.
Release note
When the Euler-Lagrange ODE solver gives up partway through an interval (for example when its step size underflows on a stiff kinetic run), GPEC now stops with an error naming the ψ it reached. Before, it carried on with a truncated solution and later failed with an unrelated
MethodErrorin the edge dW scan.Regression report
Notes for reviewers
feature/solve-fixed-kinetic). The harness compares against that branch.solve_elis the single entry point for every Euler-Lagrange ODE solve: the forwardintegrate_el_region!and the five Riccati propagator solves. It now checksSciMLBase.successful_retcode(sol). No ForceFreeStates callback callsterminate!, so an unsuccessful return code always means a real failure.findmax_dW_edge!is unchanged: with the root cause caught, itsfindfirstcan no longer returnnothing.du/dψ = u²blow-up throughsolve_el(direct, deterministic), plus a decaying ODE as the control;kinetic_factor = 0.1throughsolve, now raises the new message (it aborts at ψ ≈ 0.404).diiid_n1_riccati) is in the harness to show that none of the currently passing propagator solves were silently ending early.🤖 Generated with Claude Code