remake
ignores u0
updates when the initialization is trivial
#3318
Labels
bug
Something isn't working
remake
ignores u0
updates when the initialization is trivial
#3318
Describe the bug 🐞
Edit: The issue is more general that I initially described, the fact that we have dual numbers is not relevant, see the next post for a simpler MWE.
Passing
Vector{ForwardDiff.Dual}
toremake
leads to an internal type promotion byupdated_u0_p
, but by the end of the function the values are back to floats. Furthermore, if this is anODEProblem
,init
also also promotes theu0
internally, but it then usesremake
to update the values in the problem and the duals are dropped again, leading to method errors in the problem function.Expected behavior
remake
should not drop the duals.Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
I can reproduce this with
SCCNonlinearProblem
too, but it needs SciML/SciMLBase.jl#904The text was updated successfully, but these errors were encountered: