# ISSorted
Checks the indices to determine whether they have been sorted. 
## Synopsis
```
#include "petscis.h" 
PetscErrorCode ISSorted(IS is, PetscBool *flg)
```
Collective


## Input Parameter

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



## Output Parameter

- ***flg -*** output flag, either PETSC_TRUE if the index set is sorted,
or PETSC_FALSE otherwise.



## Notes
For parallel IS objects this only indicates if the local part of the IS
is sorted. So some processors may return PETSC_TRUE while others may
return PETSC_FALSE.




## See Also
 `ISSort()`, `ISSortRemoveDups()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/interface/index.c.html#ISSorted">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#ISSorted_Block">ISSorted_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#ISSorted_General">ISSorted_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#ISSorted_Stride">ISSorted_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)  
