:orphan:
# ISInvertPermutation
Creates a new permutation that is the inverse of a given permutation.
## Synopsis
```
#include "petscis.h"
PetscErrorCode ISInvertPermutation(IS is, PetscInt nlocal, IS *isout)
```
Collective
## Input Parameters
- ***is -*** the index set
- ***nlocal -*** number of indices on this processor in result (ignored for 1 processor) or
use `PETSC_DECIDE`
## Output Parameter
- ***isout -*** the inverse permutation
## Note
For parallel index sets this does the complete parallel permutation, but the
code is not efficient for huge index sets (10,000,000 indices).
## See Also
`IS`, `ISGetInfo()`, `ISSetPermutation()`, `ISGetPermutation()`
## Level
intermediate
## Location
src/vec/is/is/interface/index.c
## Implementations
ISInvertPermutation_Block in src/vec/is/is/impls/block/block.c
ISInvertPermutation_General in src/vec/is/is/impls/general/general.c
ISInvertPermutation_Stride in src/vec/is/is/impls/stride/stride.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/is/interface/index.c)
[Index of all IS routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)