Skip to content

Commit b1ffa15

Browse files
committed
allow setting alg
1 parent 6323432 commit b1ffa15

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/LinearSolveForwardDiffExt.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,11 @@ function SciMLBase.init(
150150
elseif get_dual_type(prob.b) !== nothing
151151
dual_type = get_dual_type(prob.b)
152152
end
153-
Main.@infiltrate
153+
154+
alg isa LinearSolve.DefaultLinearSolver ? real_alg = LinearSolve.defaultalg(primal_prob.A, primal_prob.b) : real_alg = alg
155+
154156
non_partial_cache = init(
155-
primal_prob, LinearSolve.defaultalg(primal_prob.A, primal_prob.b, assumptions), args...;
157+
primal_prob, real_alg, assumptions, args...;
156158
alias = alias, abstol = abstol, reltol = reltol,
157159
maxiters = maxiters, verbose = verbose, Pl = Pl, Pr = Pr, assumptions = assumptions,
158160
sensealg = sensealg, u0 = new_u0, kwargs...)

0 commit comments

Comments
 (0)