Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 62 additions & 30 deletions benchmarks/NonStiffBVP/nonlinear_wpi.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ abstols = 1.0 ./ 10.0 .^ (1:4)
reltols = 1.0 ./ 10.0 .^ (1:4);
```

Function that checks retcode.

```julia
function retcode_check(setups, labels)
success_setups = []
success_labels = []
for (setup, label) in zip(setups, labels)
temp_sol = solve(prob, setup[:alg], abstol=1/10^8,reltol=1/10^8, dt=0.1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI failed because prob here in this function is not defined

test = TestSolution(temp_sol.t, temp_sol.u)
if SciMLBase.successful_retcode(test.retcode)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this checking? It should be checking the recode fo the solution returned by solve

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now

push!(success_setups, setup)
push!(success_labels, label)
end
end
return success_setups, success_labels
end
```

# Benchmarks

We here run the BVP benchmarks for all the MIRK methods.
Expand All @@ -51,8 +69,9 @@ We here run the BVP benchmarks for all the MIRK methods.
prob_1 = BVProblemLibrary.prob_bvp_nonlinear_1
sol_1 = solve(prob_1, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_1 = TestSolution(sol_1.t, sol_1.u)
wp_1 = WorkPrecisionSet(prob_1, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_1,
dense=false, save_everystep=false,numruns=100,maxiters=10000000, timeseries_errors=false,verbose=false)
setups_1, labels_1 = retcode_check(setups, labels)
wp_1 = WorkPrecisionSet(prob_1, abstols, reltols, setups_1; names = labels_1, print_names = true, appxsol = testsol_1,
dense=false, save_everystep=false,numruns=10,maxiters=1000, timeseries_errors=false,verbose=false)
plot(wp_1)
```

Expand All @@ -62,8 +81,9 @@ plot(wp_1)
prob_2 = BVProblemLibrary.prob_bvp_nonlinear_2
sol_2 = solve(prob_2, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_2 = TestSolution(sol_2.t, sol_2.u)
wp_2 = WorkPrecisionSet(prob_2, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_2,
dense=false, save_everystep=false,numruns=100,maxiters=10000000, timeseries_errors=false,verbose=false)
setups_2, labels_2 = retcode_check(setups, labels)
wp_2 = WorkPrecisionSet(prob_2, abstols, reltols, setups_2; names = labels_2, print_names = true, appxsol = testsol_2,
dense=false, save_everystep=false,numruns=10,maxiters=1000, timeseries_errors=false,verbose=false)
plot(wp_2)
```

Expand All @@ -73,8 +93,9 @@ plot(wp_2)
prob_3 = BVProblemLibrary.prob_bvp_nonlinear_3
sol_3 = solve(prob_3, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_3 = TestSolution(sol_3.t, sol_3.u)
wp_3 = WorkPrecisionSet(prob_3, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_3,
dense=false, save_everystep=false,numruns=100,maxiters=10000000, timeseries_errors=false,verbose=false)
setups_3, labels_3 = retcode_check(setups, labels)
wp_3 = WorkPrecisionSet(prob_3, abstols, reltols, setups_3; names = labels_3, print_names = true, appxsol = testsol_3,
dense=false, save_everystep=false,numruns=10,maxiters=1000, timeseries_errors=false,verbose=false)
plot(wp_3)
```

Expand All @@ -84,8 +105,9 @@ plot(wp_3)
prob_4 = BVProblemLibrary.prob_bvp_nonlinear_4
sol_4 = solve(prob_4, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_4 = TestSolution(sol_4.t, sol_4.u)
wp_4 = WorkPrecisionSet(prob_4, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_4,
dense=false, save_everystep=false,numruns=100,maxiters=10000000, timeseries_errors=false,verbose=false)
setups_4, labels_4 = retcode_check(setups, labels)
wp_4 = WorkPrecisionSet(prob_4, abstols, reltols, setups_4; names = labels_4, print_names = true, appxsol = testsol_4,
dense=false, save_everystep=false,numruns=10,maxiters=1000, timeseries_errors=false,verbose=false)
plot(wp_4)
```

Expand All @@ -95,8 +117,9 @@ plot(wp_4)
prob_5 = BVProblemLibrary.prob_bvp_nonlinear_5
sol_5 = solve(prob_5, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_5 = TestSolution(sol_5.t, sol_5.u)
wp_5 = WorkPrecisionSet(prob_5, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_5,
dense=false, save_everystep=false,numruns=100,maxiters=10000000, timeseries_errors=false,verbose=false)
setups_5, labels_5 = retcode_check(setups, labels)
wp_5 = WorkPrecisionSet(prob_5, abstols, reltols, setups_5; names = labels_5, print_names = true, appxsol = testsol_5,
dense=false, save_everystep=false,numruns=10,maxiters=1000, timeseries_errors=false,verbose=false)
plot(wp_5)
```

Expand All @@ -106,8 +129,8 @@ plot(wp_5)
### prob_6 = BVProblemLibrary.prob_bvp_nonlinear_6
### sol_6 = solve(prob_6, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
### testsol_6 = TestSolution(sol_6.t, sol_6.u)
### wp_6 = WorkPrecisionSet(prob_6, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_6,
### dense=false, save_everystep=false,numruns=100,maxiters=10000000, timeseries_errors=false,verbose=false)
### wp_6 = WorkPrecisionSet(prob_6, abstols, reltols, setups_6; names = labels_6, print_names = true, appxsol = testsol_6,
### dense=false, save_everystep=false,numruns=10,maxiters=1000, timeseries_errors=false,verbose=false)
### plot(wp_6)
### ```

Expand All @@ -117,8 +140,9 @@ plot(wp_5)
prob_7 = BVProblemLibrary.prob_bvp_nonlinear_7
sol_7 = solve(prob_7, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_7 = TestSolution(sol_7.t, sol_7.u)
wp_7 = WorkPrecisionSet(prob_7, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_7,
dense=false, save_everystep=false,numruns=100,maxiters=10000000,timeseries_errors=false,verbose=false)
setups_7, labels_7 = retcode_check(setups, labels)
wp_7 = WorkPrecisionSet(prob_7, abstols, reltols, setups_7; names = labels_7, print_names = true, appxsol = testsol_7,
dense=false, save_everystep=false,numruns=10,maxiters=1000,timeseries_errors=false,verbose=false)
plot(wp_7)
```

Expand All @@ -128,8 +152,9 @@ plot(wp_7)
prob_8 = BVProblemLibrary.prob_bvp_nonlinear_8
sol_8 = solve(prob_8, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_8 = TestSolution(sol_8.t, sol_8.u)
wp_8 = WorkPrecisionSet(prob_8, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_8,
dense=false, save_everystep=false,numruns=100,maxiters=10000000,timeseries_errors=false,verbose=false)
setups_8, labels_8 = retcode_check(setups, labels)
wp_8 = WorkPrecisionSet(prob_8, abstols, reltols, setups_8; names = labels_8, print_names = true, appxsol = testsol_8,
dense=false, save_everystep=false,numruns=10,maxiters=1000,timeseries_errors=false,verbose=false)
plot(wp_8)
```

Expand All @@ -139,8 +164,9 @@ plot(wp_8)
prob_9 = BVProblemLibrary.prob_bvp_nonlinear_9
sol_9 = solve(prob_9, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_9 = TestSolution(sol_9.t, sol_9.u)
wp_9 = WorkPrecisionSet(prob_9, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_9,
dense=false, save_everystep=false,numruns=100,maxiters=10000000,timeseries_errors=false,verbose=false)
setups_9, labels_9 = retcode_check(setups, labels)
wp_9 = WorkPrecisionSet(prob_9, abstols, reltols, setups_9; names = labels_9, print_names = true, appxsol = testsol_9,
dense=false, save_everystep=false,numruns=10,maxiters=1000,timeseries_errors=false,verbose=false)
plot(wp_9)
```

Expand All @@ -150,8 +176,9 @@ plot(wp_9)
prob_10 = BVProblemLibrary.prob_bvp_nonlinear_10
sol_10 = solve(prob_10, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_10 = TestSolution(sol_10.t, sol_10.u)
wp_10 = WorkPrecisionSet(prob_10, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_10,
dense=false, save_everystep=false,numruns=100,maxiters=10000000,timeseries_errors=false,verbose=false)
setups_10, labels_10 = retcode_check(setups, labels)
wp_10 = WorkPrecisionSet(prob_10, abstols, reltols, setups_10; names = labels_10, print_names = true, appxsol = testsol_10,
dense=false, save_everystep=false,numruns=10,maxiters=1000,timeseries_errors=false,verbose=false)
plot(wp_10)
```

Expand All @@ -161,8 +188,9 @@ plot(wp_10)
prob_11 = BVProblemLibrary.prob_bvp_nonlinear_11
sol_11 = solve(prob_11, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_11 = TestSolution(sol_11.t, sol_11.u)
wp_11 = WorkPrecisionSet(prob_11, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_11,
dense=false, save_everystep=false,numruns=100,maxiters=10000000,timeseries_errors=false,verbose=false)
setups_11, labels_11 = retcode_check(setups, labels)
wp_11 = WorkPrecisionSet(prob_11, abstols, reltols, setups_11; names = labels_11, print_names = true, appxsol = testsol_11,
dense=false, save_everystep=false,numruns=10,maxiters=1000,timeseries_errors=false,verbose=false)
plot(wp_11)
```

Expand All @@ -172,8 +200,9 @@ plot(wp_11)
prob_12 = BVProblemLibrary.prob_bvp_nonlinear_12
sol_12 = solve(prob_12, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_12 = TestSolution(sol_12.t, sol_12.u)
wp_12 = WorkPrecisionSet(prob_12, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_12,
dense=false, save_everystep=false,numruns=100,maxiters=10000000, timeseries_errors=false,verbose=false)
setups_2, labels_12 = retcode_check(setups, labels)
wp_12 = WorkPrecisionSet(prob_12, abstols, reltols, setups_12; names = labels_12, print_names = true, appxsol = testsol_12,
dense=false, save_everystep=false,numruns=10,maxiters=1000, timeseries_errors=false,verbose=false)
plot(wp_12)
```

Expand All @@ -183,8 +212,9 @@ plot(wp_12)
prob_13 = BVProblemLibrary.prob_bvp_nonlinear_13
sol_13 = solve(prob_13, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_13 = TestSolution(sol_13.t, sol_13.u)
wp_13 = WorkPrecisionSet(prob_13, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_13,
dense=false, save_everystep=false,numruns=100,maxiters=10000000,timeseries_errors=false,verbose=false)
setups_13, labels_13 = retcode_check(setups, labels)
wp_13 = WorkPrecisionSet(prob_13, abstols, reltols, setups_13; names = labels_13, print_names = true, appxsol = testsol_13,
dense=false, save_everystep=false,numruns=10,maxiters=1000,timeseries_errors=false,verbose=false)
plot(wp_13)
```

Expand All @@ -194,8 +224,9 @@ plot(wp_13)
prob_14 = BVProblemLibrary.prob_bvp_nonlinear_14
sol_14 = solve(prob_14, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_14 = TestSolution(sol_14.t, sol_14.u)
wp_14 = WorkPrecisionSet(prob_14, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_14,
dense=false, save_everystep=false,numruns=100,maxiters=10000000, timeseries_errors=false,verbose=false)
setups_14, labels_14 = retcode_check(setups, labels)
wp_14 = WorkPrecisionSet(prob_14, abstols, reltols, setups_14; names = labels_14, print_names = true, appxsol = testsol_14,
dense=false, save_everystep=false,numruns=10,maxiters=1000, timeseries_errors=false,verbose=false)
plot(wp_14)
```

Expand All @@ -205,8 +236,9 @@ plot(wp_14)
prob_15 = BVProblemLibrary.prob_bvp_nonlinear_15
sol_15 = solve(prob_15, MIRK3(), abstol=1e-8, reltol=1e-8, dt = 0.1)
testsol_15 = TestSolution(sol_15.t, sol_15.u)
wp_15 = WorkPrecisionSet(prob_15, abstols, reltols, setups; names = labels, print_names = true, appxsol = testsol_15,
dense=false, save_everystep=false,numruns=100,maxiters=10000000,timeseries_errors=false,verbose=false)
setups_15, labels_15 = retcode_check(setups, labels)
wp_15 = WorkPrecisionSet(prob_15, abstols, reltols, setups_15; names = labels_15, print_names = true, appxsol = testsol_15,
dense=false, save_everystep=false,numruns=10,maxiters=1000,timeseries_errors=false,verbose=false)
plot(wp_15)
```

Expand Down