SciML / LinearSolve.jl

LinearSolve.jl: High-Performance Unified Interface for Linear Solvers in Julia. Easily switch between factorization and Krylov methods, add preconditioners, and all in one interface.
https://docs.sciml.ai/LinearSolve/stable/
Other
245 stars 52 forks source link

Use AbstractSparseMatrixCSC for sparse factorizations #273

Closed j-fu closed 1 year ago

j-fu commented 1 year ago

This e.g. would allow to supply a matrix type with multithreaded factorization etc. Would solve #190.

However, see https://github.com/JuliaSparse/SparseArrays.jl/issues/265 .

codecov[bot] commented 1 year ago

Codecov Report

Merging #273 (82da413) into main (a7b7d2b) will decrease coverage by 35.12%. The diff coverage is 47.05%.

@@             Coverage Diff             @@
##             main     #273       +/-   ##
===========================================
- Coverage   70.97%   35.86%   -35.12%     
===========================================
  Files          14       11        -3     
  Lines         858      764       -94     
===========================================
- Hits          609      274      -335     
- Misses        249      490      +241     
Impacted Files Coverage Δ
src/LinearSolve.jl 60.00% <ø> (-36.56%) :arrow_down:
src/factorization.jl 33.63% <46.66%> (-49.49%) :arrow_down:
src/default.jl 38.55% <50.00%> (-15.67%) :arrow_down:
src/factorization_sparse.jl 0.00% <0.00%> (-100.00%) :arrow_down:
ext/LinearSolveHYPRE.jl 0.00% <0.00%> (-92.60%) :arrow_down:
src/preconditioners.jl 21.42% <0.00%> (-58.58%) :arrow_down:
src/solve_function.jl 63.63% <0.00%> (-36.37%) :arrow_down:
src/iterative_wrappers.jl 53.88% <0.00%> (-23.44%) :arrow_down:
... and 5 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

ChrisRackauckas commented 1 year ago

Anywhere that assumes it's a sparsematrixcsc should not remove the conversion because that could concrete things like MatrixOperators of SparseMatrixCSC. For things that are already concrete matrices it should be a no-op so that's fine, and then afterwards it should assert it's an AbstractSparseMatrixCSC and use the sparse matrix functions on it.

j-fu commented 1 year ago

:+1:

j-fu commented 1 year ago

Hi,I think we need a version update for LinearSolvePardiso.jl as well to bring this in place there.

ChrisRackauckas commented 1 year ago

It should probably be changed into an extension package in the near future.