Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

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

  • 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 (:commutative hint)
  • ImplicitRKMil() for stiff problems or non-identity mass matrices (:stiff hint)
  • RKMil() for Stratonovich interpretation (:stratonovich hint)
  • LambaEM() / LambaEulerHeun() for non-diagonal noise
  • ISSEM() / ImplicitEulerHeun() for stiff non-diagonal problems
  • SOSRA() / SKenCarp() for additive noise (:additive hint)

Test Plan

  • Added tests verifying default solver dispatch
  • Tests verify correct algorithm selection for various problem types and hints
  • All tests pass locally

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]

@ChrisRackauckas-Claude ChrisRackauckas-Claude force-pushed the move-default-sde-algorithm branch 2 times, most recently from 2682289 to a906efc Compare October 10, 2025 16:50
…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]>
@ChrisRackauckas ChrisRackauckas merged commit 0ddad8b into SciML:master Oct 10, 2025
19 of 28 checks passed
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]>
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants