SparseMatrix
We provide a simple class that handles the local tensor products that are added to the Operator class. The SparseMatrix class only provides a minimal amount of functionality as all linear algebra routines should be executed by LAPACK libraries like MKL or Petsc/Slepc if you want to exploit the sparsity of an operator. The class does neither support openMP nor MPI.
It only contains three data members, dim, range, and data, that provide full access to the matrix in the following way:
for(uint64_t i = 0UL; i < dim; i++){
for(uint64_t j = range[i]; j < range[i+1]; j++){
std::cout << "Element at (" << i << "," << data[j].first << "): " << data[j].second;
}
}