2828
2929 for alg ∈ LevyArea. ITER_INT_ALGS
3030 @test diag (StochasticDiffEq. get_iterated_I (dt, W. dW, W. dZ, alg, nothing , 1 )) == true_diag
31- end
31+ end
3232end
3333
3434# Commutative noise tests
4444
4545 for alg ∈ LevyArea. ITER_INT_ALGS
4646 @test diag (StochasticDiffEq. get_iterated_I (dt, W. dW, W. dZ, alg, nothing , 1 )) == diag (true_commute)
47- end
47+ end
4848end
4949
5050
@@ -90,7 +90,7 @@ function test_compare_sample_mean_and_var(alg, Δ, m, samples=Int(1e6), p=Int(1e
9090 calculate_step! (W,dt,nothing ,nothing )
9191 for i in 1 : 10
9292 accept_step! (W,dt,nothing ,nothing )
93- end
93+ end
9494
9595 xs = [StochasticDiffEq. get_iterated_I (Δ, W. dW, W. dZ, alg, p, 1 )[1 ,2 ]]
9696 coms = [1 // 2 * W. dW[1 ]* W. dW[2 ]]
@@ -100,7 +100,7 @@ function test_compare_sample_mean_and_var(alg, Δ, m, samples=Int(1e6), p=Int(1e
100100 accept_step! (W,Δ,nothing ,nothing )
101101 com = 1 // 2 * W. dW[1 ]* W. dW[2 ]
102102 x = StochasticDiffEq. get_iterated_I (Δ, W. dW, W. dZ, alg, p, 1 )[1 ,2 ]
103-
103+
104104 push! (xs,x)
105105 push! (coms,com)
106106 end
119119 Random. seed! (seed)
120120 I = StochasticDiffEq. get_iterated_I (dt, W. dW, W. dZ, alg, 1 , 1 )
121121 Random. seed! (seed)
122- A = LevyArea. levyarea (W. dW/√ dt, 1 , alg)
122+ A = LevyArea. levyarea (W. dW/√ dt, 1 , alg)
123123 @test dt* A + true_commute == I # because of correction with \mu term
124124 @test diag (A) == diag (zero (A))
125125 @test diag (true_commute) == diag (I)
@@ -131,15 +131,15 @@ end
131131
132132 # test other StatsJ
133133 @time test_compare_sample_mean_and_var (alg, 1.0 , 2 )
134- end
134+ end
135135end
136136
137137@testset " Simulate non-com. SDEs tests" begin
138138 u₀ = [0.0 ,0.0 ,0.0 ]
139139 f (u,p,t) = [0.0 ,0.0 ,0.0 ]
140140 g (u,p,t) = [1.0 0.0 ;0.0 1.0 ;0.0 u[1 ]]
141141 f! (du,u,p,t) = du .*= false
142- function g! (du,u,p,t)
142+ function g! (du,u,p,t)
143143 du[1 ,1 ] = 1.0
144144 du[2 ,2 ] = 1.0
145145 du[3 ,2 ] = u[1 ]
@@ -151,16 +151,16 @@ end
151151 prob! = SDEProblem (f!,g!,u₀,(0.0 ,1.0 ); noise_rate_prototype= zeros (3 ,2 ))
152152
153153 sol = solve (prob, RKMilGeneral (;ii_approx= IICommutative ()), dt= dt, adaptive= false )
154- @test sol. retcode == : Success
154+ @test sol. retcode == ReturnCode . Success
155155 sol = solve (prob, RKMilGeneral (;ii_approx= IILevyArea ()), dt= dt, adaptive= false )
156- @test sol. retcode == : Success
156+ @test sol. retcode == ReturnCode . Success
157157 sol = solve (prob, RKMilGeneral (ii_approx= Fourier ()), dt= dt, adaptive= false )
158- @test sol. retcode == : Success
158+ @test sol. retcode == ReturnCode . Success
159159
160160 sol = solve (prob!, RKMilGeneral (;ii_approx= IICommutative ()), dt= dt, adaptive= false )
161- @test sol. retcode == : Success
161+ @test sol. retcode == ReturnCode . Success
162162 sol = solve (prob!, RKMilGeneral (;ii_approx= IILevyArea ()), dt= dt, adaptive= false )
163- @test sol. retcode == : Success
163+ @test sol. retcode == ReturnCode . Success
164164 sol = solve (prob!, RKMilGeneral (ii_approx= Fourier ()), dt= dt, adaptive= false )
165- @test sol. retcode == : Success
165+ @test sol. retcode == ReturnCode . Success
166166end
0 commit comments