@@ -7,7 +7,7 @@ NO_TSPAN_PROBS = Union{AbstractLinearProblem, AbstractNonlinearProblem,
7
7
AbstractIntegralProblem, AbstractSteadyStateProblem,
8
8
AbstractJumpProblem}
9
9
10
- has_kwargs (_prob:: DEProblem ) = has_kwargs (typeof (_prob))
10
+ has_kwargs (_prob:: AbstractDEProblem ) = has_kwargs (typeof (_prob))
11
11
Base. @pure __has_kwargs (:: Type{T} ) where {T} = :kwargs ∈ fieldnames (T)
12
12
has_kwargs (:: Type{T} ) where {T} = __has_kwargs (T)
13
13
196
196
const NON_SOLVER_MESSAGE = """
197
197
The arguments to solve are incorrect.
198
198
The second argument must be a solver choice, `solve(prob,alg)`
199
- where `alg` is a `<: DEAlgorithm `, e.g. `Tsit5()`.
199
+ where `alg` is a `<: AbstractDEAlgorithm `, e.g. `Tsit5()`.
200
200
201
201
Please double check the arguments being sent to the solver.
202
202
@@ -484,7 +484,7 @@ function init_call(_prob, args...; merge_callbacks = true, kwargshandle = nothin
484
484
end
485
485
end
486
486
487
- function init (prob:: Union{DEProblem , NonlinearProblem} , args... ; sensealg = nothing ,
487
+ function init (prob:: Union{AbstractDEProblem , NonlinearProblem} , args... ; sensealg = nothing ,
488
488
u0 = nothing , p = nothing , kwargs... )
489
489
if sensealg === nothing && haskey (prob. kwargs, :sensealg )
490
490
sensealg = prob. kwargs[:sensealg ]
@@ -500,7 +500,7 @@ function init(prob::AbstractJumpProblem, args...; kwargs...)
500
500
init_call (prob, args... ; kwargs... )
501
501
end
502
502
503
- function init_up (prob:: DEProblem , sensealg, u0, p, args... ; kwargs... )
503
+ function init_up (prob:: AbstractDEProblem , sensealg, u0, p, args... ; kwargs... )
504
504
alg = extract_alg (args, kwargs, prob. kwargs)
505
505
if isnothing (alg) # Default algorithm handling
506
506
_prob = get_concrete_problem (prob, ! (typeof (prob) <: DiscreteProblem ); u0 = u0,
@@ -566,7 +566,7 @@ mutable struct NullODEIntegrator{IIP, ProbType, T, SolType, F, P} <:
566
566
f:: F
567
567
p:: P
568
568
end
569
- function build_null_integrator (prob:: DEProblem , args... ;
569
+ function build_null_integrator (prob:: AbstractDEProblem , args... ;
570
570
kwargs... )
571
571
sol = solve (prob, args... ; kwargs... )
572
572
return NullODEIntegrator{isinplace (prob), typeof (prob), eltype (prob. tspan), typeof (sol),
@@ -592,7 +592,7 @@ function step!(integ::NullODEIntegrator, dt = nothing, stop_at_tdt = false)
592
592
return nothing
593
593
end
594
594
595
- function build_null_solution (prob:: DEProblem , args... ;
595
+ function build_null_solution (prob:: AbstractDEProblem , args... ;
596
596
saveat = (),
597
597
save_everystep = true ,
598
598
save_on = true ,
635
635
636
636
"""
637
637
```julia
638
- solve(prob::DEProblem , alg::Union{DEAlgorithm ,Nothing}; kwargs...)
638
+ solve(prob::AbstractDEProblem , alg::Union{AbstractDEAlgorithm ,Nothing}; kwargs...)
639
639
```
640
640
641
641
## Arguments
@@ -914,7 +914,7 @@ the extension to other types is straightforward.
914
914
to save size or because the user does not care about the others. Finally, with
915
915
`progress = true` you are enabling the progress bar.
916
916
"""
917
- function solve (prob:: DEProblem , args... ; sensealg = nothing ,
917
+ function solve (prob:: AbstractDEProblem , args... ; sensealg = nothing ,
918
918
u0 = nothing , p = nothing , wrap = Val (true ), kwargs... )
919
919
if sensealg === nothing && haskey (prob. kwargs, :sensealg )
920
920
sensealg = prob. kwargs[:sensealg ]
@@ -987,8 +987,8 @@ function solve(prob::NonlinearProblem, args...; sensealg = nothing,
987
987
end
988
988
end
989
989
990
- function solve_up (prob:: Union{DEProblem , NonlinearProblem} , sensealg, u0, p, args ... ;
991
- kwargs... )
990
+ function solve_up (prob:: Union{AbstractDEProblem , NonlinearProblem} , sensealg, u0, p,
991
+ args ... ; kwargs... )
992
992
alg = extract_alg (args, kwargs, prob. kwargs)
993
993
if isnothing (alg) # Default algorithm handling
994
994
_prob = get_concrete_problem (prob, ! (typeof (prob) <: DiscreteProblem ); u0 = u0,
@@ -1070,12 +1070,12 @@ function get_concrete_problem(prob::AbstractEnsembleProblem, isadapt; kwargs...)
1070
1070
prob
1071
1071
end
1072
1072
1073
- function solve (prob:: PDEProblem , alg:: DiffEqBase.DEAlgorithm , args... ;
1073
+ function solve (prob:: PDEProblem , alg:: AbstractDEAlgorithm , args... ;
1074
1074
kwargs... )
1075
1075
solve (prob. prob, alg, args... ; kwargs... )
1076
1076
end
1077
1077
1078
- function init (prob:: PDEProblem , alg:: DiffEqBase.DEAlgorithm , args... ;
1078
+ function init (prob:: PDEProblem , alg:: AbstractDEAlgorithm , args... ;
1079
1079
kwargs... )
1080
1080
init (prob. prob, alg, args... ; kwargs... )
1081
1081
end
@@ -1266,27 +1266,27 @@ handle_distribution_u0(_u0) = _u0
1266
1266
eval_u0 (u0:: Function ) = true
1267
1267
eval_u0 (u0) = false
1268
1268
1269
- function __solve (prob:: DEProblem , args... ; default_set = false , second_time = false ,
1269
+ function __solve (prob:: AbstractDEProblem , args... ; default_set = false , second_time = false ,
1270
1270
kwargs... )
1271
1271
if second_time
1272
1272
throw (NoDefaultAlgorithmError ())
1273
- elseif length (args) > 0 && ! (typeof (args[1 ]) <: Union{Nothing, DEAlgorithm } )
1273
+ elseif length (args) > 0 && ! (typeof (args[1 ]) <: Union{Nothing, AbstractDEAlgorithm } )
1274
1274
throw (NonSolverError ())
1275
1275
else
1276
- __solve (prob:: DEProblem , nothing , args... ; default_set = false , second_time = true ,
1277
- kwargs... )
1276
+ __solve (prob:: AbstractDEProblem , nothing , args... ; default_set = false ,
1277
+ second_time = true , kwargs... )
1278
1278
end
1279
1279
end
1280
1280
1281
- function __init (prob:: DEProblem , args... ; default_set = false , second_time = false ,
1281
+ function __init (prob:: AbstractDEProblem , args... ; default_set = false , second_time = false ,
1282
1282
kwargs... )
1283
1283
if second_time
1284
1284
throw (NoDefaultAlgorithmError ())
1285
- elseif length (args) > 0 && ! (typeof (args[1 ]) <: Union{Nothing, DEAlgorithm } )
1285
+ elseif length (args) > 0 && ! (typeof (args[1 ]) <: Union{Nothing, AbstractDEAlgorithm } )
1286
1286
throw (NonSolverError ())
1287
1287
else
1288
- __init (prob:: DEProblem , nothing , args... ; default_set = false , second_time = true ,
1289
- kwargs... )
1288
+ __init (prob:: AbstractDEProblem , nothing , args... ; default_set = false ,
1289
+ second_time = true , kwargs... )
1290
1290
end
1291
1291
end
1292
1292
@@ -1360,7 +1360,7 @@ Ignores all adjoint definitions (i.e. `sensealg`) and proceeds to do standard
1360
1360
AD through the `solve` functions. Generally only used internally for implementing
1361
1361
discrete sensitivity algorithms.
1362
1362
"""
1363
- struct SensitivityADPassThrough <: SciMLBase.DEAlgorithm end
1363
+ struct SensitivityADPassThrough <: AbstractDEAlgorithm end
1364
1364
1365
1365
function ChainRulesCore. frule (:: typeof (solve_up), prob,
1366
1366
sensealg:: Union{Nothing, AbstractSensitivityAlgorithm} ,
@@ -1370,7 +1370,7 @@ function ChainRulesCore.frule(::typeof(solve_up), prob,
1370
1370
kwargs... )
1371
1371
end
1372
1372
1373
- function ChainRulesCore. rrule (:: typeof (solve_up), prob:: SciMLBase.DEProblem ,
1373
+ function ChainRulesCore. rrule (:: typeof (solve_up), prob:: AbstractDEProblem ,
1374
1374
sensealg:: Union{Nothing, AbstractSensitivityAlgorithm} ,
1375
1375
u0, p, args... ;
1376
1376
kwargs... )
@@ -1382,8 +1382,8 @@ end
1382
1382
# ## Legacy Dispatches to be Non-Breaking
1383
1383
# ##
1384
1384
1385
- @deprecate concrete_solve (prob:: SciMLBase.DEProblem ,
1386
- alg:: Union{SciMLBase.DEAlgorithm , Nothing} ,
1385
+ @deprecate concrete_solve (prob:: AbstractDEProblem ,
1386
+ alg:: Union{AbstractDEAlgorithm , Nothing} ,
1387
1387
u0 = prob. u0, p = prob. p, args... ; kwargs... ) solve (prob, alg,
1388
1388
args... ;
1389
1389
u0 = u0,
@@ -1459,7 +1459,7 @@ end
1459
1459
else
1460
1460
nothing
1461
1461
end
1462
- elseif solve_args[1 ] isa DEAlgorithm
1462
+ elseif solve_args[1 ] isa AbstractDEAlgorithm
1463
1463
solve_args[1 ]
1464
1464
else
1465
1465
nothing
0 commit comments