# PetscSortSplitReal
Quick-sort split of an array of `PetscReal`s in place. 
## Synopsis
```
#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



## Input/Output Parameters

- ***a     -*** array of values, on output the values are permuted 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   -*** index for array a, on output permuted accordingly





## See Also
 `PetscSortInt()`, `PetscSortRealWithPermutation()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/utils/sortd.c.html#PetscSortSplitReal">src/sys/utils/sortd.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/utils/sortd.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
