Skip to content

Commit d452726

Browse files
prbzrgChrisRackauckas
authored andcommitted
use correct alg
1 parent b6195fd commit d452726

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/solve.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ function Base.showerror(io::IO, e::NaNTspanError)
190190
println(io, TruncatedStacktraces.VERBOSE_MSG)
191191
end
192192

193-
194193
const NON_SOLVER_MESSAGE = """
195194
The arguments to solve are incorrect.
196195
The second argument must be a solver choice, `solve(prob,alg)`
@@ -454,9 +453,9 @@ end
454453

455454
function init_call(_prob, args...; merge_callbacks = true, kwargshandle = nothing,
456455
kwargs...)
457-
458456
kwargshandle = kwargshandle === nothing ? KeywordArgError : kwargshandle
459-
kwargshandle = has_kwargs(_prob) && haskey(_prob.kwargs, :kwargshandle) ? _prob.kwargs[:kwargshandle] : kwargshandle
457+
kwargshandle = has_kwargs(_prob) && haskey(_prob.kwargs, :kwargshandle) ?
458+
_prob.kwargs[:kwargshandle] : kwargshandle
460459

461460
if has_kwargs(_prob)
462461
if merge_callbacks && haskey(_prob.kwargs, :callback) && haskey(kwargs, :callback)
@@ -534,9 +533,9 @@ end
534533

535534
function solve_call(_prob, args...; merge_callbacks = true, kwargshandle = nothing,
536535
kwargs...)
537-
538536
kwargshandle = kwargshandle === nothing ? KeywordArgError : kwargshandle
539-
kwargshandle = has_kwargs(_prob) && haskey(_prob.kwargs, :kwargshandle) ? _prob.kwargs[:kwargshandle] : kwargshandle
537+
kwargshandle = has_kwargs(_prob) && haskey(_prob.kwargs, :kwargshandle) ?
538+
_prob.kwargs[:kwargshandle] : kwargshandle
540539

541540
if has_kwargs(_prob)
542541
if merge_callbacks && haskey(_prob.kwargs, :callback) && haskey(kwargs, :callback)
@@ -1452,9 +1451,9 @@ function _solve_adjoint(prob, sensealg, u0, p, originator, args...; merge_callba
14521451
end
14531452

14541453
if isempty(args)
1455-
_concrete_solve_adjoint(_prob, nothing, sensealg, u0, p, originator; kwargs...)
1454+
_concrete_solve_adjoint(_prob, alg, sensealg, u0, p, originator; kwargs...)
14561455
else
1457-
_concrete_solve_adjoint(_prob, args[1], sensealg, u0, p, originator,
1456+
_concrete_solve_adjoint(_prob, alg, sensealg, u0, p, originator,
14581457
Base.tail(args)...; kwargs...)
14591458
end
14601459
end

0 commit comments

Comments
 (0)