:orphan:
# PCASMGetLocalSubmatrices
Gets the local submatrices (for this processor only) for the additive Schwarz preconditioner, `PCASM`. 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCASMGetLocalSubmatrices(PC pc, PetscInt *n, Mat *mat[])
```
Not Collective


## Input Parameter

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



## Output Parameters

- ***n -*** if requested, the number of matrices for this processor (default value = 1)
- ***mat -*** if requested, the matrices





## Notes
Call after `PCSetUp()` (or `KSPSetUp()`) but before `PCApply()` and before `PCSetUpOnBlocks()`)

Usually one would use `PCSetModifySubMatrices()` to change the submatrices in building the preconditioner.


## See Also
 `PCASM`, `PCASMSetTotalSubdomains()`, `PCASMSetOverlap()`, `PCASMGetSubKSP()`,
`PCASMCreateSubdomains2D()`, `PCASMSetLocalSubdomains()`, `PCASMGetLocalSubdomains()`, `PCSetModifySubMatrices()`

## Level
advanced

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


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


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