Skip to content

Commit

Permalink
Remove accidental duplicate method, fix doctest (locally) (#277)
Browse files Browse the repository at this point in the history
rm accidental duplicate method, fix doctest (locally)
  • Loading branch information
rayegun authored Oct 20, 2022
1 parent 971979d commit 3c2b65f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/solvers/umfpack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,6 @@ julia> F \\ ones(2)
1.0
```
"""
function lu!(F::UmfpackLU; check::Bool=true, reuse_symbolic::Bool=true, q=nothing)
if !reuse_symbolic && _isnotnull(F.symbolic)
F.symbolic = Symbolic{Tv, Ti}(C_NULL)
end
umfpack_numeric!(F; reuse_numeric = false, q)
check && (issuccess(F) || throw(LinearAlgebra.SingularException(0)))
return F
end
function lu!(F::UmfpackLU{Tv, Ti}, S::AbstractSparseMatrixCSC;
check::Bool=true, reuse_symbolic::Bool=true, q=nothing) where {Tv, Ti}
zerobased = getcolptr(S)[1] == 0
Expand Down Expand Up @@ -486,8 +478,11 @@ function lu!(F::UmfpackLU{Tv, Ti}, S::AbstractSparseMatrixCSC;
return lu!(F; reuse_symbolic, check, q)
end

function lu!(F::UmfpackLU; check::Bool=true, q=nothing)
umfpack_numeric!(F; q)
function lu!(F::UmfpackLU; check::Bool=true, reuse_symbolic::Bool=true, q=nothing)
if !reuse_symbolic && _isnotnull(F.symbolic)
F.symbolic = Symbolic{Tv, Ti}(C_NULL)
end
umfpack_numeric!(F; reuse_numeric = false, q)
check && (issuccess(F) || throw(LinearAlgebra.SingularException(0)))
return F
end
Expand Down

0 comments on commit 3c2b65f

Please sign in to comment.