Unify RHS and SOLOUT user interrupts under a single idid exit path#52
Merged
Conversation
Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/4b6afe5b-daf3-4c54-a604-ea10ab860a5b Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/4b6afe5b-daf3-4c54-a604-ea10ab860a5b Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/4b6afe5b-daf3-4c54-a604-ea10ab860a5b Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
ivan-pi
May 12, 2026 20:06
View session
ivan-pi
approved these changes
May 12, 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.
This change makes user-driven early termination behave consistently whether it originates in
SOLOUTor during RHS evaluation. Both callback paths now return through the same solver status (idid = -2) while preserving the last accepted integration state.Solver API
rhs_subwith aniresin/out flag.ires < 0the same asirtrn < 0fromsolout: returnidid = -2.Core integration flow
sirk3stage evaluation.(x, y)state when an RHS interrupt occurs mid-step, so callback exits remain restart-safe and consistent with existingsoloutsemantics.Docs and call sites
idid = -2now represents a user interrupt from either callback surface.Regression coverage
ode_hmaxto cover RHS-triggered interruption and assert that the solver returns the prior accepted state rather than a partially advanced trial state.Example updated callback shape: