[petsc-users] Hash Function for PETSc Sparse Matrices

K. N. Ramachandran knram06 at gmail.com
Mon Dec 5 14:47:19 CST 2016


Hello PETSc-Users,

I am working on an application where we capture the A matrix in a linear
system Ax=b, which is solved using Petsc. Let us also say that the matrix A
can change after a few iterations. We want to capture only the changed
matrices and simply avoid the duplicate ones.

I was considering using (or defining) a Set-like data structure that stores
only the Mat objects which have changed entries. So a hash function that
can operate on a sparse matrix would be pretty useful here.

This seems like a common enough use case and I was wondering if anyone can
give their inputs on defining a hash function that can operate on sparse
matrices. One such link I had found online is:
http://stackoverflow.com/questions/10638373/suitable-hash-function-for-matrix-sparsity-pattern

Any thoughts or comments would be great here.


Thanking You,
Ramachandran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161205/9a9b0aba/attachment.html>


More information about the petsc-users mailing list