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 Mar 28, 2024
1 parent 10b49a4 commit 9202505
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)
else
copyto!(diffcache.J, f.jac(y, p, nothing))
end
else
if DiffEqBase.isinplace(sol.prob)
jacobian!(diffcache.J, diffcache.uf, y, diffcache.f_cache,
Expand Down

0 comments on commit 9202505

Please sign in to comment.