Ingo Gaertner <[email protected]> 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?

Attachment: signature.asc
Description: PGP signature

Reply via email to