:orphan:
# MatInterpolateAdd
w = y + A*x or A'*x depending on the shape of the matrix 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatInterpolateAdd(Mat A, Vec x, Vec y, Vec w)
```
Neighbor-wise Collective


## Input Parameters

- ***mat   -*** the matrix
- ***x -*** the vector to be multiplied by the interpolation operator
- ***y -*** the vector to be added to the result



## Output Parameter

- ***w -*** the resulting vector





## Notes
`w` may be the same vector as `y`.

This allows one to use either the restriction or interpolation (its transpose)
matrix to do the interpolation


## See Also
 [](ch_matrices), `Mat`, `MatMultAdd()`, `MatMultTransposeAdd()`, `MatRestrict()`, `PCMG`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatInterpolateAdd">src/mat/interface/matrix.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
