dolfinx
dolfinx copied to clipboard
Split pointers for diagonal and off-diagonal parts of MatrixCSR
For better compatibility with 3rd party libraries, it would be better to have the diagonal and off-diagonal blocks of the sparse matrix in MatrixCSR stored separately. The data structures would be the same, just two instead of one, and the storage should not be any more.
@chrisrichardson has this been completed?
No. I am also not convinced it is always the right solution. Some solvers use a unified format, some split. I have got a working prototype (split format) so maybe we can work on having both available via an option or subclassing.
https://github.com/FEniCS/dolfinx/tree/chris/matrixcsr-bs-experiment
Splitting the matrix would make wrapping sparse matrices locally using SciPy more difficult.
I agree. I think we should consider supporting both formats internally.