@@ -88,27 +88,44 @@ function LinearSolve.init_cacheval(
88
88
end
89
89
90
90
function LinearSolve. init_cacheval (
91
- alg:: Union{LUFactorization, GenericLUFactorization} , A:: AbstractSparseArray{Float64, Int32 } , b, u,
91
+ alg:: Union{LUFactorization, GenericLUFactorization} , A:: AbstractSparseArray{T, Int64 } , b, u,
92
92
Pl, Pr,
93
93
maxiters:: Int , abstol, reltol,
94
- verbose:: Bool , assumptions:: OperatorAssumptions )
95
- SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {Float64, Int32} (0 , 0 , [Int32 (1 )], Int32[], Float64[]))
94
+ verbose:: Bool , assumptions:: OperatorAssumptions ) where {T<: BLASELTYPES }
95
+ SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int64} (zero (Int64), zero (Int64), [Int64 (1 )], Int64[], T[]))
96
+ end
97
+
98
+ function LinearSolve. init_cacheval (
99
+ alg:: Union{LUFactorization, GenericLUFactorization} , A:: AbstractSparseArray{T, Int32} , b, u,
100
+ Pl, Pr,
101
+ maxiters:: Int , abstol, reltol,
102
+ verbose:: Bool , assumptions:: OperatorAssumptions ) where {T<: BLASELTYPES }
103
+ SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int32} (zero (Int32), zero (Int32), [Int32 (1 )], Int32[], T[]))
96
104
end
97
105
98
106
function LinearSolve. init_cacheval (
99
107
alg:: UMFPACKFactorization , A:: AbstractSparseArray{Float64, Int} , b, u, Pl, Pr,
100
108
maxiters:: Int , abstol,
101
109
reltol,
102
110
verbose:: Bool , assumptions:: OperatorAssumptions )
111
+
103
112
PREALLOCATED_UMFPACK
104
113
end
105
114
106
115
function LinearSolve. init_cacheval (
107
- alg:: UMFPACKFactorization , A:: AbstractSparseArray{Float64, Int32 } , b, u,
116
+ alg:: UMFPACKFactorization , A:: AbstractSparseArray{T, Int64 } , b, u,
108
117
Pl, Pr,
109
118
maxiters:: Int , abstol, reltol,
110
- verbose:: Bool , assumptions:: OperatorAssumptions )
111
- SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {Float64, Int32} (0 , 0 , [Int32 (1 )], Int32[], Float64[]))
119
+ verbose:: Bool , assumptions:: OperatorAssumptions ) where {T<: BLASELTYPES }
120
+ SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int64} (zero (Int64), zero (Int64), [Int64 (1 )], Int64[], T[]))
121
+ end
122
+
123
+ function LinearSolve. init_cacheval (
124
+ alg:: UMFPACKFactorization , A:: AbstractSparseArray{T, Int32} , b, u,
125
+ Pl, Pr,
126
+ maxiters:: Int , abstol, reltol,
127
+ verbose:: Bool , assumptions:: OperatorAssumptions ) where {T<: BLASELTYPES }
128
+ SparseArrays. UMFPACK. UmfpackLU (SparseMatrixCSC {T, Int32} (zero (Int32), zero (Int32), [Int32 (1 )], Int32[], T[]))
112
129
end
113
130
114
131
function SciMLBase. solve! (
@@ -208,17 +225,35 @@ function SciMLBase.solve!(cache::LinearSolve.LinearCache, alg::KLUFactorization;
208
225
end
209
226
end
210
227
211
- const PREALLOCATED_CHOLMOD = cholesky (SparseMatrixCSC ( 0 , 0 , [ 1 ], Int[], Float64[] ))
228
+ const PREALLOCATED_CHOLMOD = cholesky (sparse ( reshape ([ 1.0 ], 1 , 1 ) ))
212
229
213
230
function LinearSolve. init_cacheval (alg:: CHOLMODFactorization ,
214
231
A:: Union{SparseMatrixCSC{T, Int}, Symmetric{T, SparseMatrixCSC{T, Int}}} , b, u,
215
232
Pl, Pr,
216
233
maxiters:: Int , abstol, reltol,
217
234
verbose:: Bool , assumptions:: OperatorAssumptions ) where {T < :
218
- BLASELTYPES }
235
+ Float64 }
219
236
PREALLOCATED_CHOLMOD
220
237
end
221
238
239
+ function LinearSolve. init_cacheval (alg:: CHOLMODFactorization ,
240
+ A:: Union{SparseMatrixCSC{T, Int}, Symmetric{T, SparseMatrixCSC{T, Int}}} , b, u,
241
+ Pl, Pr,
242
+ maxiters:: Int , abstol, reltol,
243
+ verbose:: Bool , assumptions:: OperatorAssumptions ) where {T < :
244
+ BLASELTYPES}
245
+ cholesky (sparse (reshape ([one (T)],1 ,1 )))
246
+ end
247
+
248
+ function LinearSolve. init_cacheval (alg:: CHOLMODFactorization ,
249
+ A:: AbstractArray , b, u,
250
+ Pl, Pr,
251
+ maxiters:: Int , abstol, reltol,
252
+ verbose:: Bool , assumptions:: OperatorAssumptions ) where {T < :
253
+ BLASELTYPES}
254
+ nothing
255
+ end
256
+
222
257
function LinearSolve. init_cacheval (alg:: NormalCholeskyFactorization ,
223
258
A:: Union {AbstractSparseArray{T}, LinearSolve. GPUArraysCore. AnyGPUArray,
224
259
Symmetric{T, <: AbstractSparseArray{T} }}, b, u, Pl, Pr,
0 commit comments