BlockSparseMatrices.jl

BlockSparseMatrices.jl provides a representation for sparse matrices that are composed of a limited number of (dense) blocks. It also includes specialized algorithms for symmetric block‑sparse matrices, storing only the necessary half of the off‑diagonal blocks.

Key Features

  • Block‑sparse storage – the matrix is built from a small set of (dense) sub‑blocks.
  • Symmetric support – for symmetric block‑sparse matrices only the lower (or upper) triangular block‑structure is kept, reducing memory usage.
  • Multithreaded matrix–vector multiplication – leverages OhMyThreads and GraphsColoring for safe parallelism.

Implemented Operations

OperationDescription
* (matrix‑vector product)Fast, multithreaded multiplication.
transpose / adjointReturns the (adjoint) transpose of a block‑sparse matrix.
getindexAccess individual elements of the matrix.
setindex!Modify elements in‑place.
VisualizationVisual inspection via UnicodePlots.
sparseConvert to a standard SparseMatrixCSC from SparseArrays.

If you need alternative block‑matrix representations or additional functionality, consider: