Skip to content

Change default lazy interpolation to false for v7#3250

Closed
ChrisRackauckas-Claude wants to merge 1 commit intoSciML:v7from
ChrisRackauckas-Claude:v7-lazy-default-false
Closed

Change default lazy interpolation to false for v7#3250
ChrisRackauckas-Claude wants to merge 1 commit intoSciML:v7from
ChrisRackauckas-Claude:v7-lazy-default-false

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

  • Changes the default value of lazy from Val{true}() to Val{false}() for all algorithms that support it: BS5, Vern6/7/8/9, RKV76IIa, and AutoVern6/7/8/9
  • Updates docstring defaults and Bool compatibility constructors to match
  • Updates ode_strip_test.jl to verify that strip_solution now works for Vern solutions with the new default, and that explicitly passing lazy=true still throws LazyInterpolationException

Motivation

When lazy=true (old default), the ODE function f is needed during interpolation queries, which prevents strip_interpolation from working. With lazy=false, all intermediate steps are computed eagerly so f is 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

  • OrdinaryDiffEqVerner tests pass
  • OrdinaryDiffEqLowOrderRK tests pass
  • Strip test verifies strip_solution works for default Vern7() (lazy=false)
  • Strip test verifies strip_solution throws 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

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>
@oscardssmith
Copy link
Copy Markdown
Member

With this change are Vern methods still the most efficient high order solvers?

@ChrisRackauckas
Copy link
Copy Markdown
Member

This wasn't the intended change 😅

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor Author

Closing: the default should remain Val{true}(), not Val{false}(). Will create a new PR that only removes the Bool compatibility paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants