# 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 on IS


## Input Parameters

- ***is -*** the index set
- ***nlocal -*** number of indices on this processor in result (ignored for 1 proccessor) or
use PETSC_DECIDE



## Output Parameter

- ***isout -*** the inverse permutation





## Notes
For parallel index sets this does the complete parallel permutation, but the
code is not efficient for huge index sets (10,000,000 indices).


## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/interface/index.c.html#ISInvertPermutation">src/vec/is/is/interface/index.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/impls/block/block.c.html#ISInvertPermutation_Block">ISInvertPermutation_Block in src/vec/is/is/impls/block/block.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/impls/general/general.c.html#ISInvertPermutation_General">ISInvertPermutation_General in src/vec/is/is/impls/general/general.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/impls/stride/stride.c.html#ISInvertPermutation_Stride">ISInvertPermutation_Stride in src/vec/is/is/impls/stride/stride.c</A><BR>


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