:orphan:
# MatRestoreRowIJ
Call after you are completed with the ia,ja indices obtained with `MatGetRowIJ()`. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatRestoreRowIJ(Mat mat, PetscInt shift, PetscBool symmetric, PetscBool inodecompressed, PetscInt *n, const PetscInt *ia[], const PetscInt *ja[], PetscBool *done)
```
Collective


## Input Parameters

- ***mat -*** the matrix
- ***shift -*** 1 or zero indicating we want the indices starting at 0 or 1
- ***symmetric -*** `PETSC_TRUE` or `PETSC_FALSE` indicating the matrix data structure should be symmetrized
- ***inodecompressed -*** `PETSC_TRUE` or `PETSC_FALSE` indicating if the nonzero structure of the
inodes or the nonzero elements is wanted. For `MATBAIJ` matrices the compressed version is
always used.
- ***n -*** size of (possibly compressed) matrix
- ***ia -*** the row pointers
- ***ja -*** the column indices



## Output Parameter

- ***done -*** `PETSC_TRUE` or `PETSC_FALSE` indicated that the values have been returned





## Note
This routine zeros out `n`, `ia`, and `ja`. This is to prevent accidental
us of the array after it has been restored. If you pass `NULL`, it will
not zero the pointers.  Use of ia or ja after `MatRestoreRowIJ()` is invalid.


## Fortran Note
`MatRestoreRowIJ()` Fortran binding is deprecated (since PETSc 3.19), use `MatRestoreRowIJF90()`


## See Also
 [](ch_matrices), `Mat`, `MatGetRowIJ()`, `MatRestoreRowIJF90()`, `MatRestoreColumnIJ()`

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/adj/mpi/mpiadj.c.html#MatRestoreRowIJ_MPIAdj">MatRestoreRowIJ_MPIAdj in src/mat/impls/adj/mpi/mpiadj.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/mpi/mpiaij.c.html#MatRestoreRowIJ_MPIAIJ">MatRestoreRowIJ_MPIAIJ in src/mat/impls/aij/mpi/mpiaij.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/aij.c.html#MatRestoreRowIJ_SeqAIJ">MatRestoreRowIJ_SeqAIJ in src/mat/impls/aij/seq/aij.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/baij/seq/baij.c.html#MatRestoreRowIJ_SeqBAIJ">MatRestoreRowIJ_SeqBAIJ in src/mat/impls/baij/seq/baij.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/sbaij/seq/sbaij.c.html#MatRestoreRowIJ_SeqSBAIJ">MatRestoreRowIJ_SeqSBAIJ in src/mat/impls/sbaij/seq/sbaij.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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
