Skip to content

Commit

Permalink
fix SROCK2 for NoiseWrapper noise
Browse files Browse the repository at this point in the history
fixes SciML#505
  • Loading branch information
axsk committed Sep 30, 2022
1 parent 5c13cc7 commit 9a556d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/perform_step/SROCK_perform_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,12 @@ end

sqrt_dt = sqrt(abs(dt))
if gen_prob
vec_χ .= 1//2 .+ oftype(W.dW, rand(W.rng, length(W.dW)))
@.. vec_χ = 2*floor(vec_χ) - 1
if hasfield(W, :rng)
rand!(W.rng, vec_χ)
else
rand!(vec_χ)
end
@.. vec_χ = 2*floor(vec_χ + 1//2) - 1
end

μ = recf[start] # here κ = 0
Expand Down

0 comments on commit 9a556d7

Please sign in to comment.