Skip to content

Commit d813c63

Browse files
Merge pull request #94 from SciML/rf_options
Add RecursiveFactorization options
2 parents 3a1c60e + 645aa8f commit d813c63

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Project.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "LinearSolve"
22
uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
33
authors = ["SciML"]
4-
version = "1.7.0"
4+
version = "1.8.0"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
@@ -27,7 +27,7 @@ IterativeSolvers = "0.9.2"
2727
KLU = "0.2.3"
2828
Krylov = "0.7.9"
2929
KrylovKit = "0.5"
30-
RecursiveFactorization = "0.2"
30+
RecursiveFactorization = "0.2.8"
3131
Reexport = "1"
3232
Requires = "1"
3333
SciMLBase = "1.25"
@@ -44,3 +44,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4444

4545
[targets]
4646
test = ["Test", "Pardiso", "Pkg", "Random", "SafeTestsets"]
47+

src/factorization.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,12 @@ end
224224

225225
## RFLUFactorization
226226

227-
RFLUFactorization() = GenericFactorization(;fact_alg=RecursiveFactorization.lu!)
227+
struct RFWrapper{P,T}
228+
RFWrapper(::Val{P},::Val{T}) where {P,T} = new{P,T}()
229+
end
230+
(::RFWrapper{P,T})(A) where {P,T} = RecursiveFactorization.lu!(A,Val(P),Val(T))
231+
232+
RFLUFactorization(;pivot = Val(true), thread = Val(true)) = GenericFactorization(;fact_alg=RFWrapper(pivot,thread))
233+
228234
init_cacheval(alg::GenericFactorization{typeof(RecursiveFactorization.lu!)}, A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose) = ArrayInterface.lu_instance(convert(AbstractMatrix,A))
229235
init_cacheval(alg::GenericFactorization{typeof(RecursiveFactorization.lu!)}, A::StridedMatrix{<:LinearAlgebra.BlasFloat}, b, u, Pl, Pr, maxiters, abstol, reltol, verbose) = ArrayInterface.lu_instance(convert(AbstractMatrix,A))

0 commit comments

Comments
 (0)