@@ -699,7 +699,8 @@ function init_cacheval(alg::UMFPACKFactorization, A, b, u, Pl, Pr, maxiters::Int
699
699
return SuiteSparse. UMFPACK. UmfpackLU (SparseMatrixCSC (size (A)... , getcolptr (A),
700
700
rowvals (A), nonzeros (A)))
701
701
end
702
-
702
+ elseif ! (eltype (A) <: Union{Float32,Float64} ) || ! (eltype (b) <: Union{Float32,Float64} )
703
+ return nothing # Cannot use Umfpack
703
704
else
704
705
@static if VERSION < v " 1.9.0-DEV.1622"
705
706
res = SuiteSparse. UMFPACK. UmfpackLU (C_NULL , C_NULL , 0 , 0 ,
@@ -782,6 +783,8 @@ function init_cacheval(alg::KLUFactorization, A, b, u, Pl, Pr, maxiters::Int, ab
782
783
if typeof (A) <: SparseArrays.AbstractSparseArray
783
784
return KLU. KLUFactorization (SparseMatrixCSC (size (A)... , getcolptr (A), rowvals (A),
784
785
nonzeros (A)))
786
+ elseif ! (eltype (A) <: Union{Float32,Float64} ) || ! (eltype (b) <: Union{Float32,Float64} )
787
+ return nothing # Cannot use KLU
785
788
else
786
789
return KLU. KLUFactorization (SparseMatrixCSC (0 , 0 , [1 ], Int64[], eltype (A)[]))
787
790
end
@@ -1102,7 +1105,7 @@ end
1102
1105
1103
1106
function SciMLBase. solve! (cache:: LinearCache , alg:: DiagonalFactorization ;
1104
1107
kwargs... )
1105
- A = cache. A
1108
+ A = convert (AbstractMatrix, cache. A)
1106
1109
if cache. u isa Vector && cache. b isa Vector
1107
1110
@simd ivdep for i in eachindex (cache. u)
1108
1111
cache. u[i] = A. diag[i] \ cache. b[i]
0 commit comments