[petsc-users] Hash Function for PETSc Sparse Matrices

Jed Brown jed at jedbrown.org
Mon Dec 5 20:14:34 CST 2016


"K. N. Ramachandran" <knram06 at gmail.com> writes:

> 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.

You want to use the hash function to identify duplicate sparsity
structures?  Or what?

> 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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161205/aa9a2658/attachment.pgp>


More information about the petsc-users mailing list