Skip to content

Commit

Permalink
update DAEResidualJacobianWrapper constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Nov 29, 2024
1 parent aed21fd commit 96a1487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ mutable struct DAEResidualJacobianWrapper{isAD, F, pType, duType, uType, alphaTy
uprev::uprevType
t::tType
function DAEResidualJacobianWrapper(alg, f, p, α, invγdt, tmp, uprev, t)
isautodiff = alg_autodiff(alg) isa AutoForwardDiff
autodiff_alg = alg_autodiff(alg) isa AutoSparse ? dense_ad(alg_autodiff(alg)) : alg_autodiff(alg)
isautodiff = autodiff_alg isa AutoForwardDiff
if isautodiff
tmp_du = PreallocationTools.dualcache(uprev)
tmp_u = PreallocationTools.dualcache(uprev)
Expand Down

0 comments on commit 96a1487

Please sign in to comment.