OrdinaryDiffEq.jl
OrdinaryDiffEq.jl copied to clipboard
reset_fsal! doesn't account for implicit models
When an implicit model requires a call to fsal! it fails to recognize that the form of f! is f!(out, du, u, p, t) and throws an error.
This is in integrator utils line 376
function reset_fsal!(integrator)
# Under these condtions, these algorithms are not FSAL anymore
integrator.destats.nf += 1
if typeof(integrator.cache) <: OrdinaryDiffEqMutableCache ||
(typeof(integrator.cache) <: CompositeCache &&
typeof(integrator.cache.caches[1]) <: OrdinaryDiffEqMutableCache)
integrator.f(integrator.fsalfirst,integrator.u,integrator.p,integrator.t)
else
integrator.fsalfirst = integrator.f(integrator.u,integrator.p,integrator.t)
end
# Do not set false here so it can be checked in the algorithm
# integrator.reeval_fsal = false
end
I think this is partially fixed here: https://github.com/SciML/OrdinaryDiffEq.jl/pull/1105