Skip to content

Filter derivative discontinuities before the initial time - #4258

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/filter-pre-t0-d-discontinuities
Aug 14, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/filter-pre-t0-d-discontinuities

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed and why

Filter derivative-discontinuity entries that lie before the initial time in the integration direction when initializing or reinitializing the internal queue. Entries at the initial time and beyond the final time remain unchanged, and the same rule is applied for forward and reverse integration.

A stale pre-t0 entry otherwise remains permanently at the head of the queue. For DDEs, that blocks later propagated discontinuities from being handled, leaves a propagated tstop at zero distance, and terminates the solve with DtLessThanMin.

This follows the resolution chosen in #4199 (comment): discard entries before t0 instead of propagating history discontinuities.

Closes #4199

Failing before

I retained the new regression tests, temporarily restored the unfixed queue initialization, and ran:

GROUP=DelayDiffEq_Interface /home/crackauc/.juliaup/bin/julia +1.12 --project --color=no -e 'using Pkg; Pkg.test()'

The pre-t0 DDE stopped at its first propagated discontinuity:

Expression: sol.retcode == ReturnCode.Success
Evaluated: DtLessThanMin == Success

Expression: sol.t[end] == prob.tspan[2]
Evaluated: 10.0 == 50.0

Test Summary:       | Pass  Fail  Total
Discontinuity Tests |   53     2     55

Passing after

On final commit a5c928b269b506f48df065b4aa085adfbfa82dda:

GROUP=DelayDiffEq_Interface /home/crackauc/.juliaup/bin/julia +1.12 --project --color=no -e 'using Pkg; Pkg.test()'
Test Summary:       | Pass  Total   Time
Discontinuity Tests |   55     55  16.6s
Test Summary:         | Pass  Total     Time
Multi-Algorithm Tests |   28     28  1m47.2s
Testing DelayDiffEq tests passed
Testing OrdinaryDiffEq tests passed

The Core group covers forward filtering, reverse filtering, preservation of t0 and post-tf entries, and reinitialization:

GROUP=OrdinaryDiffEqCore_Core /home/crackauc/.juliaup/bin/julia +1.12 --project --color=no -e 'using Pkg; Pkg.test()'
Test Summary:            | Pass  Total  Time
Developer Time Queue API |    8      8  1.6s
Testing OrdinaryDiffEqCore tests passed
Testing OrdinaryDiffEq tests passed

QA also passed:

GROUP=QA /home/crackauc/.juliaup/bin/julia +1.12 --project --color=no -e 'using Pkg; Pkg.test()'
Test Summary:           | Pass  Total   Time
Quality Assurance Tests |   90     90  15.2s
Testing OrdinaryDiffEq tests passed

Runic over all three changed Julia files, typos over the diff, and git diff --check all exited 0.

The full documentation command also exited 0 through cross-references and HTML rendering:

/home/crackauc/.juliaup/bin/julia +1.12 --project=docs --color=no --startup-file=no docs/make.jl

That docs validation used the local SciMLBase documentation-fix stack for the independently reproduced ODENLStepData, AutoRespecialize, and dead Problem_Traits links. It did not disable or downgrade any Documenter checks.

Not verified

I did not run GROUP=Everything, GPU jobs, or downstream-package jobs. No dependency or public name was added.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 14, 2026 12:44
@ChrisRackauckas
ChrisRackauckas merged commit 8bc45c0 into SciML:master Aug 14, 2026
229 of 264 checks passed
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.

d_discontinuities before t0 is never popped and still stalls DDEs at the first propagated discontinuity

2 participants