You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using OrdinaryDiffEq, StochasticDiffEq, BenchmarkTools, SimpleDiffEq, BridgeDiffEq, StaticArrays
u0=1/2f(u,p,t) = u
g(u,p,t) = u
dt =1/2^(4)
tspan = (0.0,1.0)
prob =ODEProblem(f,u0,(0.0,1.0))
@btime sol =solve(prob,BridgeBS3(),dt=dt)
@btime sol =solve(prob,BS3(),dt=dt,adaptive=false,dense=false)
prob =ODEProblem(f,u0,(0.0,100.0))
@btime sol =solve(prob,BridgeBS3(),dt=dt)
@btime sol =solve(prob,BS3(),dt=dt,adaptive=false,dense=false)
prob =SDEProblem(f,g,u0,(0.0,1.0))
@btime sol =solve(prob,EM(),dt=dt)
@btime sol =solve(prob,SimpleEM(),dt=dt)
@btime sol =solve(prob,BridgeEuler(),dt=dt)
prob =SDEProblem(f,g,u0,(0.0,100.0))
@btime sol =solve(prob,EM(),dt=dt)
@btime sol =solve(prob,SimpleEM(),dt=dt)
@btime sol =solve(prob,BridgeEuler(),dt=dt)
u0 =@SVector [2.0,3.0]
prob =ODEProblem(f,u0,(0.0,1.0))
@btime sol =solve(prob,BridgeBS3(),dt=dt)
@btime sol =solve(prob,BS3(),dt=dt,adaptive=false,dense=false)
prob =SDEProblem(f,g,u0,(0.0,1.0))
@btime sol =solve(prob,EM(),dt=dt)
@btime sol =solve(prob,SimpleEM(),dt=dt)
@btime sol =solve(prob,BridgeEuler(),dt=dt)
prob =SDEProblem(f,g,u0,(0.0,100.0))
@btime sol =solve(prob,EM(),dt=dt)
@btime sol =solve(prob,SimpleEM(),dt=dt)
@btime sol =solve(prob,BridgeEuler(),dt=dt)
functionlorenzoop(u,p,t)
SA[10.0(u[2]-u[1]),u[1]*(28.0-u[3]) - u[2],u[1]*u[2] - (8/3)*u[3]]
end
u0 = SA[1.0;0.0;0.0]
tspan = (0.0,100.0)
prob =ODEProblem(lorenzoop,u0,tspan)
@btime sol =solve(prob,BridgeBS3(),dt=dt)
@btime sol =solve(prob,BS3(),dt=dt,adaptive=false,dense=false)
@btime sol =solve(prob,Tsit5(),dt=dt,adaptive=false,dense=false)
@btime sol =solve(prob,SimpleTsit5(),dt=dt)
functionσ_lorenz(u,p,t)
SA[3.0,3.0,3.0]
end
prob =SDEProblem(lorenzoop,σ_lorenz,u0,(0.0,100.0))
dt =1/2^6@btime sol =solve(prob,EM(),dt=dt)
@btime sol =solve(prob,SimpleEM(),dt=dt)
@btime sol =solve(prob,BridgeEuler(),dt=dt)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: