Repository navigation
Reset LeapfrogMidpoint history after a vector-field jump - #798
Open
DiadkoShmek wants to merge 1 commit into
Open
DiadkoShmek wants to merge 1 commit into
DiadkoShmek wants to merge 1 commit into
Conversation
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.
LeapfrogMidpoint.step()ignoresmade_jump, so a resumed solve can combine pre-discontinuity history with the new vector field. Solvingy'=1from 0 to 1 withdt0=0.25, then resuming withy'=2, retainedsolver_stateandmade_jump=True, gives 1.75 at time 1.25 instead of the exact 1.5. Later steps can alternate between correct and incorrect states; endpoint-only checks can miss the error.Select
(t0, y0)as the history after a jump, using the existing Euler startup. Elementwise selection supports traced jump flags and the scalar promotion already supported by directinit/stepcalls. The solver-state representation and ordinary continuation remain intact.Two compact regressions in the existing solver test module cover forward/backward restart values and analytic rate gradients, plus no-jump time/state promotion controls.
Validation on current main
e950aa2with CPU JAX 0.12.0.1:git diff --checkpasses.The full repository suite, accelerators, general SDE coverage and performance were not evaluated. Implementation and testing were AI-assisted.