Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Delete redundant SDE integrator methods, delegate to ODE#694

Closed
ChrisRackauckas-Claude wants to merge 2 commits intoSciML:masterfrom
ChrisRackauckas-Claude:unify-sde-integrator-methods
Closed

Delete redundant SDE integrator methods, delegate to ODE#694
ChrisRackauckas-Claude wants to merge 2 commits intoSciML:masterfrom
ChrisRackauckas-Claude:unify-sde-integrator-methods

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

Deletes redundant SDE methods that are now handled by ODE's field-gated versions (OrdinaryDiffEq.jl PR SciML/OrdinaryDiffEq.jl#3132). Net -147 lines from SDE.

Note: This PR is stacked on PR #693 (delete-sde-interpolation). Only the top commit (468c8d71) is new; the rest are from #692 and #693. Merge #693 first, then rebase this PR.

Deleted methods (~202 lines):

  • change_t_via_interpolation! — ODE's version now handles noise rejection via !isnothing(W) gating
  • reinit! — ODE's version now uses is_composite_algorithm trait, _has_ks guard, reinit_noise! hook
  • auto_dt_reset! — ODE's version now calls _determine_initdt hook (SDE extends)
  • set_rng! — ODE's version now syncs W/P RNGs
  • PIController stepsize overrides — ODE's generic versions are functionally equivalent
  • Dead DiffEqNoiseProcess.reject_step! on SDEIntegrator

Added extensions (~55 lines):

  • is_constant_cache for SDE cache types
  • reinit_noise! for AbstractNoiseProcess → DiffEqNoiseProcess.reinit!
  • _determine_initdt for SDEIntegrator → sde_determine_initdt
  • TauLeaping/CaoTauLeaping step_accept_controller! bridges (3-arg → 2-arg)

Depends on:

Test plan

  • OrdinaryDiffEqCore tests pass
  • StochasticDiffEq Interface1/2/3 tests pass (including composite alg tests)
  • Runic formatting applied (no changes needed)

🤖 Generated with Claude Code

Co-Authored-By: Chris Rackauckas accounts@chrisrackauckas.com

ChrisRackauckas and others added 2 commits March 15, 2026 14:23
Remove ~320 lines of SDE-specific interpolation code now that ODE's
_ode_interpolant falls back to linear_interpolant when k is empty:

- Delete src/dense.jl (sde_interpolant, current_interpolant/extrapolant,
  sde_interpolation — all 258 lines)
- Delete src/interp_func.jl (LinearInterpolationData — dead code)
- Delete integrator callable (ODE's ODEIntegrator callable handles it)
- Delete set_t! (ODE's version is identical for SDE algs)
- Delete dead accept_step!/save_noise! on SDEIntegrator
- Delete initialize_dae! wrapper (ODE's ODEIntegrator dispatch covers it)
- Import current_extrapolant from OrdinaryDiffEqCore
- Update inference test to use sol(t) instead of deleted sde_interpolation

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Delete change_t_via_interpolation! (ODE handles via noise rejection gating)
- Delete reinit! (ODE handles via is_composite_algorithm + reinit_noise!)
- Delete auto_dt_reset! (ODE delegates to _determine_initdt, extended for SDE)
- Delete set_rng! (ODE syncs W.rng/P.rng for framework noise)
- Delete PIController overrides (ODE's versions are functionally equivalent)
- Delete DiffEqNoiseProcess.reject_step! on SDEIntegrator (dead code)
- Add is_constant_cache for SDE cache types
- Add reinit_noise! extension for AbstractNoiseProcess
- Add _determine_initdt extension for SDEIntegrator
- Add TauLeaping/CaoTauLeaping bridges for step_accept_controller!
- Bump OrdinaryDiffEqCore compat to 3.20

Net: ~147 lines eliminated from SDE.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor Author

Closing — superseded by #695 which includes all commits from this PR plus phase 14. OrdinaryDiffEqCore v3.21.0 is now released.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants