Skip to content

Resync SDE noise when late add_tstop! shortens dt - #4041

Closed
niy-ati wants to merge 1 commit into
SciML:masterfrom
niy-ati:fix/sde-em-late-tstop-3175
Closed

Resync SDE noise when late add_tstop! shortens dt#4041
niy-ati wants to merge 1 commit into
SciML:masterfrom
niy-ati:fix/sde-em-late-tstop-3175

Conversation

@niy-ati

@niy-ati niy-ati commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • After modify_dt_for_tstops!, resample the pending noise increment when W.dt no longer matches the integrator dt (late add_tstop! after init on fixed-step EM; [SDE] EM solver accepts incompatible tstop behind current time #3175 / StochasticDiffEq#413).
  • When tstops remain, keep the tstop-shortened dt instead of letting RSWM expand it via W.dt.
  • Add EM/LambaEM regression coverage and a past-time add_tstop! throw check in StochasticDiffEq tstops_tests.jl.

Test plan

Fixed-step EM could step past a tstop added after init because the Wiener
increment still matched the original dt. After modify_dt_for_tstops!, resample
noise to the shortened dt, and keep RSWM from expanding dt while tstops remain.
@ChrisRackauckas

Copy link
Copy Markdown
Member

thanks for this. It was almost right, but it needed to use a bit more of the RSWM internals to make sure the increment size change gets propagated through the bridge distribution. I finished it up in #4095

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