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
Wrapping an ODE solution in a struct and passing it to a secondary ODE problem as a parameter causes an anyeltypedual error.
Expected behavior
It's common in my field to solve an ODE (the background) and then solve another that depends on it (the perturbation). In this case, the RHS of the perturbative ODE depends on the solution to the background ODE. I think this works in 1.9, but errors in 1.10.
Minimal Reproducible Example 👇
using OrdinaryDiffEq
f(u, p, t) =1.01* u
u0 =1/2
tspan = (0.0, 1.0)
prob =ODEProblem(f, u0, tspan)
sol =solve(prob, Rodas5(), reltol =1e-8, abstol =1e-8)
struct Param{S,T}
sol::S
val::Tendg(u, p, t) = p.sol(t) * u
prob2 =ODEProblem(g, u0, tspan, Param(sol, 1.0))
sol =solve(prob2, Rodas5(), reltol =1e-8, abstol =1e-8)
Describe the bug 🐞
Wrapping an ODE solution in a struct and passing it to a secondary ODE problem as a parameter causes an
anyeltypedual
error.Expected behavior
It's common in my field to solve an ODE (the background) and then solve another that depends on it (the perturbation). In this case, the RHS of the perturbative ODE depends on the solution to the background ODE. I think this works in 1.9, but errors in 1.10.
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
The text was updated successfully, but these errors were encountered: