From c8988ca898c8726b98406908478c46e7bfa12bf2 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Wed, 19 Jan 2022 11:32:46 -0500 Subject: [PATCH 1/4] Add RecursiveFactorization options Requires https://github.com/YingboMa/RecursiveFactorization.jl/pull/39 --- Project.toml | 2 +- src/factorization.jl | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 2838ce3b8..36b55011c 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/factorization.jl b/src/factorization.jl index 339dde9f3..04fa65f39 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)) From a5d7c1ab1f694aad5735589753b0f1ff9496cc42 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Wed, 19 Jan 2022 11:33:28 -0500 Subject: [PATCH 2/4] minor version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 36b55011c..3489900a1 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" From 1095a69dfaeadf4c9ef073d2bf7899997412dda7 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 19 Jan 2022 19:22:19 -0500 Subject: [PATCH 3/4] Update Project.toml --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index 3489900a1..defd6b346 100644 --- a/Project.toml +++ b/Project.toml @@ -44,3 +44,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] test = ["Test", "Pardiso", "Pkg", "Random", "SafeTestsets"] + From aa8daf6a02f4e9bfa5f68e316ccec971063e39bc Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Wed, 19 Jan 2022 19:32:25 -0500 Subject: [PATCH 4/4] fix typo --- src/factorization.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/factorization.jl b/src/factorization.jl index 04fa65f39..457b3ef0d 100644 --- a/src/factorization.jl +++ b/src/factorization.jl @@ -227,7 +227,7 @@ end 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)) +(::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))