Deepesh Thakur / Aug 26 2019
Linear 100x100 Work-Precision Diagrams (including ESERK4)
For these tests we will solve an 100x100 system of linear differential equations. This will demonstrate the efficiency of the methods for handling large systems.
Problem
using Pkg Pkg.update() using OrdinaryDiffEq, DiffEqDevTools, Plots, Random Random.seed!(123) gr() # 2D Linear ODE function f(du,u,p,t) for i in eachindex(u) du[i] = 1.01*u[i] end end function f_analytic(u₀,p,t) u₀*exp(1.01*t) end tspan = (0.0,10.0) prob = ODEProblem(ODEFunction(f,analytic=f_analytic),rand(100,100),tspan) abstols = 1.0 ./ 10.0 .^ (6:13) reltols = 1.0 ./ 10.0 .^ (3:10);
Setup
setups = [ Dict(:alg=>DP5()), Dict(:alg=>BS5()), Dict(:alg=>Tsit5()), Dict(:alg=>Vern6()), #Dict(:alg=>RKC()), Dict(:alg=>ROCK2()), Dict(:alg=>ROCK4()), Dict(:alg=>SERK2(controller=:PI)), Dict(:alg=>SERK2(controller=:Predictive)), Dict(:alg=>ESERK4()), Dict(:alg=>ESERK5()) ] #Names = ["DP5" "BS5" "Tsit5" "Vern6" "RKC" "ROCK2" "ROCK4" "SERK2 PI" "SERK2 Predictive" "ESERK5"] Names = ["DP5" "BS5" "Tsit5" "Vern6" "ROCK2" "ROCK4" "SERK2 PI" "SERK2 Predictive" "ESERK4" "ESERK5"]
1×10 Array{String,2}:
"DP5" "BS5" "Tsit5" "Vern6" "ROCK2" "ROCK4" … "ESERK4" "ESERK5"
Speed Only Tests
wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=Names,save_everystep=false,numruns=5,maxiters=Int(1e8)) plot(wp,dpi=200,linewidth=1,legend=:topright,legendfontsize=6)
We are getting reasonable performance. RKC could not solve with the given iterations.