-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwps.jl
More file actions
31 lines (25 loc) · 936 Bytes
/
wps.jl
File metadata and controls
31 lines (25 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using TAMode
using Plots
using OrdinaryDiffEq
using DiffEqDevTools
using IterativeSolvers
params = TAMode.param(ones(15) * 0.5)
solInit = TAMode.getAutocrine(params)
params.gasCur = 100.0
prob = ODEProblem(TAMode.TAMreact, solInit, (0.0, 1000.0), params)
setups = [
Dict(:alg => Rodas4()),
Dict(:alg => Rodas42()),
Dict(:alg => Rodas4P()),
Dict(:alg => Ros4LStab()),
Dict(:alg => Rodas5()),
Dict(:alg => Rosenbrock23()), # slow
Dict(:alg => TRBDF2(autodiff = false, linsolve = LinSolveGMRES())), # slow
Dict(:alg => ABDF2(autodiff = false, linsolve = LinSolveGMRES())), # slow
# Dict(:alg => Exprb43()), # slow
# Dict(:alg => Exprb32()), # slow
]
test_sol = solve(prob, AutoTsit5(Rodas5()), reltol = 1.0e-16, abstol = 1.0e-16)
tols = 1.0 ./ 10.0 .^ LinRange(9, 12, 4)
wp = WorkPrecisionSet(prob, tols, tols, setups; save_everystep = false, appxsol = test_sol, maxiters = Int(1e6))
plot(wp)