|
502 | 502 |
|
503 | 503 | function init_up(prob::AbstractDEProblem, sensealg, u0, p, args...; kwargs...)
|
504 | 504 | alg = extract_alg(args, kwargs, prob.kwargs)
|
505 |
| - if isnothing(alg) # Default algorithm handling |
| 505 | + if isnothing(alg) || !(alg isa AbstractDEAlgorithm) # Default algorithm handling |
506 | 506 | _prob = get_concrete_problem(prob, !(typeof(prob) <: DiscreteProblem); u0 = u0,
|
507 | 507 | p = p, kwargs...)
|
508 | 508 | init_call(_prob, args...; kwargs...)
|
|
990 | 990 | function solve_up(prob::Union{AbstractDEProblem, NonlinearProblem}, sensealg, u0, p,
|
991 | 991 | args...; kwargs...)
|
992 | 992 | alg = extract_alg(args, kwargs, prob.kwargs)
|
993 |
| - if isnothing(alg) # Default algorithm handling |
| 993 | + if isnothing(alg) || !(alg isa AbstractDEAlgorithm) # Default algorithm handling |
994 | 994 | _prob = get_concrete_problem(prob, !(typeof(prob) <: DiscreteProblem); u0 = u0,
|
995 | 995 | p = p, kwargs...)
|
996 | 996 | solve_call(_prob, args...; kwargs...)
|
@@ -1408,7 +1408,7 @@ end
|
1408 | 1408 | function _solve_adjoint(prob, sensealg, u0, p, originator, args...; merge_callbacks = true,
|
1409 | 1409 | kwargs...)
|
1410 | 1410 | alg = extract_alg(args, kwargs, prob.kwargs)
|
1411 |
| - if isnothing(alg) # Default algorithm handling |
| 1411 | + if isnothing(alg) || !(alg isa AbstractDEAlgorithm) # Default algorithm handling |
1412 | 1412 | _prob = get_concrete_problem(prob, !(typeof(prob) <: DiscreteProblem); u0 = u0,
|
1413 | 1413 | p = p, kwargs...)
|
1414 | 1414 | else
|
@@ -1438,7 +1438,7 @@ end
|
1438 | 1438 | function _solve_forward(prob, sensealg, u0, p, originator, args...; merge_callbacks = true,
|
1439 | 1439 | kwargs...)
|
1440 | 1440 | alg = extract_alg(args, kwargs, prob.kwargs)
|
1441 |
| - if isnothing(alg) # Default algorithm handling |
| 1441 | + if isnothing(alg) || !(alg isa AbstractDEAlgorithm) # Default algorithm handling |
1442 | 1442 | _prob = get_concrete_problem(prob, !(typeof(prob) <: DiscreteProblem); u0 = u0,
|
1443 | 1443 | p = p, kwargs...)
|
1444 | 1444 | else
|
|
0 commit comments