petsc-3.7.1 2016-05-15
Report Typos and Errors

# MatAXPY

Computes Y = a*X + Y.

### Synopsis

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

Logically Collective on Mat Many br

### Input Parameters

| a | - the scalar multiplier Many br
| X | - the first matrix Many br
| Y | - the second matrix Many br
| str | - either SAME_NONZERO_PATTERN, DIFFERENT_NONZERO_PATTERN Many bror SUBSET_NONZERO_PATTERN (nonzeros of X is a subset of Y's) Many br

Many br

### Keywords

matrix, add

### See Also

MatAYPX()

Level:intermediate
Location:src/mat/utils/axpy.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex58.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html