Skip to content

Commit 5510918

Browse files
author
Hadrien
committed
change variable name
1 parent 75f91d2 commit 5510918

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/caches/dynamical_caches.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ end
125125

126126
mutable struct OBABOConstantCache{uType,rateNoiseType, uEltypeNoUnits, uCoeffType, uCoeffMType} <: StochasticDynamicalEqConstantCache
127127
k::uType
128-
sig::rateNoiseType
128+
gt::rateNoiseType
129129
half::uEltypeNoUnits
130130
c₂::uCoeffType
131131
σ::uCoeffMType
@@ -147,7 +147,7 @@ end
147147

148148
function alg_cache(alg::OBABO,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{false}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}
149149
k = zero(rate_prototype.x[1])
150-
sig = zero(noise_rate_prototype)
150+
gt = zero(noise_rate_prototype)
151151
half=uEltypeNoUnits(1//2)
152152

153153
if typeof(alg.gamma) <: AbstractMatrix
@@ -158,7 +158,7 @@ function alg_cache(alg::OBABO,prob,u,ΔW,ΔZ,p,rate_prototype,noise_rate_prototy
158158
σ = sqrt.(1 .- alg.scale_noise*c₂.^2)
159159
end
160160
# if scale_noise == false, c2 = 1
161-
OBABOConstantCache(k, sig, half, c₂, σ)
161+
OBABOConstantCache(k, gt, half, c₂, σ)
162162
end
163163

164164
function alg_cache(alg::OBABO,prob,u,ΔW,ΔZ,p,rate_prototype, noise_rate_prototype,jump_rate_prototype,::Type{uEltypeNoUnits},::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,f,t,dt,::Type{Val{true}}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits}

src/perform_step/dynamical.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function initialize!(integrator, cache::OBABOConstantCache)
160160

161161
verify_f2(integrator.f.f2, du1, u1, p, t, integrator, cache)
162162
cache.k = integrator.f.f1(du1,u1,p,t)
163-
cache.sig = integrator.g(u1,p,t)
163+
cache.gt = integrator.g(u1,p,t)
164164
end
165165

166166
function initialize!(integrator, cache::OBABOCache)
@@ -181,7 +181,7 @@ end
181181
u1 = uprev.x[2]
182182

183183
# O
184-
noise = cache.sig.*W.dW ./ sqdt
184+
noise = cache.gt.*W.dW ./ sqdt
185185
if typeof(σ) <: AbstractMatrix || typeof(noise) <: Number
186186
du2 = c₂*du1 + σ*noise
187187
else
@@ -199,8 +199,8 @@ end
199199
du3 = dumid + half*dt*cache.k
200200

201201
# O
202-
cache.sig = integrator.g(u,p,t+dt)
203-
noise = cache.sig.*W.dW ./ sqdt # That should be a second noise
202+
cache.gt = integrator.g(u,p,t+dt)
203+
noise = cache.gt.*W.dW ./ sqdt # That should be a second noise
204204
if typeof(σ) <: AbstractMatrix || typeof(noise) <: Number
205205
du = c₂*du3 + σ*noise
206206
else

0 commit comments

Comments
 (0)