You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Handle OrdinaryDiffEq v7 / DiffEqBase v7 / OrdinaryDiffEqCore v4 breaking changes
Bump compats to the new major versions (matching CompatHelper PRs #407, #408, #409)
and gate the OrdinaryDiffEqCore internals we extend so the package continues to build
against both OrdinaryDiffEqCore v3 and v4.
v4 removed a handful of internal hooks that ProbNumDiffEq relied on:
- `OrdinaryDiffEqCore._default_dae_init!(integrator, prob, x, alg)` was deleted
along with the per-solver DAE-init dispatch; initialization now routes through
`_initialize_dae!(integrator, prob, alg::DefaultInit, x)` and the default
algorithm switched from `BrownFullBasicInit` to `CheckInit`. Restore the prior
behaviour for `AbstractEK` by overriding `_initialize_dae!` for our integrator
type on v4.
- `OrdinaryDiffEqCore.isstandard` / `ispredictive` traits were removed; PI control
is now the default via `default_controller`, so the trait overrides are only
needed on v3.
- `integrator.EEst` was removed from the `ODEIntegrator` struct and replaced with
`OrdinaryDiffEqCore.get_EEst` / `set_EEst!` accessors backed by
`integrator.controller_cache`. Wrap both call sites in `perform_step!` with
helpers that pick the right API per version.
- `OrdinaryDiffEqCore._process_AD_choice` is gone on v4 (the `chunk_size` /
`diff_type` / `standardtag` solver kwargs were removed in favour of
`AutoForwardDiff(chunksize=…)` / `AutoFiniteDiff(fdtype=…)`). Fall back to an
inlined equivalent so `EK1` / `DiagonalEK1` keep accepting the legacy kwargs
on both versions.
See the OrdinaryDiffEq v7 NEWS.md for the full list of breaking changes.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
* JuliaFormatter
* Fix v4/v7 stack CI failures: scope reduction, RAT v4, Bool autodiff, DiffEqDevTools v4
Four distinct failures surfaced once CI started resolving the v4/v7 stack
(which became possible after the gating deps registered in General).
1. UndefVarError: RadauIIA5. OrdinaryDiffEq v7's package scope reduction
means `using OrdinaryDiffEq` no longer re-exports the full solver suite.
Add `using OrdinaryDiffEqFIRK: RadauIIA5` in test/stiff_problem.jl and
test/mass_matrix.jl, plus the dep UUID in test/Project.toml.
2. length(sol) returned the wrong value at test/solution.jl:29,96.
RecursiveArrayTools v4 changed length(sol) from "number of timesteps"
to prod(size(sol)) since AbstractVectorOfArray now subtypes AbstractArray.
Switch to length(sol.u) per the v7 NEWS migration.
3. MethodError: prepare_ADType(::Bool, ...) when EK1 or DiagonalEK1 was
constructed with the legacy autodiff=true or autodiff=false kwarg.
The v4 fallback for _process_AD_choice in src/algorithms.jl only handled
AutoForwardDiff and AutoFiniteDiff; the v3 OrdinaryDiffEqCore version
it replaced also converted Bool to an ADType. Mirror that conversion so
the Bool no longer propagates as the AD type parameter on the algorithm.
4. ArgumentError: Passing a Bool for verbose, raised by DiffEqDevTools v3's
WorkPrecisionSet on test/diffeqdevtools.jl:79. DiffEqDevTools v4 removed
the offending kwarg. Widen Project.toml compat to "2.46, 3, 4" so the
resolver picks v4 on the v4/v7 stack.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Switch default DAE init to CheckInit; drop verbose=false from broken WP test
Two changes:
1. src/algorithms.jl: replace the AbstractEK DAE-init override with one that
routes through CheckInit on both stacks. Matches the OrdinaryDiffEq v7 /
DifferentialEquations v8 default (errors on inconsistent ICs instead of
silently correcting them). Users who want the old auto-fix behavior must
now pass initializealg=BrownFullBasicInit() explicitly. On v4 the per-alg
hook is gone and CheckInit is already the default, so the override is only
needed on v3. Verified locally against test/mass_matrix.jl on the v4/v7
stack: both UniformScaling and Robertson mass-matrix tests pass with
consistent ICs.
2. test/diffeqdevtools.jl: drop verbose=false from the two WorkPrecisionSet
calls in the "is broken" testset. DiffEqDevTools v3 forwards verbose as a
Bool which OrdinaryDiffEq v7 rejects (DEVerbosity / SciMLLogging required).
DiffEqDevTools v4 removed the kwarg, but v4.0.0 is yanked in General, so
we drop the kwarg test-side. On v3/v6 this only removes a deprecation
warning the test was already eating.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Address code review feedback: fix AutoFiniteDiff regression, trim comments
Two functional changes in src/algorithms.jl:
- Drop the stray em-dash from the `_process_AD_choice` overview comment to
comply with the project's no-em-dashes style.
- Guard the `AutoFiniteDiff` branch of the v4 `_process_AD_choice` fallback
to only rebuild the ADType when the user passed a non-default legacy
`diff_type` kwarg. The previous version unconditionally rebuilt with
`fdtype=diff_type`, which silently dropped a user's pre-configured
`AutoFiniteDiff(fdtype=Val(:central))` (or similar) when they didn't also
set the legacy `diff_type`. Mirrors v3's behavior.
Comment trim across src/algorithms.jl and src/alg_utils.jl: the
`_alg_autodiff` block, the `_process_AD_choice` overview, the Bool-branch
inline comment, and the DAE-init block are all condensed without losing
the migration rationale. Saves ~10 lines in the compat-shim region.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Nathanael Bosch <nathanael.bosch@epfl.ch>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments