Skip to main content
`Ctrl`+`K`

# ISSorted

Checks the indices to determine whether they have been sorted.

## Synopsis

    #include "petscis.h"
    PetscErrorCode ISSorted(IS is, PetscBool *flg)

Not 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.

## Note

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

## See Also

`ISSort()`, `ISSortRemoveDups()`

## Level

intermediate

## Location

src/vec/is/is/interface/index.c

## Implementations

ISSorted_Block() in src/vec/is/is/impls/block/block.c
ISSorted_General() in src/vec/is/is/impls/general/general.c
ISSorted_Stride() in src/vec/is/is/impls/stride/stride.c

Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages