You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are many interpolations with a discontinuous derivative. Right now, ConstantInterpolation returns a NaN at the node points. That ends up being really bad behavior for many solver contexts because that NaN can be hard to recover from. Instead, it would be good to choose a directional derivative.
For the purpose of use in solvers, it almost always makes sense to use the right derivative. This is because solvers are trying [t, t+dt] moving from left to right, so if the derivative at the start is different, you get a jump the solver cannot handle. So normally it's this derivative. But it would be good to allow the choice. In DifferentialEquations this is handled via continuity = :right with a choice of :left. It would be good to add this argument to derivative.
The text was updated successfully, but these errors were encountered:
There are many interpolations with a discontinuous derivative. Right now, ConstantInterpolation returns a
NaN
at the node points. That ends up being really bad behavior for many solver contexts because that NaN can be hard to recover from. Instead, it would be good to choose a directional derivative.For the purpose of use in solvers, it almost always makes sense to use the right derivative. This is because solvers are trying
[t, t+dt]
moving from left to right, so if the derivative at the start is different, you get a jump the solver cannot handle. So normally it's this derivative. But it would be good to allow the choice. In DifferentialEquations this is handled viacontinuity = :right
with a choice of:left
. It would be good to add this argument toderivative
.The text was updated successfully, but these errors were encountered: