Skip to content

Commit

Permalink
don't error on missing factors, just print summary.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wimmerer committed Dec 19, 2021
1 parent 7a801a7 commit 5173e60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/KLU.jl
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ function LinearAlgebra.issuccess(K::KLUFactorization)
return K.common.status == KLU_OK && K._numeric != C_NULL
end
function show(io::IO, mime::MIME{Symbol("text/plain")}, K::KLUFactorization)
if issuccess(K)
summary(io, K); println(io)
summary(io, K); println(io)
if K._numeric != C_NULL
println(io, "L factor:")
show(io, mime, K.L)
println(io, "\nU factor:")
Expand All @@ -412,7 +412,7 @@ function show(io::IO, mime::MIME{Symbol("text/plain")}, K::KLUFactorization)
show(io, mime, K.F)
end
else
throw(ArgumentError("Failed factorization of type $(typeof(K)). Try `klu_factor!(K)`."))
println(io, "Incomplete Factorization, please try `klu_factor!(K)`.")
end
end

Expand Down

0 comments on commit 5173e60

Please sign in to comment.