[petsc-users] Off-diagonal matrix-vector product y=(A-diag(A))x
Jed Brown
jed at jedbrown.org
Fri Apr 14 09:50:10 CDT 2017
Ingo Gaertner <ingogaertner.tus at gmail.com> writes:
> Does PETSc include an efficient implementation for the operation
> y=(A-diag(A))x or y_i=\sum_{j!=i}A_{ij}x_j on a sparse matrix A?
>
> In words, I need a matrix-vector product after the matrix diagonal has been
> set to zero. For efficiency reasons I can't copy and modify the matrix or
> first calculate the full product and then subtract the diagonal
> contribution.
How many entries per row in your matrix? There isn't a special function
for this, but I'm skeptical that the performance gains of a custom
implementation would be significant. Do you have a profile showing that
it is?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170414/5172dbf8/attachment.pgp>
More information about the petsc-users
mailing list