Skip to content

Commit

Permalink
t0 and reinit! for NoiseFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
rmsrosa committed Aug 17, 2022
1 parent 382d81c commit 510eeb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/noise_interfaces/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function DiffEqBase.reinit!(W::AbstractNoiseProcess, dt;
end

function DiffEqBase.reinit!(W::NoiseFunction, dt;
t0 = zero(W.curt),
t0 = W.t0,
erase_sol = true,
setup_next = false)
W.curt = t0
Expand Down
3 changes: 2 additions & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ mutable struct NoiseFunction{T, N, wType, zType, Tt, T2, T3, inplace} <:
dt::Tt
dW::T2
dZ::T3
t0::Tt
reset::Bool

function NoiseFunction{iip}(t0, W, Z = nothing;
Expand All @@ -560,7 +561,7 @@ mutable struct NoiseFunction{T, N, wType, zType, Tt, T2, T3, inplace} <:
end
new{typeof(noise_prototype), ndims(noise_prototype), typeof(W), typeof(Z),
typeof(curt), typeof(curW), typeof(curZ), iip}(W, Z, curt, curW, curZ,
dt, dW, dZ, reset)
dt, dW, dZ, t0, reset)
end
end

Expand Down

0 comments on commit 510eeb3

Please sign in to comment.