@@ -83,40 +83,91 @@ plt = heatmap(xs, tslices, ys', xlabel="x", ylabel="t")
83
83
84
84
## Work-Precision Diagrams
85
85
86
- ### Low Tolerances
86
+ ### High Tolerances
87
87
88
88
#### Implicit-Explicit Methods
89
89
90
- Dense/banded linear solvers.
90
+ ```julia
91
+ abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much
92
+ reltols = 0.1 .^ (1:4)
93
+ multipliers = 0.5 .^ (0:3)
94
+ setups = [
95
+ Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers),
96
+ Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers),
97
+ Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers),
98
+ Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers),
99
+ ]
100
+ labels = hcat(
101
+ "IMEXEuler",
102
+ "CNAB2",
103
+ "CNLF2",
104
+ "SBDF2",
105
+ )
106
+ @time wp = WorkPrecisionSet(prob, abstols, reltols, setups;
107
+ print_names=true, names=labels, numruns=5, error_estimate=:l2,
108
+ save_everystep=false, appxsol=test_sol, maxiters=Int(1e5));
109
+
110
+ plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance")
111
+ ```
112
+
113
+ #### Exponential Integrators
91
114
92
115
```julia
93
- abstols = 0.1 .^ (7:13)
94
- reltols = 0.1 .^ (4:10)
116
+ abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much
117
+ reltols = 0.1 .^ (1:4)
118
+ multipliers = 0.5 .^ (0:3)
95
119
setups = [
96
- # KenCarp methods take forever with adaptive timestepping for some reason
97
- # Dict(:alg => KenCarp3()),
98
- # Dict(:alg => KenCarp4()),
99
- # Dict(:alg => KenCarp5()),
100
- # ARKODE with banded linear solves fail with adaptive timestepping for some reason
101
- # Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)),
102
- # Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)),
103
- # Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1))
120
+ Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers),
121
+ Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), # Maxiters
122
+ Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), # Maxiters
123
+ Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers),
124
+ Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-4 * multipliers),
125
+ Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-4 * multipliers)
104
126
]
105
127
labels = hcat(
106
- # "KenCarp3",
107
- # "KenCarp4 ",
108
- # "KenCarp5 ",
109
- # "ARKODE3",
110
- # "ARKODE4",
111
- # "ARKODE5",
128
+ "NorsettEuler (caching)",
129
+ "NorsettEuler (m=5) ",
130
+ "NorsettEuler (m=20) ",
131
+ "ETDRK2 (caching)",
132
+ "ETDRK2 (m=5)",
133
+ "ETDRK2 (m=20)"
112
134
)
113
135
@time wp = WorkPrecisionSet(prob, abstols, reltols, setups;
114
136
print_names=true, names=labels, numruns=5, error_estimate=:l2,
115
137
save_everystep=false, appxsol=test_sol, maxiters=Int(1e5));
116
138
117
- plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Band Linsolve, Low Tolerances ")
139
+ plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance ")
118
140
```
119
141
142
+
143
+ #### Comparisons Between Families
144
+
145
+ ```julia
146
+ abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much
147
+ reltols = 0.1 .^ (1:4)
148
+ multipliers = 0.5 .^ (0:3)
149
+ setups = [
150
+ Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers),
151
+ Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers),
152
+ Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers),
153
+ ]
154
+ labels = hcat(
155
+ "CNAB2 (dense linsolve)",
156
+ "CNAB2 (Krylov linsolve)",
157
+ "ETDRK2 (caching)",
158
+ )
159
+ @time wp = WorkPrecisionSet(prob, abstols, reltols, setups;
160
+ print_names=true, names=labels, numruns=5, error_estimate=:l2,
161
+ save_everystep=false, appxsol=test_sol, maxiters=Int(1e5));
162
+
163
+ plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances")
164
+ ```
165
+
166
+ ### Low Tolerances
167
+
168
+ #### Implicit-Explicit Methods
169
+
170
+
120
171
Krylov linear solvers.
121
172
```julia
122
173
abstols = 0.1 .^ (7:13)
@@ -188,87 +239,6 @@ plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerance
188
239
```
189
240
190
241
191
- ### High Tolerances
192
-
193
- #### Implicit-Explicit Methods
194
-
195
- ```julia
196
- abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much
197
- reltols = 0.1 .^ (1:4)
198
- multipliers = 0.5 .^ (0:3)
199
- setups = [
200
- Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers),
201
- Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers),
202
- Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers),
203
- Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers),
204
- ]
205
- labels = hcat(
206
- "IMEXEuler",
207
- "CNAB2",
208
- "CNLF2",
209
- "SBDF2",
210
- )
211
- @time wp = WorkPrecisionSet(prob, abstols, reltols, setups;
212
- print_names=true, names=labels, numruns=5, error_estimate=:l2,
213
- save_everystep=false, appxsol=test_sol, maxiters=Int(1e5));
214
-
215
- plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance")
216
- ```
217
-
218
- #### Exponential Integrators
219
-
220
- ```julia
221
- abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much
222
- reltols = 0.1 .^ (1:4)
223
- multipliers = 0.5 .^ (0:3)
224
- setups = [
225
- Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers),
226
- Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), # Maxiters
227
- Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), # Maxiters
228
- Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers),
229
- Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-4 * multipliers),
230
- Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-4 * multipliers)
231
- ]
232
- labels = hcat(
233
- "NorsettEuler (caching)",
234
- "NorsettEuler (m=5)",
235
- "NorsettEuler (m=20)",
236
- "ETDRK2 (caching)",
237
- "ETDRK2 (m=5)",
238
- "ETDRK2 (m=20)"
239
- )
240
- @time wp = WorkPrecisionSet(prob, abstols, reltols, setups;
241
- print_names=true, names=labels, numruns=5, error_estimate=:l2,
242
- save_everystep=false, appxsol=test_sol, maxiters=Int(1e5));
243
-
244
- plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance")
245
- ```
246
-
247
-
248
- #### Comparisons Between Families
249
-
250
- ```julia
251
- abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much
252
- reltols = 0.1 .^ (1:4)
253
- multipliers = 0.5 .^ (0:3)
254
- setups = [
255
- Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers),
256
- Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers),
257
- Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers),
258
- ]
259
- labels = hcat(
260
- "CNAB2 (dense linsolve)",
261
- "CNAB2 (Krylov linsolve)",
262
- "ETDRK2 (caching)",
263
- )
264
- @time wp = WorkPrecisionSet(prob, abstols, reltols, setups;
265
- print_names=true, names=labels, numruns=5, error_estimate=:l2,
266
- save_everystep=false, appxsol=test_sol, maxiters=Int(1e5));
267
-
268
- plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances")
269
- ```
270
-
271
-
272
242
```julia, echo = false
273
243
using SciMLBenchmarks
274
244
SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file])
0 commit comments