Skip to content

Commit

Permalink
fix: missing extras
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 8, 2024
1 parent d85a187 commit ca4cf05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/SimpleNonlinearSolve/src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function compute_jacobian!!(_, prob, autodiff, fx, x::Number, ::AnalyticJacobian
return prob.f.jvp(one(x), x, prob.p)
end
end
function compute_jacobian!!(_, prob, autodiff, fx, x::Number, ::DIExtras)
function compute_jacobian!!(_, prob, autodiff, fx, x::Number, extras::DIExtras)
return DI.derivative(prob.f, extras.prep, autodiff, x, Constant(prob.p))
end
function compute_jacobian!!(_, prob, autodiff, fx, x::Number, ::DINoPreparation)
Expand All @@ -177,7 +177,7 @@ function compute_jacobian!!(J, prob, autodiff, fx, x, ::AnalyticJacobian)
end
end

function compute_jacobian!!(J, prob, autodiff, fx, x, ::DIExtras)
function compute_jacobian!!(J, prob, autodiff, fx, x, extras::DIExtras)
if J === nothing
if SciMLBase.isinplace(prob.f)
return DI.jacobian(prob.f, fx, extras.prep, autodiff, x, Constant(prob.p))
Expand Down

0 comments on commit ca4cf05

Please sign in to comment.