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
244 stars 52 forks source link

Introduce AbstractSparseFactorization and AbstractDenseFactorization #526

Closed j-fu closed 3 weeks ago

j-fu commented 3 weeks ago

Both are subtypes of AbstractFactorization.

This allows to set default_alias_A=true for sparse factorizations (which just cannot overwrite A anyway). This allows to create the cache parametrized with the original matrix type and we can use reinit!(cache;A) or cache.A=A if A is an AbstractSparseMatrixCSC, like with Krylov solvers.

Before, due to https://github.com/SciML/LinearSolve.jl/pull/525, these methods would require a SparseMatrixCSC, even if the Problem was created with a AbstractSparseMatrixCSC.

Checklist

Additional context

Add any other context about the problem here.