@@ -49,7 +49,7 @@ Julia's built in `lu`. Equivalent to calling `lu!(A)`
4949 - pivot: The choice of pivoting. Defaults to `LinearAlgebra.RowMaximum()`. The other choice is
5050 `LinearAlgebra.NoPivot()`.
5151"""
52- Base. @kwdef struct LUFactorization{P} <: AbstractFactorization
52+ Base. @kwdef struct LUFactorization{P} <: AbstractDenseFactorization
5353 pivot:: P = LinearAlgebra. RowMaximum ()
5454 reuse_symbolic:: Bool = true
5555 check_pattern:: Bool = true # Check factorization re-use
@@ -70,7 +70,7 @@ Has low overhead and is good for small matrices.
7070 - pivot: The choice of pivoting. Defaults to `LinearAlgebra.RowMaximum()`. The other choice is
7171 `LinearAlgebra.NoPivot()`.
7272"""
73- struct GenericLUFactorization{P} <: AbstractFactorization
73+ struct GenericLUFactorization{P} <: AbstractDenseFactorization
7474 pivot:: P
7575end
7676
@@ -177,7 +177,7 @@ Julia's built in `qr`. Equivalent to calling `qr!(A)`.
177177 - On CuMatrix, it will use a CUDA-accelerated QR from CuSolver.
178178 - On BandedMatrix and BlockBandedMatrix, it will use a banded QR.
179179"""
180- struct QRFactorization{P} <: AbstractFactorization
180+ struct QRFactorization{P} <: AbstractDenseFactorization
181181 pivot:: P
182182 blocksize:: Int
183183 inplace:: Bool
@@ -260,7 +260,7 @@ Julia's built in `cholesky`. Equivalent to calling `cholesky!(A)`.
260260 - shift: the shift argument in CHOLMOD. Only used for sparse matrices.
261261 - perm: the perm argument in CHOLMOD. Only used for sparse matrices.
262262"""
263- struct CholeskyFactorization{P, P2} <: AbstractFactorization
263+ struct CholeskyFactorization{P, P2} <: AbstractDenseFactorization
264264 pivot:: P
265265 tol:: Int
266266 shift:: Float64
319319
320320# # LDLtFactorization
321321
322- struct LDLtFactorization{T} <: AbstractFactorization
322+ struct LDLtFactorization{T} <: AbstractDenseFactorization
323323 shift:: Float64
324324 perm:: T
325325end
@@ -361,7 +361,7 @@ Julia's built in `svd`. Equivalent to `svd!(A)`.
361361 which by default is OpenBLAS but will use MKL if the user does `using MKL` in their
362362 system.
363363"""
364- struct SVDFactorization{A} <: AbstractFactorization
364+ struct SVDFactorization{A} <: AbstractDenseFactorization
365365 full:: Bool
366366 alg:: A
367367end
@@ -410,7 +410,7 @@ Only for Symmetric matrices.
410410
411411 - rook: whether to perform rook pivoting. Defaults to false.
412412"""
413- Base. @kwdef struct BunchKaufmanFactorization <: AbstractFactorization
413+ Base. @kwdef struct BunchKaufmanFactorization <: AbstractDenseFactorization
414414 rook:: Bool = false
415415end
416416
@@ -464,7 +464,7 @@ factorization API. Quoting from Base:
464464 - fact_alg: the factorization algorithm to use. Defaults to `LinearAlgebra.factorize`, but can be
465465 swapped to choices like `lu`, `qr`
466466"""
467- struct GenericFactorization{F} <: AbstractFactorization
467+ struct GenericFactorization{F} <: AbstractDenseFactorization
468468 fact_alg:: F
469469end
470470
@@ -781,7 +781,7 @@ patterns with “more structure”.
781781 `A` has the same sparsity pattern as the previous `A`. If this algorithm is to
782782 be used in a context where that assumption does not hold, set `reuse_symbolic=false`.
783783"""
784- Base. @kwdef struct UMFPACKFactorization <: AbstractFactorization
784+ Base. @kwdef struct UMFPACKFactorization <: AbstractSparseFactorization
785785 reuse_symbolic:: Bool = true
786786 check_pattern:: Bool = true # Check factorization re-use
787787end
@@ -860,7 +860,7 @@ A fast sparse LU-factorization which specializes on sparsity patterns with “le
860860 `A` has the same sparsity pattern as the previous `A`. If this algorithm is to
861861 be used in a context where that assumption does not hold, set `reuse_symbolic=false`.
862862"""
863- Base. @kwdef struct KLUFactorization <: AbstractFactorization
863+ Base. @kwdef struct KLUFactorization <: AbstractSparseFactorization
864864 reuse_symbolic:: Bool = true
865865 check_pattern:: Bool = true
866866end
@@ -941,7 +941,7 @@ Only supports sparse matrices.
941941 - shift: the shift argument in CHOLMOD.
942942 - perm: the perm argument in CHOLMOD
943943"""
944- Base. @kwdef struct CHOLMODFactorization{T} <: AbstractFactorization
944+ Base. @kwdef struct CHOLMODFactorization{T} <: AbstractSparseFactorization
945945 shift:: Float64 = 0.0
946946 perm:: T = nothing
947947end
@@ -993,7 +993,7 @@ implementation, usually outperforming OpenBLAS and MKL for smaller matrices
993993(<500x500), but currently optimized only for Base `Array` with `Float32` or `Float64`.
994994Additional optimization for complex matrices is in the works.
995995"""
996- struct RFLUFactorization{P, T} <: AbstractFactorization
996+ struct RFLUFactorization{P, T} <: AbstractDenseFactorization
997997 RFLUFactorization (:: Val{P} , :: Val{T} ) where {P, T} = new {P, T} ()
998998end
999999
@@ -1064,7 +1064,7 @@ be applied to well-conditioned matrices.
10641064
10651065 - pivot: Defaults to RowMaximum(), but can be NoPivot()
10661066"""
1067- struct NormalCholeskyFactorization{P} <: AbstractFactorization
1067+ struct NormalCholeskyFactorization{P} <: AbstractDenseFactorization
10681068 pivot:: P
10691069end
10701070
@@ -1152,7 +1152,7 @@ be applied to well-conditioned matrices.
11521152
11531153 - rook: whether to perform rook pivoting. Defaults to false.
11541154"""
1155- struct NormalBunchKaufmanFactorization <: AbstractFactorization
1155+ struct NormalBunchKaufmanFactorization <: AbstractDenseFactorization
11561156 rook:: Bool
11571157end
11581158
@@ -1189,7 +1189,7 @@ end
11891189
11901190A special implementation only for solving `Diagonal` matrices fast.
11911191"""
1192- struct DiagonalFactorization <: AbstractFactorization end
1192+ struct DiagonalFactorization <: AbstractDenseFactorization end
11931193
11941194function init_cacheval (alg:: DiagonalFactorization , A, b, u, Pl, Pr, maxiters:: Int ,
11951195 abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
@@ -1225,7 +1225,7 @@ end
12251225The FastLapackInterface.jl version of the LU factorization. Notably,
12261226this version does not allow for choice of pivoting method.
12271227"""
1228- struct FastLUFactorization <: AbstractFactorization end
1228+ struct FastLUFactorization <: AbstractDenseFactorization end
12291229
12301230function init_cacheval (:: FastLUFactorization , A, b, u, Pl, Pr,
12311231 maxiters:: Int , abstol, reltol, verbose:: Bool ,
@@ -1255,7 +1255,7 @@ end
12551255
12561256The FastLapackInterface.jl version of the QR factorization.
12571257"""
1258- struct FastQRFactorization{P} <: AbstractFactorization
1258+ struct FastQRFactorization{P} <: AbstractDenseFactorization
12591259 pivot:: P
12601260 blocksize:: Int
12611261end
@@ -1329,7 +1329,7 @@ dispatch to route around standard BLAS routines in the case e.g. of arbitrary-pr
13291329floating point numbers or ForwardDiff.Dual.
13301330This e.g. allows for Automatic Differentiation (AD) of a sparse-matrix solve.
13311331"""
1332- Base. @kwdef struct SparspakFactorization <: AbstractFactorization
1332+ Base. @kwdef struct SparspakFactorization <: AbstractSparseFactorization
13331333 reuse_symbolic:: Bool = true
13341334end
13351335
@@ -1388,7 +1388,8 @@ function SciMLBase.solve!(cache::LinearCache, alg::SparspakFactorization; kwargs
13881388 SciMLBase. build_linear_solution (alg, y, nothing , cache)
13891389end
13901390
1391- for alg in InteractiveUtils. subtypes (AbstractFactorization)
1391+ for alg in vcat (InteractiveUtils. subtypes (AbstractDenseFactorization),
1392+ InteractiveUtils. subtypes (AbstractSparseFactorization))
13921393 @eval function init_cacheval (alg:: $alg , A:: MatrixOperator , b, u, Pl, Pr,
13931394 maxiters:: Int , abstol, reltol, verbose:: Bool ,
13941395 assumptions:: OperatorAssumptions )
0 commit comments