petsc-master 2017-04-20
Report Typos and Errors


Quick-sort split of an array of PetscReals in place.


#include "petscsys.h"  
PetscErrorCode  PetscSortSplitReal(PetscInt ncut,PetscInt n,PetscReal a[],PetscInt idx[])
Not Collective

Input Parameters

ncut - splitig index
n - number of values to sort
a - array of values in PetscReal
idx - index for array a

Output Parameters

a - permuted array of real values such that its elements satisfy: abs(a[i]) >= abs(a[ncut-1]) for i < ncut and abs(a[i]) <= abs(a[ncut-1]) for i >= ncut
idx - permuted index of array a

See Also

PetscSortInt(), PetscSortRealWithPermutation()

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