From 12fbcefb334025e0ec93d0e69bacec1658cdce96 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 4 Dec 2023 16:57:08 -0500 Subject: [PATCH] Handle cholesky --- Project.toml | 2 +- src/factorization.jl | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index fba07d804..b8aec3744 100644 --- a/Project.toml +++ b/Project.toml @@ -102,8 +102,8 @@ SciMLOperators = "0.3" Setfield = "1" SparseArrays = "1.9" Sparspak = "0.3.6" -Test = "1" StaticArraysCore = "1" +Test = "1" UnPack = "1" julia = "1.9" diff --git a/src/factorization.jl b/src/factorization.jl index 5eba6ffb2..c66e6ed94 100644 --- a/src/factorization.jl +++ b/src/factorization.jl @@ -10,7 +10,7 @@ end _ldiv!(x, A, b) = ldiv!(x, A, b) -_ldiv!(x::MVector, A, b::SVector) = (x .= A \ b) +_ldiv!(x, A, b::SVector) = (x .= A \ b) _ldiv!(::SVector, A, b::SVector) = (A \ b) function _ldiv!(x::Vector, A::Factorization, b::Vector) @@ -285,6 +285,12 @@ else end end +function init_cacheval(alg::CholeskyFactorization, A::SMatrix, b, u, Pl, Pr, + maxiters::Int, abstol, reltol, verbose::Bool, + assumptions::OperatorAssumptions) + cholesky(A) # StaticArrays doesn't have the pivot argument. Prevent generic fallback. +end + function init_cacheval(alg::CholeskyFactorization, A, b, u, Pl, Pr, maxiters::Int, abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions)