Skip to content

Commit

Permalink
Merge pull request #94 from SciML/rf_options
Browse files Browse the repository at this point in the history
Add RecursiveFactorization options
  • Loading branch information
ChrisRackauckas authored Jan 20, 2022
2 parents 3a1c60e + 645aa8f commit d813c63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand All @@ -44,3 +44,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Pardiso", "Pkg", "Random", "SafeTestsets"]

8 changes: 7 additions & 1 deletion src/factorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit d813c63

Please sign in to comment.