Skip to content

Commit 301153d

Browse files
committed
refactor: remove alg from the cache
1 parent 254c1d5 commit 301153d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/internal/jacobian.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Construct a cache for the Jacobian of `f` w.r.t. `u`.
3434
fu
3535
u
3636
p
37-
alg
3837
stats::NLStats
3938
autodiff
4039
di_extras
@@ -106,18 +105,18 @@ function JacobianCache(prob, alg, f::F, fu_, u, p; stats, autodiff = nothing,
106105
end
107106

108107
return JacobianCache{iip}(
109-
J, f, fu, u, p, alg, stats, autodiff, di_extras, sdifft_extras)
108+
J, f, fu, u, p, stats, autodiff, di_extras, sdifft_extras)
110109
end
111110

112111
function JacobianCache(prob, alg, f::F, ::Number, u::Number, p; stats,
113112
autodiff = nothing, kwargs...) where {F}
114113
fu = f(u, p)
115114
if SciMLBase.has_jac(f) || SciMLBase.has_vjp(f) || SciMLBase.has_jvp(f)
116-
return JacobianCache{false}(u, f, fu, u, p, alg, stats, autodiff, nothing)
115+
return JacobianCache{false}(u, f, fu, u, p, stats, autodiff, nothing)
117116
end
118117
autodiff = get_concrete_forward_ad(autodiff, prob; check_forward_mode = false)
119118
di_extras = DI.prepare_derivative(f, autodiff, u, Constant(prob.p))
120-
return JacobianCache{false}(u, f, fu, u, p, alg, stats, autodiff, di_extras, nothing)
119+
return JacobianCache{false}(u, f, fu, u, p, stats, autodiff, di_extras, nothing)
121120
end
122121

123122
(cache::JacobianCache)(u = cache.u) = cache(cache.J, u, cache.p)

0 commit comments

Comments
 (0)