Skip to content

Commit

Permalink
extra robustness in fallbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Jan 20, 2022
1 parent a84c420 commit 4e0a46d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LinearSolve"
uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
authors = ["SciML"]
version = "1.8.1"
version = "1.8.2"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
14 changes: 13 additions & 1 deletion src/factorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,24 @@ function init_cacheval(alg::Union{QRFactorization,SVDFactorization,GenericFactor
end

# Ambiguity handling dispatch
function init_cacheval(alg::Union{QRFactorization,SVDFactorization,GenericFactorization}, A::StridedMatrix{<:LinearAlgebra.BlasFloat}, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
function init_cacheval(alg::Union{QRFactorization,SVDFactorization}, A::StridedMatrix{<:LinearAlgebra.BlasFloat}, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
newA = copy(convert(AbstractMatrix,A))
fill!(newA,true)
do_factorization(alg, newA, b, u)
end

# Cholesky needs the posdef matrix, for GenericFactorization assume structure is needed
function init_cacheval(alg::Union{GenericFactorization,GenericFactorization{typeof(cholesky)},GenericFactorization{typeof(cholesky!)}}, A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
newA = copy(convert(AbstractMatrix,A))
do_factorization(alg, newA, b, u)
end

# Ambiguity handling dispatch
function init_cacheval(alg::Union{GenericFactorization,GenericFactorization{typeof(cholesky)},GenericFactorization{typeof(cholesky!)}}, A::StridedMatrix{<:LinearAlgebra.BlasFloat}, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
newA = copy(convert(AbstractMatrix,A))
do_factorization(alg, newA, b, u)
end

## RFLUFactorization

struct RFWrapper{P,T}
Expand Down

0 comments on commit 4e0a46d

Please sign in to comment.