-
-
Notifications
You must be signed in to change notification settings - Fork 76
Move SDE default algorithm from DifferentialEquations.jl to StochasticDiffEq.jl #633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ChrisRackauckas
merged 1 commit into
SciML:master
from
ChrisRackauckas-Claude:move-default-sde-algorithm
Oct 10, 2025
Merged
Move SDE default algorithm from DifferentialEquations.jl to StochasticDiffEq.jl #633
ChrisRackauckas
merged 1 commit into
SciML:master
from
ChrisRackauckas-Claude:move-default-sde-algorithm
Oct 10, 2025
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
2682289 to
a906efc
Compare
…cDiffEq.jl This PR moves the default SDE solver implementation from DifferentialEquations.jl to StochasticDiffEq.jl, following the pattern established in SciML/DelayDiffEq.jl#326 and SciML/DelayDiffEq.jl#334. ## Changes - Added `src/default_sde_alg.jl` containing the default algorithm selection logic - Implemented `__init` and `__solve` dispatches for `SDEProblem` with `Nothing` algorithm - Added `get_alg_hints` helper function for extracting algorithm hints from kwargs - Added comprehensive tests in `test/default_solver_test.jl` - Updated module to include the new default algorithm file ## Default Algorithm Behavior When no algorithm is specified, the solver now automatically selects: - SOSRI() as the standard default - RKMilCommute() for commutative noise - ImplicitRKMil() for stiff problems or non-identity mass matrices - RKMil() for Stratonovich interpretation - LambaEM() / LambaEulerHeun() for non-diagonal noise - ISSEM() / ImplicitEulerHeun() for stiff non-diagonal problems - SOSRA() / SKenCarp() for additive noise ## Test Plan - [x] Added tests verifying default solver dispatch - [x] Tests verify correct algorithm selection for various problem types - [x] All tests pass locally This is part of the ongoing effort to modularize DifferentialEquations.jl by moving default solvers to their respective packages. 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <[email protected]>
a906efc to
8814ce1
Compare
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/DifferentialEquations.jl
that referenced
this pull request
Oct 10, 2025
This PR removes the default SDE algorithm selection from DifferentialEquations.jl, as it has been moved to StochasticDiffEq.jl in SciML/StochasticDiffEq.jl#633. ## Changes - Removed `src/sde_default_alg.jl` - Removed include of `sde_default_alg.jl` from `src/DifferentialEquations.jl` - Removed `test/default_sde_alg_test.jl` - Removed SDE default algorithm test from `test/runtests.jl` ## Context This is part of the ongoing effort to modularize DifferentialEquations.jl by moving default solver logic to their respective packages (see SciML#1086). The SDE default algorithm is now handled directly in StochasticDiffEq.jl via `__init` and `__solve` dispatches when no algorithm is specified. Related PRs: - SciML/StochasticDiffEq.jl#633 - Adds default algorithm to StochasticDiffEq.jl - SciML/DelayDiffEq.jl#326 - Similar change for DelayDiffEq.jl - SciML/DelayDiffEq.jl#334 - Follow-up for DelayDiffEq.jl 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <[email protected]>
2 tasks
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/DifferentialEquations.jl
that referenced
this pull request
Oct 10, 2025
This PR removes all default algorithm selection logic from DifferentialEquations.jl, as it has been moved to the respective solver packages. Closes SciML#1086 ## Changes **Removed source files:** - ❌ `src/default_solve.jl` - Generic default solve dispatch - ❌ `src/default_arg_parsing.jl` - Helper functions for parsing algorithm hints - ❌ `src/sde_default_alg.jl` - SDE default algorithm logic - ❌ `src/dae_default_alg.jl` - DAE default algorithm logic - ❌ `src/dde_default_alg.jl` - DDE default algorithm logic - ❌ `src/discrete_default_alg.jl` - Discrete default algorithm logic - ❌ `src/rode_default_alg.jl` - RODE default algorithm logic - ❌ `src/steady_state_default_alg.jl` - Steady state default algorithm logic - ❌ `src/bvp_default_alg.jl` - BVP default algorithm logic **Removed test files:** - ❌ `test/default_sde_alg_test.jl` - ❌ `test/default_dae_alg_test.jl` - ❌ `test/default_dde_alg_test.jl` - ❌ `test/default_discrete_alg_test.jl` - ❌ `test/default_rode_alg_test.jl` - ❌ `test/default_steady_state_alg_test.jl` - ❌ `test/default_bvp_alg_test.jl` **Updated files:** - ✏️ `src/DifferentialEquations.jl` - Removed all include statements for default algorithms - ✏️ `test/runtests.jl` - Removed all default algorithm tests ## Context This is part of the ongoing effort to modularize DifferentialEquations.jl (see SciML#1086). Default algorithm selection is now handled directly in each solver package via `__init` and `__solve` dispatches when no algorithm is specified. DifferentialEquations.jl is now purely a meta-package that re-exports the individual solver packages. ## Related PRs - **SDE:** SciML/StochasticDiffEq.jl#633 - Adds default algorithm to StochasticDiffEq.jl - **DDE Pattern:** SciML/DelayDiffEq.jl#326, SciML/DelayDiffEq.jl#334 - **ODE:** Already handled in OrdinaryDiffEqDefault.jl ## Breaking Changes None - this is purely an internal refactoring. The user-facing API remains unchanged. Users can still call `solve(prob)` without specifying an algorithm and the appropriate default will be selected by the respective solver package. 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <[email protected]>
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/DifferentialEquations.jl
that referenced
this pull request
Oct 10, 2025
…(v8.0.0) This PR removes all default algorithm selection logic from DifferentialEquations.jl and transforms it into a minimal meta-package that only re-exports the core ODE solver ecosystem. Closes SciML#1086 ## Major Changes (v8.0.0 - Breaking Release) ### Removed source files (9): - ❌ `src/default_solve.jl` - ❌ `src/default_arg_parsing.jl` - ❌ `src/sde_default_alg.jl` - ❌ `src/dae_default_alg.jl` - ❌ `src/dde_default_alg.jl` - ❌ `src/discrete_default_alg.jl` - ❌ `src/rode_default_alg.jl` - ❌ `src/steady_state_default_alg.jl` - ❌ `src/bvp_default_alg.jl` ### Removed test files (7): - ❌ All `test/default_*_alg_test.jl` files ### Minimal dependencies: **Before (17 deps):** BoundaryValueDiffEq, DelayDiffEq, DiffEqBase, DiffEqCallbacks, DiffEqNoiseProcess, JumpProcesses, LinearAlgebra, LinearSolve, NonlinearSolve, OrdinaryDiffEq, Random, RecursiveArrayTools, Reexport, SciMLBase, SteadyStateDiffEq, StochasticDiffEq, Sundials **After (3 deps):** OrdinaryDiffEq, Reexport, SciMLBase ### Updated: - ✏️ `src/DifferentialEquations.jl` - Now only re-exports SciMLBase and OrdinaryDiffEq - ✏️ `Project.toml` - Version bumped to 8.0.0, minimal dependencies - ✏️ `test/runtests.jl` - Minimal test suite - ✏️ Julia compat bumped to 1.10 ## Context DifferentialEquations.jl is now a minimal meta-package. Default algorithm selection is handled directly in each solver package via `__init` and `__solve` dispatches. Users requiring other solver types (SDEs, DDEs, DAEs, BVPs, etc.) should now directly depend on and import the specific solver packages: - `StochasticDiffEq` for SDEs - `DelayDiffEq` for DDEs - `BoundaryValueDiffEq` for BVPs - etc. ## Related PRs - **SDE:** SciML/StochasticDiffEq.jl#633 - **DDE:** SciML/DelayDiffEq.jl#326, SciML#334 ## Breaking Changes - **Version 8.0.0** - Major breaking release - No longer re-exports all solver packages - Users must explicitly add and import solver packages they need - `using DifferentialEquations` now only provides ODE solving capabilities 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <[email protected]>
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
This PR moves the default SDE solver implementation from DifferentialEquations.jl to StochasticDiffEq.jl, following the pattern established in #326 and #334 for DelayDiffEq.jl (SciML/DelayDiffEq.jl#326 and SciML/DelayDiffEq.jl#334).
Changes
src/default_sde_alg.jlcontaining the default algorithm selection logic__initand__solvedispatches forSDEProblemwithNothingalgorithmget_alg_hintshelper function for extracting algorithm hints from kwargstest/default_solver_test.jlDefault Algorithm Behavior
When no algorithm is specified, the solver now automatically selects:
:commutativehint):stiffhint):stratonovichhint):additivehint)Test Plan
Notes
This is part of the ongoing effort to modularize DifferentialEquations.jl by moving default solvers to their respective packages, similar to what was done for DelayDiffEq and OrdinaryDiffEq.
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]