# 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




## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex76.c.html">src/ksp/ksp/tutorials/ex76.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/impls/block/block.c.html#ISLocate_Block">ISLocate_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#ISLocate_General">ISLocate_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#ISLocate_Stride">ISLocate_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)  
