Skip to content

Commit

Permalink
Add a better footer and update benchmarks/runall.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanaelbosch committed Oct 12, 2023
1 parent f872e5d commit 7128e74
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 14 deletions.
17 changes: 14 additions & 3 deletions benchmarks/lotkavolterra.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Adapted from
[SciMLBenchmarks.jl](https://docs.sciml.ai/SciMLBenchmarksOutput/stable/NonStiffODE/LotkaVolterra_wpd/).

```julia
using LinearAlgebra, Statistics, InteractiveUtils
using LinearAlgebra, Statistics
using DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Plots
using ProbNumDiffEq

Expand Down Expand Up @@ -215,6 +215,7 @@ wp = WorkPrecisionSet(
plot(wp, color=[2 2 2 4 4 4 5 5 5], xticks = 10.0 .^ (-16:1:5))
```


## Conclusion

- **Use the EK1!** It seems to be strictly better than the EK0 here.
Expand All @@ -224,11 +225,21 @@ plot(wp, color=[2 2 2 4 4 4 5 5 5], xticks = 10.0 .^ (-16:1:5))
- Most likely, the default choice of `diffusionmodel=DynamicDiffusion` and `initialization=TaylorModeInit` are fine.



## Appendix

Computer information:

```julia
using InteractiveUtils
InteractiveUtils.versioninfo()
```

Package Information:
```julia
using Pkg
Pkg.status()
```

And the full manifest:
```julia
Pkg.status(mode=Pkg.PKGMODE_MANIFEST)
```
15 changes: 13 additions & 2 deletions benchmarks/multi-language-wrappers.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Adapted from

```julia
# Imports
using LinearAlgebra, Statistics, InteractiveUtils
using LinearAlgebra, Statistics
using StaticArrays, DiffEqDevTools, ParameterizedFunctions, Plots, SciMLBase, OrdinaryDiffEq
using ODEInterface, ODEInterfaceDiffEq, Sundials, SciPyDiffEq, deSolveDiffEq, MATLABDiffEq, LSODA
using LoggingExtras
Expand Down Expand Up @@ -330,7 +330,18 @@ plot(
## Appendix

Computer information:

```julia
using InteractiveUtils
InteractiveUtils.versioninfo()
```

Package Information:
```julia
using Pkg
Pkg.status()
```

And the full manifest:
```julia
Pkg.status(mode=Pkg.PKGMODE_MANIFEST)
```
16 changes: 13 additions & 3 deletions benchmarks/pleiades.jmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pleiades benchmark

```julia
using LinearAlgebra, Statistics, InteractiveUtils
using LinearAlgebra, Statistics
using DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Sundials, Plots
using ModelingToolkit
using ProbNumDiffEq
Expand Down Expand Up @@ -119,13 +119,23 @@ plot(wp, color=[1 1 2 2 3 3 4 4],
## Conclusion

- If the problem is a second-order ODE, _implement it as a second-order ODE_!
Just use `SecondOrderODEProblem`.


## Appendix

Computer information:

```julia
using InteractiveUtils
InteractiveUtils.versioninfo()
```

Package Information:
```julia
using Pkg
Pkg.status()
```

And the full manifest:
```julia
Pkg.status(mode=Pkg.PKGMODE_MANIFEST)
```
18 changes: 15 additions & 3 deletions benchmarks/rober.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Adapted from
[SciMLBenchmarks.jl](https://docs.sciml.ai/SciMLBenchmarksOutput/stable/DAE/ROBERDAE/).

```julia
using LinearAlgebra, Statistics, InteractiveUtils
using LinearAlgebra, Statistics
using DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Sundials, Plots
using ModelingToolkit
using ProbNumDiffEq
Expand Down Expand Up @@ -35,7 +35,7 @@ daeprob = DAEProblem(sys,[D(y₁)=>-0.04, D(y₂)=>0.04, D(y₃)=>0.0],[],(0.0,1
odaeprob = ODAEProblem(structural_simplify(sys),[],(0.0,1e5)) # can't handle this yet

ref_sol = solve(daeprob,IDA(),abstol=1/10^14,reltol=1/10^14,dense=false)
plot(ref_sol, vars=[y₁,y₂,y₃], title="ROBER Solution", legend=false, ylims=(0, 1))
plot(ref_sol, idxs=[y₁,y₂,y₃], title="ROBER Solution", legend=false, ylims=(0, 1))
```

## EK1 accross orders
Expand Down Expand Up @@ -82,10 +82,22 @@ plot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^
- The `EK1` can solve mass-matrix DAEs! But it only really works well for low errors.
- Order 3 seems to work well here. But the order-to-error-tolerance heuristic should in principle still hold: lower tolerance level ``\rightarrow`` higher order.


## Appendix

Computer information:

```julia
using InteractiveUtils
InteractiveUtils.versioninfo()
```

Package Information:
```julia
using Pkg
Pkg.status()
```

And the full manifest:
```julia
Pkg.status(mode=Pkg.PKGMODE_MANIFEST)
```
3 changes: 2 additions & 1 deletion benchmarks/runall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ FILES = [
"multi-language-wrappers.jmd",
]

filedir = @__DIR__
for file in FILES
@info "Weave file" file
weave(
file;
doctype="github",
out_path="../docs/src/benchmarks/",
out_path=joinpath(filedir, "../docs/src/benchmarks/"),
fig_ext=".svg",
)
end
17 changes: 15 additions & 2 deletions benchmarks/vanderpol.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


```julia
using LinearAlgebra, Statistics, InteractiveUtils
using LinearAlgebra, Statistics
using DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Plots
using ProbNumDiffEq

Expand Down Expand Up @@ -117,15 +117,28 @@ wp = WorkPrecisionSet(
plot(wp, color=[1 1 1 1 2 2 2 2], xticks = 10.0 .^ (-16:1:5))
```


## Conclusion

- Use the `EK1` to solve stiff problems, with orders $\leq 6$ depending on the error tolerance.
- When the problem is actually a second-order ODE, as is the case for the Van der Pol system here, _solve it as a second-order ODE_.


## Appendix

Computer information:

```julia
using InteractiveUtils
InteractiveUtils.versioninfo()
```

Package Information:
```julia
using Pkg
Pkg.status()
```

And the full manifest:
```julia
Pkg.status(mode=Pkg.PKGMODE_MANIFEST)
```

0 comments on commit 7128e74

Please sign in to comment.