Skip to content

Commit d65f95d

Browse files
committed
rearrange so that we can use sparsity pattern if available
1 parent 9662d08 commit d65f95d

File tree

1 file changed

+1
-1
lines changed
  • lib/OrdinaryDiffEqNonlinearSolve/src

1 file changed

+1
-1
lines changed

lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ function build_nlsolver(
181181

182182
if nlalg isa Union{NLNewton, NonlinearSolveAlg}
183183
nf = nlsolve_f(f, alg)
184-
J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(true))
185184

186185
# TODO: check if the solver is iterative
187186
weight = zero(u)
@@ -199,6 +198,7 @@ function build_nlsolver(
199198
end
200199
jac_config = build_jac_config(alg, nf, uf, du1, uprev, u, ztmp, dz)
201200
end
201+
J, W = build_J_W(alg, u, uprev, p, t, dt, f, jac_config, uEltypeNoUnits, Val(true))
202202
linprob = LinearProblem(W, _vec(k); u0 = _vec(dz))
203203
Pl, Pr = wrapprecs(
204204
alg.precs(W, nothing, u, p, t, nothing, nothing, nothing,

0 commit comments

Comments
 (0)