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
When a SteadyStateProblem or a NonlinearProblem is created from an ODEProblem, the ODEProblem's keyword arguments don't get passed. For example, callbacks don't get passed:
using NonlinearSolve, SteadyStateDiffEq, OrdinaryDiffEq
f = (u, p, t) -> u - u^2
cond = (u, t, integrator) ->true
aff = integrator ->@show integrator.t
cb =DiscreteCallback(cond, aff)
prob =ODEProblem(f, 1/2, (0.0, 1.0), callback=cb)
sprob =SteadyStateProblem(prob)
sol =solve(sprob, DynamicSS(Tsit5()))
nothing gets @shown since sprob's underlying ODEProblem didn't get any kwargs. The constructor
functionSteadyStateProblem(prob::AbstractODEProblem)
SteadyStateProblem{isinplace(prob)}(prob.f, prob.u0, prob.p)
end
needs to be (I think)
functionSteadyStateProblem(prob::AbstractODEProblem)
SteadyStateProblem{isinplace(prob)}(prob.f, prob.u0, prob.p; prob.kwargs...)
end
and similarly for NonlinearProblem.
The text was updated successfully, but these errors were encountered:
When a
SteadyStateProblem
or aNonlinearProblem
is created from anODEProblem
, theODEProblem
's keyword arguments don't get passed. For example, callbacks don't get passed:nothing gets
@show
n sincesprob
's underlyingODEProblem
didn't get any kwargs. The constructorneeds to be (I think)
and similarly for
NonlinearProblem
.The text was updated successfully, but these errors were encountered: