Skip to content

Conversation

@ChrisRackauckas
Copy link
Member

Summary

This PR moves the default DDE solver implementation from DifferentialEquations.jl to DelayDiffEq.jl, following the pattern established in SciML/BoundaryValueDiffEq.jl#370.

The default solver for DDEs is now MethodOfSteps(DefaultODEAlgorithm()) which uses the OrdinaryDiffEqDefault.jl package.

Changes

  • Added __solve and __init dispatches for DDEProblem that use MethodOfSteps(DefaultODEAlgorithm())
  • Added support for DefaultCache from OrdinaryDiffEqDefault in cache handling functions
  • Added helper function get_current_cache to handle both regular cache arrays and DefaultCache structure
  • Added tests for the default solver dispatch
  • Updated cache_utils.jl to use the new cache helper function

Test Plan

  • Added tests in test/interface/default_solver.jl to verify dispatch works
  • Formatted code with JuliaFormatter using SciMLStyle
  • CI should pass existing tests

Notes

Full compatibility with DefaultODEAlgorithm's DefaultCache structure requires additional work for complete integration with DelayDiffEq's internals. The current implementation ensures the dispatch works correctly, but solving with the default algorithm may encounter cache structure compatibility issues that need further investigation.

This is part of the ongoing effort to modularize DifferentialEquations.jl by moving default solvers to their respective packages.

🤖 Generated with Claude Code

ChrisRackauckas and others added 3 commits August 10, 2025 09:16
This PR moves the default DDE solver implementation from DifferentialEquations.jl to DelayDiffEq.jl,
similar to PR #370 in BoundaryValueDiffEq.jl.

Changes:
- Add __solve and __init dispatches for DDEProblem that use MethodOfSteps(DefaultODEAlgorithm())
- Add support for DefaultCache from OrdinaryDiffEqDefault in cache handling functions
- Add helper function get_current_cache to handle both regular cache arrays and DefaultCache
- Add tests for the default solver dispatch

Note: Full compatibility with DefaultODEAlgorithm's DefaultCache structure requires additional work
for complete integration with DelayDiffEq's internals.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Required for the default solver tests to run properly in CI
- Added comprehensive compat entries for all test dependencies
- Fixed piracy by treating DDEProblem as own in Aqua tests
- Fixed implicit imports by using qualified access for solve and init
- Fixed initialize! calls to use DiffEqBase instead of OrdinaryDiffEqCore (owner module)
@ChrisRackauckas ChrisRackauckas merged commit 0b79051 into master Aug 10, 2025
24 of 29 checks passed
@ChrisRackauckas ChrisRackauckas deleted the move-dde-default-solver branch August 10, 2025 17:59
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/StochasticDiffEq.jl that referenced this pull request Oct 10, 2025
…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-Claude pushed a commit to ChrisRackauckas-Claude/StochasticDiffEq.jl that referenced this pull request Oct 10, 2025
…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-Claude pushed a commit to ChrisRackauckas-Claude/StochasticDiffEq.jl that referenced this pull request Oct 10, 2025
…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-Claude pushed a commit to ChrisRackauckas-Claude/StochasticDiffEq.jl that referenced this pull request Oct 10, 2025
…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-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