SparseMatrix is a small C++ class to represent a sparse square matrix in compressed row format. It's very useful for FEM codes when coupled with a decent matrix solver (eg. Algebraic Multigrid Method).
The SparseMatrix class stores matrix entries in compressed row format. That is, each each diagonal element is stored together with any non-zero off-diagonal elements. This makes it very memory efficient for storing large sparse matrices such as those used in the finite element method.
I wrote this class as part of a job interview and thought I'd add open source it so that others might benefit. Much of the API is commented in Doxygen format, and the class is templated for flexibility. A very basic solve method is also included for testing purposes.
Testing is performed via googletest, which you need to download and unzip into the main directory.
Hope it helps!
This software is released under the terms and conditions of The MIT License. Please see the license.txt file for more details.