#include "petscsys.h" PetscErrorCode PetscRealSortSemiOrdered(PetscInt n, PetscReal arr[])Not Collective
n | - number of values | |
arr | - array of PetscReals |
arr | - sorted array of integers |
This function serves as an alternative to PetscSortReal(). While this function works for any array of PetscReals it is significantly faster if the array is not totally random. There are exceptions to this and so it is __highly__ recommended that the user benchmark their code to see which routine is fastest.