Skip to content

Commit

Permalink
some test
Browse files Browse the repository at this point in the history
  • Loading branch information
SKopecz committed Sep 9, 2024
1 parent 2eea5e2 commit 20c638f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ makedocs(modules = [PositiveIntegrators],
"Heat Equation, Dirichlet BCs" => "heat_equation_dirichlet.md",
],
"Benchmarks" => [
"Experimental order of convergence" => "convergence.md",
"NPZD model" => "npzd_model_benchmark.md",
"Robertson problem" => "robertson_benchmark.md",
#"Experimental order of convergence" => "convergence.md",
#"NPZD model" => "npzd_model_benchmark.md",
#"Robertson problem" => "robertson_benchmark.md",
"Stratospheric reaction problem" => "stratospheric_reaction_benchmark.md",
],
"Troubleshooting, FAQ" => "faq.md",
Expand Down
25 changes: 25 additions & 0 deletions docs/src/stratospheric_reaction_benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,36 @@ We use the stiff stratospheric reacation problem [`prob_pds_stratreac`](@ref) to
```@example stratreac
using OrdinaryDiffEq, PositiveIntegrators
using Plots
include("docs/src/utilities.jl")
# select problem
prob = prob_pds_stratreac
# compute reference solution
tspan = prob.tspan
dt_ref = (last(tspan) - first(tspan)) ./ 1e5
sol_ref = solve(prob, Rodas4P(); dt = dt_ref, adaptive = false, save_everystep = false);
sol_ref = sol_ref.u[end]
dt0 = 48 * 60 #48 minutes
dts = dt0 ./ 2 .^ (0:3)
algs = [MPE()
MPRK22(1.0)]
names = ["MPE"
"MPRK22(1.0)"]
wp = workprecision_fixed(prob, algs, names, sol_ref, dts)
plot(wp, names,
color = permutedims([repeat([1], 2)...]), legend = :top)
```

```@example
ref_sol = solve(prob, Rodas4P(); abstol = 1e-11, reltol = 1e-10);
# compute solutions with low tolerances
Expand Down

0 comments on commit 20c638f

Please sign in to comment.