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

update scimlbase for function unwrapping #715

Merged
merged 12 commits into from
Aug 25, 2022
Prev Previous commit
Next Next commit
more blind unwrapping
  • Loading branch information
ChrisRackauckas committed Aug 24, 2022
commit 063ff078b06e6b7121942c6cb7143d74622b64a4
4 changes: 4 additions & 0 deletions src/adjoint_common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function adjointdiffcache(g::G, sensealg, discrete, sol, dgdu::DG1, dgdp::DG2, f
else
@unpack u0, p, tspan = prob
end

# Remove any function wrappers: it breaks autodiff
f = unwrapped_f(f)

numparams = p === nothing || p === DiffEqBase.NullParameters() ? 0 : length(p)
numindvar = length(u0)
isautojacvec = get_jacvec(sensealg)
Expand Down