Skip to content

Commit

Permalink
fix Rosenbrock time derivative
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Nov 27, 2024
1 parent 2fb8e9a commit a0ddbe4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@ function calc_tderivative!(integrator, cache, dtd1, repeat_step)
tf.p = p
alg = unwrap_alg(integrator, true)
#derivative!(dT, tf, t, du2, integrator, cache.grad_config)
DI.derivative!(tf, linsolve_tmp, dT, cache.grad_config, alg_autodiff(alg), t)
autodiff_alg = alg_autodiff(alg)

autodiff_alg = if autodiff_alg isa AutoSparse
ADTypes.dense_ad(autodiff_alg)
else
autodiff_alg
end

autodiff_alg = ADTypes.dense_ad(alg_autodiff(alg))
DI.derivative!(tf, linsolve_tmp, dT, cache.grad_config, autodiff_alg, t)
end
end

Expand Down

0 comments on commit a0ddbe4

Please sign in to comment.