:orphan: # MatScatterSetVecScatter sets the scatter that the matrix is to apply as its linear operator in a `MATSCATTER` ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatScatterSetVecScatter(Mat mat, VecScatter scatter) ``` Logically Collective ## Input Parameters - ***mat -*** the `MATSCATTER` matrix - ***scatter -*** the scatter context create with `VecScatterCreate()` ## See Also [](ch_matrices), `Mat`, `MATSCATTER`, `MatCreateScatter()`, `MATSCATTER` ## Level advanced ## Location src/mat/impls/scatter/mscatter.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/scatter/mscatter.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)