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

Phase 15: Move initdt to ODE, delete dead code, unify resize#697

Merged
ChrisRackauckas merged 6 commits intoSciML:masterfrom
ChrisRackauckas-Claude:phase15-initdt-dead-code-resize
Mar 17, 2026
Merged

Phase 15: Move initdt to ODE, delete dead code, unify resize#697
ChrisRackauckas merged 6 commits intoSciML:masterfrom
ChrisRackauckas-Claude:phase15-initdt-dead-code-resize

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Mar 16, 2026

Summary

  • Deletes src/initdt.jl (98 lines) -- initdt unified into OrdinaryDiffEqCore ode_determine_initdt
  • Deletes dead iip_generate_W/oop_generate_W code (64 lines)
  • Unifies resize!/deleteat!/addat! -- merges ratenoise_cache loop into *_non_user_cache! methods
  • Cleans comment clutter from stepsize_controllers.jl (7 lines)

Net: -219 lines removed from StochasticDiffEq

Details

initdt

SDE _determine_initdt now calls OrdinaryDiffEqCore.ode_determine_initdt with AbstractRODEProblem dispatch. Noise terms are conditionally folded into the d1/d2 estimates when prob.f.g is not nothing. Requires OrdinaryDiffEqCore >= 3.22.

Dead code removal

iip_generate_W and oop_generate_W were never called anywhere. Deleted.

resize!/deleteat!/addat! unification

Moved ratenoise_cache iteration into *_non_user_cache! methods. Top-level overrides deleted (ODE handles full_cache iteration).

Companion PR: SciML/OrdinaryDiffEq.jl#3137

Test plan

  • SDE Interface1 tests pass (152/152)
  • SDE Interface2 tests pass
  • SDE Interface3 tests pass
  • SDE initdt smoke tests pass
  • Full SDE CI suite

- Delete src/initdt.jl (98 lines): sde_determine_initdt moved to
  OrdinaryDiffEqCore. Keep thin _determine_initdt override that calls
  OrdinaryDiffEqCore.sde_determine_initdt.
- Delete iip_generate_W/oop_generate_W (64 lines): dead code, never
  called anywhere in the codebase.
- Unify resize!/deleteat!/addat!: merge ratenoise_cache iteration into
  *_non_user_cache! methods, delete top-level resize!/deleteat!/addat!
  overrides (ODE's versions now handle full_cache iteration).
- Clean stepsize_controllers.jl: remove comment clutter.
- Bump OrdinaryDiffEqCore compat to 3.22.

Net: -198 lines removed.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
TauLeaping uses DiscreteProblem (not AbstractRODEProblem), so the
_determine_initdt override must check the problem type and fall
through to ode_determine_initdt for non-RODE problems.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
TauLeaping uses DiscreteProblem which has no f.g or f.mass_matrix,
so neither sde_ nor ode_determine_initdt applies. Return a small
dt fraction (same as the original SDE code's jump shortcut).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Replace OrdinaryDiffEqCore.sde_determine_initdt with
OrdinaryDiffEqCore.ode_determine_initdt, which now handles
both ODE and RODE/SDE problems via conditional noise terms.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Matches registered v3.23.0 which contains the unified
ode_determine_initdt with AbstractRODEProblem dispatch.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas merged commit 8907f29 into SciML:master Mar 17, 2026
28 of 66 checks passed
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