:orphan:
# MatRestoreLocalSubMatrix
Restores a reference to a submatrix specified in local numbering obtained with `MatGetLocalSubMatrix()`
## Synopsis
```
#include "petscmat.h"
PetscErrorCode MatRestoreLocalSubMatrix(Mat mat, IS isrow, IS iscol, Mat *submat)
```
Not Collective
## Input Parameters
- ***mat -*** matrix to extract local submatrix from
- ***isrow -*** local row indices for submatrix
- ***iscol -*** local column indices for submatrix
- ***submat -*** the submatrix
## See Also
[](ch_matrices), `Mat`, `MatGetLocalSubMatrix()`
## Level
intermediate
## Location
src/mat/interface/matrix.c
## Examples
src/snes/tutorials/ex28.c
src/ts/tutorials/ex14.c
## Implementations
MatRestoreLocalSubMatrix_Nest in src/mat/impls/nest/matnest.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)