SciML / DiffEqCallbacks.jl

A library of useful callbacks for hybrid scientific machine learning (SciML) with augmented differential equation solvers
https://docs.sciml.ai/DiffEqCallbacks/stable/
Other
85 stars 44 forks source link

PresetTimeCallback: filter out tstop of 0.0 #215

Closed visr closed 3 months ago

visr commented 3 months ago

In #212 the behavior of filter_tstops was changed, note that the < became a <=.

https://github.com/SciML/DiffEqCallbacks.jl/pull/212/files#diff-40390d05d98d137d2045d5d61bdf194384f4e70b8778170c7d8af50143406d76R54-R57

I'm not sure if that was done intentionally but it is causing some issues. For instance, in the modified test from this PR, calling solve!(integrator) still works, but if I do step!(integrator) it aborts because it wants to step from 0 to 0.

Warning: dt(0.0) <= dtmin(0.0) at t=0.0, and step error estimate = 1.0. Aborting. There is either an error in your model specification or the true solution is unstable.
visr commented 3 months ago

@oscardssmith could you confirm if this was an unintentional regression from #212?

oscardssmith commented 3 months ago

Yeah. this change looks correct to me.