#include "petscmat.h" PetscErrorCode MatShift(Mat Y,PetscScalar a)Neighbor-wise Collective on Mat
|Y||- the matrices|
|a||- the PetscScalar|
Notes: If the matrix Y is missing some diagonal entries this routine can be very slow. To make it fast one should initially fill the matrix so that all diagonal entries have a value (with a value of zero for those locations that would not have an entry).
Developers Note: If the local "diagonal part" of the matrix Y has no entries then the local diagonal part is preallocated with 1 nonzero per row for the to be added values. This allows for fast shifting of an empty matrix.
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages