Skip to content

Commit f468e79

Browse files
default prob_choice to 1
1 parent 5f931fd commit f468e79

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DiffEqDevTools"
22
uuid = "f3b72e0c-5b89-59e1-b016-84e28bfd966d"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "2.28.0"
4+
version = "2.29.0"
55

66
[deps]
77
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"

src/benchmark.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ function Shootout(prob,setups;appxsol=nothing,names=nothing,error_estimate=:fina
4646

4747
if :prob_choice keys(setups[i])
4848
cur_appxsol = appxsol[setups[i][:prob_choice]]
49+
elseif prob isa AbstractArray
50+
cur_appxsol = appxsol[1]
4951
else
5052
cur_appxsol = appxsol
5153
end
@@ -61,6 +63,8 @@ function Shootout(prob,setups;appxsol=nothing,names=nothing,error_estimate=:fina
6163

6264
if haskey(setups[i], :prob_choice)
6365
_prob = prob[setups[i][:prob_choice]]
66+
elseif prob isa AbstractArray
67+
_prob = prob[1]
6468
else
6569
_prob = prob
6670
end
@@ -171,6 +175,8 @@ function WorkPrecision(prob,alg,abstols,reltols,dts=nothing;
171175

172176
if haskey(kwargs, :prob_choice)
173177
_prob = prob[kwargs[:prob_choice]]
178+
elseif prob isa AbstractArray
179+
_prob = prob[1]
174180
else
175181
_prob = prob
176182
end
@@ -191,6 +197,8 @@ function WorkPrecision(prob,alg,abstols,reltols,dts=nothing;
191197

192198
if haskey(kwargs, :prob_choice)
193199
cur_appxsol = appxsol[kwargs[:prob_choice]]
200+
elseif prob isa AbstractArray
201+
cur_appxsol = appxsol[1]
194202
else
195203
cur_appxsol = appxsol
196204
end

test/benchmark_tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,save_everyste
106106
# Dual Problem
107107

108108
probs = [prob,prob_ode_2Dlinear]
109-
setups = [Dict(:alg=>DP5(),:prob_choice => 1)
109+
setups = [Dict(:alg=>DP5())
110110
Dict(:alg=>Tsit5(), :prob_choice => 2)
111111
Dict(:alg=>Vern6(), :prob_choice => 2)
112112
]

0 commit comments

Comments
 (0)