Skip to content

Commit

Permalink
Fix SteadyState Adjoint for OOP jacobian
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed May 15, 2024
1 parent eacd462 commit d75fefa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/steadystate_adjoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ end

if needs_jac
if DiffEqBase.has_jac(f)
f.jac(diffcache.J, y, p, nothing)
if DiffEqBase.isinplace(sol.prob)
f.jac(diffcache.J, y, p, nothing)

Check warning on line 59 in src/steadystate_adjoint.jl

View check run for this annotation

Codecov / codecov/patch

src/steadystate_adjoint.jl#L58-L59

Added lines #L58 - L59 were not covered by tests
else
copyto!(diffcache.J, f.jac(y, p, nothing))

Check warning on line 61 in src/steadystate_adjoint.jl

View check run for this annotation

Codecov / codecov/patch

src/steadystate_adjoint.jl#L61

Added line #L61 was not covered by tests
end
else
if DiffEqBase.isinplace(sol.prob)
jacobian!(diffcache.J, diffcache.uf, y, diffcache.f_cache,
Expand Down

0 comments on commit d75fefa

Please sign in to comment.