Skip to content

Commit 0ea5fd2

Browse files
committed
fix test error
1 parent de585a9 commit 0ea5fd2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,12 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
215215

216216
jp_expr = sparse ? :(similar($(sys.jac[]),Float64)) : :nothing
217217

218+
sts = states(sys)
218219
ex = quote
219220
f = $f
220221
tgrad = $_tgrad
221222
jac = $_jac
222223
M = $_M
223-
sts = $(states(sys))
224224
ODEFunction{$iip}(f,
225225
jac = jac,
226226
tgrad = tgrad,

src/systems/diffeqs/sdesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ function SDEFunctionExpr{iip}(sys::SDESystem, dvs = states(sys),
255255

256256
_M = (u0 === nothing || M == I) ? M : ArrayInterface.restructure(u0 .* u0',M)
257257

258+
sts = states(sys)
258259
ex = quote
259260
f = $f
260261
g = $g
@@ -263,7 +264,6 @@ function SDEFunctionExpr{iip}(sys::SDESystem, dvs = states(sys),
263264
Wfact = $_Wfact
264265
Wfact_t = $_Wfact_t
265266
M = $_M
266-
sts = $(states(sys))
267267
SDEFunction{$iip}(f,g,
268268
jac = jac,
269269
tgrad = tgrad,

src/systems/jumps/jumpsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ function DiscreteProblemExpr(sys::JumpSystem, u0map, tspan::Tuple,
226226
u0 = varmap_to_vars(u0map, states(sys))
227227
p = varmap_to_vars(parammap, parameters(sys))
228228
# identity function to make syms works
229+
sts = states(sys)
229230
quote
230231
f = DiffEqBase.DISCRETE_INPLACE_DEFAULT
231232
u0 = $u0
232233
p = $p
233234
tspan = $tspan
234-
sts = $(states(sys))
235235
df = DiscreteFunction{true,true}(f, syms=$(tosymbol.(sts, states=sts, escape=false)))
236236
DiscreteProblem(df, u0, tspan, p; kwargs...)
237237
end

0 commit comments

Comments
 (0)