diff --git a/Project.toml b/Project.toml index 2838ce3b8..defd6b346 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LinearSolve" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" authors = ["SciML"] -version = "1.7.0" +version = "1.8.0" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" @@ -27,7 +27,7 @@ IterativeSolvers = "0.9.2" KLU = "0.2.3" Krylov = "0.7.9" KrylovKit = "0.5" -RecursiveFactorization = "0.2" +RecursiveFactorization = "0.2.8" Reexport = "1" Requires = "1" SciMLBase = "1.25" @@ -44,3 +44,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] test = ["Test", "Pardiso", "Pkg", "Random", "SafeTestsets"] + diff --git a/src/factorization.jl b/src/factorization.jl index 339dde9f3..457b3ef0d 100644 --- a/src/factorization.jl +++ b/src/factorization.jl @@ -224,6 +224,12 @@ end ## RFLUFactorization -RFLUFactorization() = GenericFactorization(;fact_alg=RecursiveFactorization.lu!) +struct RFWrapper{P,T} + RFWrapper(::Val{P},::Val{T}) where {P,T} = new{P,T}() +end +(::RFWrapper{P,T})(A) where {P,T} = RecursiveFactorization.lu!(A,Val(P),Val(T)) + +RFLUFactorization(;pivot = Val(true), thread = Val(true)) = GenericFactorization(;fact_alg=RFWrapper(pivot,thread)) + init_cacheval(alg::GenericFactorization{typeof(RecursiveFactorization.lu!)}, A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose) = ArrayInterface.lu_instance(convert(AbstractMatrix,A)) 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))