Skip to content

Commit 9202505

Browse files
committed
Fix SteadyState Adjoint for OOP jacobian
1 parent 10b49a4 commit 9202505

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/steadystate_adjoint.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ end
5555

5656
if needs_jac
5757
if DiffEqBase.has_jac(f)
58-
f.jac(diffcache.J, y, p, nothing)
58+
if DiffEqBase.isinplace(sol.prob)
59+
f.jac(diffcache.J, y, p, nothing)
60+
else
61+
copyto!(diffcache.J, f.jac(y, p, nothing))
62+
end
5963
else
6064
if DiffEqBase.isinplace(sol.prob)
6165
jacobian!(diffcache.J, diffcache.uf, y, diffcache.f_cache,

0 commit comments

Comments
 (0)