# 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
 `Mat`, `MatGetLocalSubMatrix()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatRestoreLocalSubMatrix">src/mat/interface/matrix.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex28.c.html">src/snes/tutorials/ex28.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex14.c.html">src/ts/tutorials/ex14.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/nest/matnest.c.html#MatRestoreLocalSubMatrix_Nest">MatRestoreLocalSubMatrix_Nest in src/mat/impls/nest/matnest.c</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
