Skip to main content
`Ctrl`+`K`

# PetscSFSetRankOrder

sort multi-points for gathers and scatters by MPI rank order

## Synopsis

    #include "petscsf.h"
    PetscErrorCode PetscSFSetRankOrder(PetscSF sf, PetscBool flg)

Logically Collective

## Input Parameters

- sf - star forest

- flg - `PETSC_TRUE` to sort, `PETSC_FALSE` to skip sorting (false has a lower setup cost, but is non-deterministic)

## See Also

PetscSF - an alternative to low-level MPI calls for data communication, `PetscSF`, `PetscSFType`, `PetscSFGatherBegin()`, `PetscSFScatterBegin()`

## Level

advanced

## Location

src/vec/is/sf/interface/sf.c

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