Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 334cbec

Browse files
update the tests a little bit
1 parent b41cf04 commit 334cbec

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/direct_approxfun.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ using ODE, ODEInterfaceDiffEq
33
using Base.Test
44

55
S=Fourier()
6-
u0=Fun->cos(cos-0.1)),S)
6+
u0=Fun->cos(cos-0.1))-cos(cos(0-0.1)),S)
77
c=Fun(cos,S)
88

99
prob = ODEProblem((t,u)->u''+(c+1)*u',u0,(0.,1.))
10-
@time sol=solve(prob,Euler(),dt=1/10)
10+
@time sol=solve(prob,Euler(),dt=1/1000)
1111

1212
tstops = [0.0,0.00630546,0.0196241,0.0365809,0.0580536,0.0840865,0.1151,0.151529,0.195094,0.24658,0.292971,0.316851,0.338594,0.36075,0.384077,0.408548,0.433682,0.458922,0.483926,0.508619,0.533097,0.557498,0.581922,0.606414,0.630967,0.655551,0.68014,0.704717,0.729278,0.753828,0.778375,0.802923,0.827475,0.85203,0.876586,0.901142,0.925698,0.950253,0.974808,0.999362,1.0]
1313

1414
@time sol=solve(prob,Tsit5(),dt=1/40, adaptive=false, tstops=tstops)
1515

16+
#@time sol=solve(prob,Tsit5())
1617
#@time sol=solve(prob,Rosenbrock23(),dt=1/40, adaptive=false, tstops=tstops)

test/indirect_approxfun.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ c=Fun(cos,S)
99

1010
ode_prob = ODEProblem((t,u)->u''+(c+1)*u',u0,(0.,1.))
1111
prob = ApproxFunProblem(ode_prob)
12+
@time sol=solve(prob,Euler(),dt=1/1000)
1213
@time sol=solve(prob,Tsit5())
1314
sol(0.5)
1415
sol(0.5,0.2)

0 commit comments

Comments
 (0)