:orphan:
# MatScatterGetVecScatter
Returns the user-provided scatter set with `MatScatterSetVecScatter()` in a `MATSCATTER` matrix 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatScatterGetVecScatter(Mat mat, VecScatter *scatter)
```
Logically Collective


## Input Parameter

- ***mat -*** the matrix, should have been created with MatCreateScatter() or have type `MATSCATTER`



## Output Parameter

- ***scatter -*** the scatter context





## See Also
 [](ch_matrices), `Mat`, `MATSCATTER`, `MatCreateScatter()`, `MatScatterSetVecScatter()`, `MATSCATTER`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/scatter/mscatter.c.html#MatScatterGetVecScatter">src/mat/impls/scatter/mscatter.c</A>


---
[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)  
