Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes needed for Manifold Projection Semi-Explicit DAEs #1037

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/concrete_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,9 @@ function DiffEqBase._concrete_solve_adjoint(
end

function steadystatebackpass(Δ)
if originator isa SciMLBase.TrackerOriginator
Δ = Tracker.data(Δ)
end
# Δ = dg/dx or diffcache.dg_val
# del g/del p = 0
function df(_out, u, p, t, i)
Expand Down
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
Loading