Skip to content

Commit bab12e0

Browse files
committed
make tests pass
1 parent 42fb583 commit bab12e0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ function build_J_W(alg, u, uprev, p, t, dt, f::F, ::Type{uEltypeNoUnits},
883883
# Thus setup JacVec and a concrete J, using sparsity when possible
884884
_f = islin ? (isode ? f.f : f.f1.f) : f
885885
J = if f.jac_prototype === nothing
886-
ArrayInterface.undefmatrix(u)
886+
ArrayInterface.zeromatrix(u)
887887
else
888888
deepcopy(f.jac_prototype)
889889
end
@@ -907,10 +907,11 @@ function build_J_W(alg, u, uprev, p, t, dt, f::F, ::Type{uEltypeNoUnits},
907907
f.jac(uprev, p, t)
908908
end
909909
elseif f.jac_prototype === nothing
910-
ArrayInterface.undefmatrix(u)
910+
ArrayInterface.zeromatrix(u)
911911
else
912912
deepcopy(f.jac_prototype)
913913
end
914+
914915
W = if alg isa DAEAlgorithm
915916
J
916917
elseif IIP
@@ -1003,4 +1004,4 @@ function resize_J_W!(cache, integrator, i)
10031004
end
10041005

10051006
nothing
1006-
end
1007+
end

lib/OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ end
3939

4040
function wrapprecs(linsolver, W, weight)
4141
if isnothing(linsolver)
42-
linsolver = LinearSolve.defaultalg(W, weight, LinearSolve.OperatorAssumptions(true))
42+
linsolver = LinearSolve.LUFactorization()
4343
end
4444
if hasproperty(linsolver, :precs) && isnothing(linsolver.precs)
4545
Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight)))

0 commit comments

Comments
 (0)