[petsc-users] Off-diagonal matrix-vector product y=(A-diag(A))x

Jed Brown jed at jedbrown.org
Fri Apr 14 12:38:18 CDT 2017

Barry Smith <bsmith at mcs.anl.gov> writes:

>    You can do MatGetDiagonal() then do a MatMult() followed by
>    subtracting a VecPointsizeMult(). 

I would use VecPointsizeMult followed by MatMultAdd.  One fewer
traversal of a vector.
-------------- 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/28f90ab8/attachment.pgp>

More information about the petsc-users mailing list