Skip to content

Commit 29ab3b8

Browse files
Update lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl
Co-authored-by: Guillaume Dalle <22795598+gdalle@users.noreply.github.com>
1 parent 0c45be0 commit 29ab3b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ function calc_J!(J, integrator, cache, next_step::Bool = false)
205205
if !isnothing(integrator.f.jac_prototype) &&
206206
integrator.f.jac_prototype isa SparseMatrixCSC
207207

208-
integrator.f.jac_prototype.nzval .= 1.0
209-
J .= 1.0 .* integrator.f.jac_prototype
210-
J.nzval .= 0.0
208+
integrator.f.jac_prototype.nzval .= true
209+
J .= true .* integrator.f.jac_prototype
210+
J.nzval .= false
211211
f.jac(J, uprev, p, t)
212212
else
213213
f.jac(J, uprev, p, t)

0 commit comments

Comments
 (0)