:orphan:
# ISLocate
determine the location of an index within the local component of an index set
## Synopsis
```
#include "petscis.h"
PetscErrorCode ISLocate(IS is, PetscInt key, PetscInt *location)
```
Not Collective
## Input Parameters
- ***is -*** the index set
- ***key -*** the search key
## Output Parameter
- ***location -*** if >= 0, a location within the index set that is equal to the key, otherwise the key is not in the index set
## See Also
`IS`
## Level
intermediate
## Location
src/vec/is/is/interface/index.c
## Examples
src/ksp/ksp/tutorials/ex19.c
src/ksp/ksp/tutorials/ex76.c
## Implementations
ISLocate_Block in src/vec/is/is/impls/block/block.c
ISLocate_General in src/vec/is/is/impls/general/general.c
ISLocate_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)