Skip to content

Commit 1e97615

Browse files
reference for sparse jac
1 parent d0a709e commit 1e97615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function DiffEqBase.ODEFunction{iip}(sys::AbstractODESystem, dvs = states(sys),
153153
jac = _jac === nothing ? nothing : DiffEqBase.EvalFunc(_jac),
154154
tgrad = _tgrad === nothing ? nothing : DiffEqBase.EvalFunc(_tgrad),
155155
mass_matrix = _M,
156-
jac_prototype = sparse ? similar(sys.jac,Float64) : nothing,
156+
jac_prototype = sparse ? similar(sys.jac[],Float64) : nothing,
157157
syms = Symbol.(states(sys)))
158158
end
159159

@@ -203,7 +203,7 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
203203

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

206-
jp_expr = sparse ? :(similar($(sys.jac),Float64)) : :nothing
206+
jp_expr = sparse ? :(similar($(sys.jac[]),Float64)) : :nothing
207207

208208
ex = quote
209209
f = $f

0 commit comments

Comments
 (0)