Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ function SciMLBase.__solve(prob::SciMLBase.AbstractSteadyStateProblem, alg::Dyna
haskey(kwargs, :callback) && (callback = CallbackSet(callback, kwargs[:callback]))
haskey(odesolve_kwargs, :callback) &&
(callback = CallbackSet(callback, odesolve_kwargs[:callback]))
kwargs = pairs(merge((; kwargs...), haskey(kwargs, :verbose) ? (verbose=true,) : (;)))
kwargs = pairs(merge((; kwargs...),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge takes the value of the right most named tuple, so if kwargs has an alias_u0 key, it will use ODEAliasSpecifier(; u0=kwargs[:alias_u0]) for alias.

Should we be passing kwargs to solve here anyways? The kwargs that should go in to the ODE solve should be in odesolve_kwargs?

haskey(kwargs, :verbose) ? (verbose=true,) : (;),
haskey(kwargs, :alias) ? (alias=ODEAliasSpecifier(),) : (;),
haskey(kwargs, :alias_u0) ? (alias=ODEAliasSpecifier(; u0=kwargs[:alias_u0]),) : (;)))
# Construct and solve the ODEProblem
odeprob = ODEProblem{isinplace(prob), true}(f, prob.u0, tspan, prob.p)
odesol = solve(odeprob, alg.alg, args...; abstol, reltol, kwargs...,
Expand Down
Loading