Skip to content

Commit 1c9d66d

Browse files
Merge pull request #1352 from ChrisRackauckas-Claude/add-enrightpryce-benchmarks
Add Enright-Pryce benchmarks to NonStiffODE
2 parents be325c9 + a419e2c commit 1c9d66d

File tree

4 files changed

+1983
-747
lines changed

4 files changed

+1983
-747
lines changed
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
---
2+
title: Enright-Pryce Work-Precision Diagrams
3+
author: Utkarsh, Chris Rackauckas
4+
---
5+
6+
## Enright-Pryce Suite
7+
8+
The purpose of this benchmark is to test explicit Runge-Kutta methods on the Enright-Pryce test suite, a collection of non-stiff ODE problems designed for testing numerical integrators.
9+
10+
```julia
11+
using OrdinaryDiffEq, ParameterizedFunctions, ODEInterface,
12+
ODEInterfaceDiffEq, LSODA, Sundials, DiffEqDevTools,
13+
StaticArrays
14+
using Plots
15+
gr()
16+
17+
# Load the problems from the Enright-Pryce suite
18+
include(joinpath(@__DIR__, "enright_pryce.jl"))
19+
20+
abstols = 1.0 ./ 10.0 .^ (6:13)
21+
reltols = 1.0 ./ 10.0 .^ (3:10)
22+
```
23+
24+
### SIMD Algorithms (Currently Disabled)
25+
26+
Note: The SIMD RK methods will be added once the OrdinaryDiffEqSIMDRK package is publicly available.
27+
28+
```julia
29+
# simdrkalgs = [
30+
# Dict(:alg=>MER5v2()),
31+
# Dict(:alg=>MER6v2()),
32+
# Dict(:alg=>RK6v4())
33+
# ]
34+
simdrkalgs = []
35+
```
36+
37+
### Low Order Setup
38+
39+
```julia
40+
setups = [
41+
Dict(:alg=>Tsit5()),
42+
Dict(:alg=>Vern6()),
43+
Dict(:alg=>Vern7()),
44+
Dict(:alg=>Vern9()),
45+
simdrkalgs...
46+
]
47+
```
48+
49+
## Non-Stiff NA Problems
50+
51+
### NA1
52+
53+
```julia
54+
prob = NA_PROBLEMS[1]
55+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
56+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
57+
plot(wp; title="NA1")
58+
```
59+
60+
### NA2
61+
62+
```julia
63+
prob = NA_PROBLEMS[2]
64+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
65+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
66+
plot(wp; title="NA2")
67+
```
68+
69+
### NA4
70+
71+
```julia
72+
prob = NA_PROBLEMS[4]
73+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
74+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
75+
plot(wp; title="NA4")
76+
```
77+
78+
### NA5
79+
80+
```julia
81+
prob = NA_PROBLEMS[5]
82+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
83+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
84+
plot(wp; title="NA5")
85+
```
86+
87+
## Non-Stiff NB Problems
88+
89+
### NB1
90+
91+
```julia
92+
prob = NB_PROBLEMS[1]
93+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
94+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
95+
plot(wp; title="NB1")
96+
```
97+
98+
### NB2
99+
100+
```julia
101+
prob = NB_PROBLEMS[2]
102+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
103+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
104+
plot(wp; title="NB2")
105+
```
106+
107+
### NB3
108+
109+
```julia
110+
prob = NB_PROBLEMS[3]
111+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
112+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
113+
plot(wp; title="NB3")
114+
```
115+
116+
### NB5
117+
118+
```julia
119+
prob = NB_PROBLEMS[5]
120+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
121+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
122+
plot(wp; title="NB5")
123+
```
124+
125+
## Non-Stiff NC Problems
126+
127+
### NC1
128+
129+
```julia
130+
prob = NC_PROBLEMS[1]
131+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
132+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
133+
plot(wp; title="NC1")
134+
```
135+
136+
### NC2
137+
138+
```julia
139+
prob = NC_PROBLEMS[2]
140+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
141+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
142+
plot(wp; title="NC2")
143+
```
144+
145+
### NC3
146+
147+
```julia
148+
prob = NC_PROBLEMS[3]
149+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
150+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
151+
plot(wp; title="NC3")
152+
```
153+
154+
### NC4
155+
156+
```julia
157+
prob = NC_PROBLEMS[4]
158+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
159+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
160+
plot(wp; title="NC4")
161+
```
162+
163+
### NC5
164+
165+
```julia
166+
prob = NC_PROBLEMS[5]
167+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
168+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
169+
plot(wp; title="NC5")
170+
```
171+
172+
## Non-Stiff ND Problems
173+
174+
### ND1
175+
176+
```julia
177+
prob = ND_PROBLEMS[1]
178+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
179+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
180+
plot(wp; title="ND1")
181+
```
182+
183+
### ND2
184+
185+
```julia
186+
prob = ND_PROBLEMS[2]
187+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
188+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
189+
plot(wp; title="ND2")
190+
```
191+
192+
### ND3
193+
194+
```julia
195+
prob = ND_PROBLEMS[3]
196+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
197+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
198+
plot(wp; title="ND3")
199+
```
200+
201+
### ND4
202+
203+
```julia
204+
prob = ND_PROBLEMS[4]
205+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
206+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
207+
plot(wp; title="ND4")
208+
```
209+
210+
### ND5
211+
212+
```julia
213+
prob = ND_PROBLEMS[5]
214+
test_sol = solve(prob, Vern9(), abstol=1/10^14, reltol=1/10^14)
215+
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, save_everystep=false, numruns=100)
216+
plot(wp; title="ND5")
217+
```
218+
219+
```julia{echo=false}
220+
using SciMLBenchmarks
221+
SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file])
222+
```

0 commit comments

Comments
 (0)