# PCGASMGetSubmatrices
Gets the local submatrices (for this MPI rank only) for the `PCGASM` additive Schwarz preconditioner. 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCGASMGetSubmatrices(PC pc, PetscInt *n, Mat *mat[])
```
Not Collective


## Input Parameter

- ***pc -*** the preconditioner context



## Output Parameters

- ***n   -*** the number of matrices for this MPI rank (default value = 1)
- ***mat -*** the matrices



## Note
Matrices returned by this routine have the same communicators as the index sets (IS)
used to define subdomains in `PCGASMSetSubdomains()`




## See Also
 `PCGASM`, `PCGASMSetOverlap()`, `PCGASMGetSubKSP()`,
`PCGASMCreateSubdomains2D()`, `PCGASMSetSubdomains()`, `PCGASMGetSubdomains()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gasm/gasm.c.html#PCGASMGetSubmatrices">src/ksp/pc/impls/gasm/gasm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/gasm/gasm.c)


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