DifferentialEquations.jl
DifferentialEquations.jl copied to clipboard
Solving ODE in reverse time requires negative dt for saveat
Hi!
Is it possible to solve ODEs using terminal conditions instead of initial conditions? I know I can make a change of variable to transform the problem from terminal conditions to initial ones, but I would like to solve it directly using something like:
tspan = (1.0, 0.0)
uT = [0.0]
ode = ODEProblem(rhs, uT, tspan, p)
...
Thanks!
Yes, it works. Give it a try!
Are you using positive or negative solf.dt?
positive
What happens if you make it negative?
It seems that it worked correctly when using a negative dt. Sorry for the delay, I was out!
maybe you should accept either a negative or positive dt and change it accordingly in the source code.
Thanks!
Yup, good suggestion! Reopened and re-titled along the lines of that.