MatAYPX#

Computes Y = a*Y + X.

Synopsis#

#include "petscmat.h"  
PetscErrorCode MatAYPX(Mat Y, PetscScalar a, Mat X, MatStructure str)

Logically Collective

Input Parameters#

Note#

X and Y may be the same matrix, in which case this computes Y = (a + 1) * Y. Passing an X that merely shares storage with Y (for example a MATTRANSPOSEVIRTUAL wrapping Y) is not supported and gives an undefined result.

See Also#

Matrices, Mat, MatAXPY()

Level#

intermediate

Location#

src/mat/utils/axpy.c

Examples#

src/ksp/ksp/tutorials/ex77.c
src/ksp/ksp/tutorials/ex77f.F90
src/ksp/ksp/tutorials/ex76.c


Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages