Change default lazy interpolation to false for v7#3250
Closed
ChrisRackauckas-Claude wants to merge 1 commit intoSciML:v7from
Closed
Change default lazy interpolation to false for v7#3250ChrisRackauckas-Claude wants to merge 1 commit intoSciML:v7from
ChrisRackauckas-Claude wants to merge 1 commit intoSciML:v7from
Conversation
For OrdinaryDiffEq v7, change the default value of `lazy` from
`Val{true}()` to `Val{false}()` for BS5, Vern6/7/8/9, RKV76IIa,
and AutoVern6/7/8/9. When lazy=false, all intermediate interpolation
steps are computed eagerly so the ODE function `f` is not needed
during interpolation queries. This enables `strip_interpolation` and
`strip_solution` to work for these solvers by default, supporting
the goals of SciMLBase.jl#629.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
|
With this change are Vern methods still the most efficient high order solvers? |
Member
|
This wasn't the intended change 😅 |
Contributor
Author
|
Closing: the default should remain Val{true}(), not Val{false}(). Will create a new PR that only removes the Bool compatibility paths. |
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.
Summary
lazyfromVal{true}()toVal{false}()for all algorithms that support it: BS5, Vern6/7/8/9, RKV76IIa, and AutoVern6/7/8/9ode_strip_test.jlto verify thatstrip_solutionnow works for Vern solutions with the new default, and that explicitly passinglazy=truestill throwsLazyInterpolationExceptionMotivation
When
lazy=true(old default), the ODE functionfis needed during interpolation queries, which preventsstrip_interpolationfrom working. Withlazy=false, all intermediate steps are computed eagerly sofis not needed for interpolation. This is a breaking change appropriate for v7, making SciML/SciMLBase.jl#629 simpler and more robust.Relates to #2310.
Test plan
strip_solutionworks for default Vern7() (lazy=false)strip_solutionthrows for explicit Vern7(lazy=true)🤖 Generated with Claude Code
Co-Authored-By: Chris Rackauckas accounts@chrisrackauckas.com
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com