Make x a mutable integration cursor in stiff3 (intent(inout)) and propagate endpoint/interrupt semantics - #49
Merged
Conversation
Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/df304b04-93b7-43ef-958a-6cc733a0f9bc Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/df304b04-93b7-43ef-958a-6cc733a0f9bc Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/df304b04-93b7-43ef-958a-6cc733a0f9bc 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 08:38
View session
ivan-pi
approved these changes
May 12, 2026
ivan-pi
marked this pull request as ready for review
May 12, 2026 08:51
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.
stiff3previously treated bothxandxendasintent(in), which prevented returning the actual integration position. This change makesxan in/out cursor so callers receivex == xendon successful completion, or the last accepted step when integration exits early.Solver API contract
stiff3_auto,stiff3_work, andstiff3_coreto takexasintent(inout).xendasintent(in).x(normal completion and early callback interruption).Behavioral semantics
x.soloutnow returns the most recent accepted coordinate viax, preserving restartability from that point.Call-site compatibility updates
x0was previously immutable.Docs and usage updates
xsemantics and clarifyhmaxdefault interpretation relative to the initialx.Targeted assertions
x == xendon normal completion.xequals last accepted step on early exit.