:orphan: # MatMatRestrict Y = A*X or A'*X ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatMatRestrict(Mat A, Mat x, Mat *y) ``` Neighbor-wise Collective ## Input Parameters - ***mat -*** the matrix - ***x -*** the input dense matrix ## Output Parameter - ***y -*** the output dense matrix ## Note This allows one to use either the restriction or interpolation (its transpose) matrix to do the restriction. y matrix can be reused if already created with the proper sizes, otherwise it will be recreated. y must be initialized to `NULL` if not supplied. ## See Also [](ch_matrices), `Mat`, `MatRestrict()`, `MatInterpolate()`, `MatMatInterpolate()`, `PCMG` ## Level intermediate ## Location src/mat/interface/matrix.c --- [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)