Skip to content

Commit

Permalink
Handle cholesky
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Dec 4, 2023
1 parent 72bc014 commit 12fbcef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

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

Check warning on line 14 in src/factorization.jl

View check run for this annotation

Codecov / codecov/patch

src/factorization.jl#L13-L14

Added lines #L13 - L14 were not covered by tests

function _ldiv!(x::Vector, A::Factorization, b::Vector)
Expand Down Expand Up @@ -285,6 +285,12 @@ else
end
end

function init_cacheval(alg::CholeskyFactorization, A::SMatrix, b, u, Pl, Pr,

Check warning on line 288 in src/factorization.jl

View check run for this annotation

Codecov / codecov/patch

src/factorization.jl#L288

Added line #L288 was not covered by tests
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
cholesky(A) # StaticArrays doesn't have the pivot argument. Prevent generic fallback.

Check warning on line 291 in src/factorization.jl

View check run for this annotation

Codecov / codecov/patch

src/factorization.jl#L291

Added line #L291 was not covered by tests
end

function init_cacheval(alg::CholeskyFactorization, A, b, u, Pl, Pr,
maxiters::Int, abstol, reltol, verbose::Bool,
assumptions::OperatorAssumptions)
Expand Down

0 comments on commit 12fbcef

Please sign in to comment.