@@ -8,19 +8,19 @@ prob = RODEProblem(f,u0,tspan)
88sol = solve (prob,RandomEM (),dt= 1 / 100 , save_noise= true )
99prob = RODEProblem (f,u0,tspan, noise= NoiseWrapper (sol. W))
1010sol2 = solve (prob,RandomHeun (),dt= 1 / 100 )
11- @test abs (sol[end ] - sol2[end ]) < 0.1 * abs (sol[end ])
11+ @test abs (sol. u [end ] - sol2[end ]) < 0.1 * abs (sol. u [end ])
1212sol3 = solve (prob,RandomTamedEM (),dt= 1 / 100 )
13- @test abs (sol[end ] - sol3[end ]) < 0.1 * abs (sol[end ])
13+ @test abs (sol. u [end ] - sol3[end ]) < 0.1 * abs (sol. u [end ])
1414
1515f (du,u,p,t,W) = (du.= 1.01 u.+ 0.87 u.* W)
1616u0 = ones (4 )
1717prob = RODEProblem (f,u0,tspan)
1818sol = solve (prob,RandomEM (),dt= 1 / 100 , save_noise= true )
1919prob = RODEProblem (f,u0,tspan, noise= NoiseWrapper (sol. W))
2020sol2 = solve (prob,RandomHeun (),dt= 1 / 100 )
21- @test sum (abs,sol[end ]- sol2[end ]) < 0.1 * sum (abs, sol[end ])
21+ @test sum (abs,sol. u [end ]- sol2[end ]) < 0.1 * sum (abs, sol. u [end ])
2222sol3 = solve (prob,RandomEM (),dt= 1 / 100 )
23- @test sum (abs,sol[end ]- sol3[end ]) < 0.1 * sum (abs, sol[end ])
23+ @test sum (abs,sol. u [end ]- sol3[end ]) < 0.1 * sum (abs, sol. u [end ])
2424
2525f (u,p,t,W) = 2 u* sin (W)
2626u0 = 1.00
@@ -29,9 +29,9 @@ prob = RODEProblem{false}(f,u0,tspan)
2929sol = solve (prob,RandomEM (),dt= 1 / 100 , save_noise= true )
3030prob = RODEProblem {false} (f,u0,tspan, noise= NoiseWrapper (sol. W))
3131sol2 = solve (prob,RandomHeun (),dt= 1 / 100 )
32- @test abs (sol[end ]- sol2[end ]) < 0.1 * abs (sol[end ])
32+ @test abs (sol. u [end ]- sol2[end ]) < 0.1 * abs (sol. u [end ])
3333sol3 = solve (prob,RandomTamedEM (),dt= 1 / 100 )
34- @test abs (sol[end ]- sol3[end ]) < 0.1 * abs (sol[end ])
34+ @test abs (sol. u [end ]- sol3[end ]) < 0.1 * abs (sol. u [end ])
3535
3636function f (du,u,p,t,W)
3737 du[1 ] = 0.2 u[1 ]* sin (W[1 ] - W[2 ])
@@ -43,9 +43,9 @@ prob = RODEProblem(f,u0,tspan)
4343sol = solve (prob,RandomEM (),dt= 1 / 100 , save_noise= true )
4444prob = RODEProblem (f,u0,tspan, noise= NoiseWrapper (sol. W))
4545sol2 = solve (prob,RandomHeun (),dt= 1 / 100 )
46- @test sum (abs,sol[end ]- sol2[end ]) < 0.1 * sum (abs, sol[end ])
46+ @test sum (abs,sol. u [end ]- sol2[end ]) < 0.1 * sum (abs, sol. u [end ])
4747sol3 = solve (prob,RandomTamedEM (),dt= 1 / 100 )
48- @test sum (abs,sol[end ]- sol3[end ]) < 0.1 * sum (abs, sol[end ])
48+ @test sum (abs,sol. u [end ]- sol3[end ]) < 0.1 * sum (abs, sol. u [end ])
4949
5050function f (du,u,p,t,W)
5151 du[1 ] = - 0.2 W[3 ]* u[1 ]* sin (W[1 ] - W[2 ])
@@ -57,6 +57,6 @@ prob = RODEProblem(f,u0,tspan,rand_prototype=zeros(3))
5757sol = solve (prob,RandomEM (),dt= 1 / 100 , save_noise= true )
5858prob = RODEProblem (f,u0,tspan, noise= NoiseWrapper (sol. W))
5959sol2 = solve (prob,RandomHeun (),dt= 1 / 100 )
60- @test sum (abs,sol[end ]- sol2[end ]) < 0.1 * sum (abs, sol[end ])
60+ @test sum (abs,sol. u [end ]- sol2[end ]) < 0.1 * sum (abs, sol. u [end ])
6161sol3 = solve (prob,RandomTamedEM (),dt= 1 / 100 )
62- @test sum (abs,sol[end ]- sol3[end ]) < 0.1 * sum (abs, sol3[end ])
62+ @test sum (abs,sol. u [end ]- sol3[end ]) < 0.1 * sum (abs, sol3[end ])
0 commit comments