:orphan:
# ISIdentity
Determines whether index set is the identity mapping. 
## Synopsis
```
#include "petscis.h" 
PetscErrorCode ISIdentity(IS is, PetscBool *ident)
```
Collective


## Input Parameter

- ***is -*** the index set



## Output Parameter

- ***ident -*** `PETSC_TRUE` if an identity, else `PETSC_FALSE`





## Note
If `ISSetIdentity()` (or `ISSetInfo()` for a permanent property) has been called,
`ISIdentity()` will return its answer without communication between processes, but
otherwise the output ident will be computed from `ISGetInfo()`,
which may require synchronization on the communicator of `is`.  To avoid this computation,
call `ISGetInfo()` directly with the compute flag set to `PETSC_FALSE`, and ident will be assumed false.


## See Also
 `IS`, `ISSetIdentity()`, `ISGetInfo()`

## Level
intermediate

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


---
[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)  
