# MatISGetLocalMat
Gets the local matrix stored inside a `MATIS` matrix. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatISGetLocalMat(Mat mat, Mat *local)
```

## Input Parameter

- ***mat -*** the matrix



## Output Parameter

- ***local -*** the local matrix





## Notes
This can be called if you have precomputed the nonzero structure of the
matrix and want to provide it to the inner matrix object to improve the performance
of the `MatSetValues()` operation.

Call `MatISRestoreLocalMat()` when finished with the local matrix.


## See Also
 `MATIS`, `MatISRestoreLocalMat()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/is/matis.c.html#MatISGetLocalMat">src/mat/impls/is/matis.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex59.c.html">src/ksp/ksp/tutorials/ex59.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex71.c.html">src/ksp/ksp/tutorials/ex71.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/is/matis.c.html#MatISGetLocalMat_IS">MatISGetLocalMat_IS in src/mat/impls/is/matis.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/is/matis.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)  
