@@ -37,6 +37,26 @@ sol = solve(prob,SRA())
3737
3838@test length (sol. W[1 ]) == 4
3939
40+ f (du,u,p,t) = (du.= 1.01 u)
41+ g (du,u,p,t) = (du.= 0.1 )
42+ Z = WienerProcess (0.0 , [0.0 ])
43+ prob = SDEProblem (f,g,[1.0 ],(0.0 ,1.0 ),noise= Z)
44+
45+ sol = solve (prob,EM (),dt= 1 / 100 )
46+
47+ @test sol. W == prob. noise
48+ @test objectid (prob. noise) != objectid (sol. W)
49+
50+ sol = solve (prob,EM (),dt= 1 / 1000 ,alias_noise= false )
51+
52+ @test sol. W == prob. noise
53+ @test objectid (prob. noise) == objectid (sol. W)
54+
55+ sol = solve (prob,EM (),dt= 1 / 1000 , alias_noise= true )
56+
57+ @test sol. W == prob. noise
58+ @test objectid (prob. noise) != objectid (sol. W)
59+
4060function g (du,u,p,t)
4161 @test typeof (du) <: SparseMatrixCSC
4262 du[1 ,1 ] = 0.3 u[1 ]
@@ -72,3 +92,18 @@ tspan = (0.0,2.0)
7292prob = SDEProblem (drift,vol,u0,tspan, noise= W)
7393sol = solve (prob,EM (),dt= 0.01 )
7494@test sol. W. curt ≈ last (tspan)
95+
96+ @test typeof (sol. W) == typeof (prob. noise) <: NoiseFunction
97+ @test objectid (prob. noise) != objectid (sol. W)
98+
99+ sol = solve (prob,EM (),dt= 0.01 ,alias_noise= true )
100+ @test sol. W. curt ≈ last (tspan)
101+
102+ @test typeof (sol. W) == typeof (prob. noise) <: NoiseFunction
103+ @test objectid (prob. noise) != objectid (sol. W)
104+
105+ sol = solve (prob,EM (),dt= 0.01 ,alias_noise= false )
106+ @test sol. W. curt ≈ last (tspan)
107+
108+ @test typeof (sol. W) == typeof (prob. noise) <: NoiseFunction
109+ @test objectid (prob. noise) == objectid (sol. W)
0 commit comments