Skip to content

Conversation

@dcourteville
Copy link
Contributor

@dcourteville dcourteville commented May 30, 2025

This is a fix for SciML/DifferentialEquations.jl#1087.

Checklist

  • Appropriate tests were added: This can be tested with the Minimal Reproducible Example in the original issue, but the test can't be implemented in DiffEqBase since it needs to actually solve the ODE
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated: Nothing to do
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API: Nothing to do

Additional context

Internal ITP implementation can sometime return a solution out of tspan when left > right, so we just ensure that left < right even if prob.tspan bounds are inverted when integrating backward. I got the change from the original ITP implementation in NonlinearSolve.jl

@ChrisRackauckas
Copy link
Member

Looks right to me. But we should add a test so this doesn't regress.

@dcourteville
Copy link
Contributor Author

I managed to write a simple test case that reproduce the error, it should be good now.

@ChrisRackauckas ChrisRackauckas merged commit 41be74a into SciML:master May 30, 2025
35 of 47 checks passed
@oscardssmith
Copy link
Member

thanks for fixing this!

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.

3 participants