-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make non-lazy the default? #310
Comments
58 tasks
using DifferentialEquations, DiffEqDevTools, Plots, ODEInterfaceDiffEq, ODE
# 2D Linear ODE
f = (du,u,p,t) -> begin
for i in 1:length(u)
du[i] = 1.01*u[i]
end
end
function (::typeof(f))(::Type{Val{:analytic}},u₀,p,t)
@. u₀*exp(1.01*t)
end
tspan = (0.0,10.0)
prob = ODEProblem(f,rand(100,100),tspan)
abstols = (1/10) .^ (3:13)
reltols = (1/10) .^ (0:10);
setups = [Dict(:alg=>Vern7())
Dict(:alg=>Vern7(lazy=false))
Dict(:alg=>Vern9())
Dict(:alg=>Vern9(lazy=false))]
wp = WorkPrecisionSet(prob,abstols,reltols,setups;save_everystep=false)
for i in 1:length(wp)
println(wp[i])
end Name: Vern7
Times: [0.00196151, 0.00233463, 0.00251639, 0.00320673, 0.00383201, 0.00486687, 0.0060342, 0.0077189,
0.0102769, 0.0138131, 0.0188274]
Errors: [3.90079, 0.714491, 0.0176868, 0.0123713, 0.00384236, 0.000784381, 0.00011652, 1.46882e-5, 1.
73589e-6, 1.90531e-7, 2.04493e-8]
Name: Vern7
Times: [0.00452478, 0.005845, 0.00645485, 0.00829678, 0.0101863, 0.0135109, 0.0173762, 0.0224715, 0.0
303368, 0.040751, 0.0561816]
Errors: [3.90079, 0.714491, 0.0176868, 0.0123713, 0.00384236, 0.000784381, 0.00011652, 1.46882e-5, 1.
73589e-6, 1.90531e-7, 2.04493e-8]
Name: Vern9
Times: [0.00274411, 0.00393324, 0.00417484, 0.00453326, 0.00516893, 0.00641746, 0.00781036, 0.0087458
2, 0.0107107, 0.0132366, 0.0166486]
Errors: [2.03359, 0.188555, 0.00505698, 0.00214654, 0.000678968, 0.000173599, 3.04662e-5, 4.21087e-6,
5.91104e-7, 7.35837e-8, 8.75057e-9]
Name: Vern9
Times: [0.00902597, 0.0119615, 0.0136698, 0.0148335, 0.0178316, 0.0225473, 0.027008, 0.0313818, 0.039
4139, 0.0491864, 0.060887]
Errors: [2.03359, 0.188555, 0.00505698, 0.00214654, 0.000678968, 0.000173599, 3.04662e-5, 4.21087e-6,
5.91104e-7, 7.35837e-8, 8.75057e-9] That's a pretty big hit, so it should only be done when callbacks are used. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SciML/OrdinaryDiffEq.jl#418
The text was updated successfully, but these errors were encountered: