petsc-3.7.1 2016-05-15
Report Typos and Errors

# ISSortPermutation

calculate the permutation of the indices into a nondecreasing order.

### Synopsis

    #include "petscis.h"
    #undef  __FUNCT__
    #define __FUNCT__ "ISSortPermutation"
    PetscErrorCode ISSortPermutation(IS f,PetscBool always,IS *h)

Not collective. Many br

### Input arguments

| f | - IS to sort Many br
| always | - build the permutation even when f's indices are nondecreasin. Many br

### Output argument

h -permutation or NULL, if f is nondecreasing and always == PETSC_TRUE. Many br

Note: Indices in f are unchanged. f[h[i]] is the i-th smallest f index. Many brIf always == PETSC_FALSE, an extra check is peformed to see whether Many brthe f indices are nondecreasing. h is built on PETSC_COMM_SELF, since Many brthe permutation has a local meaning only. Many br

Many br

### See Also

ISLocalToGlobalMapping, ISSort(), PetscIntSortWithPermutation()

Level:advanced
Location:src/vec/is/is/utils/isdiff.c
Index of all IS routines
Table of Contents for all manual pages
Index of all manual pages