Skip to main content
`Ctrl`+`K`

# PetscSFComputeMultiRootOriginalNumbering

Returns original numbering of multi-roots (roots of multi-`PetscSF` returned by `PetscSFGetMultiSF()`). Each multi-root is assigned index of the corresponding original root.

## Synopsis

    #include "petscsf.h"
    PetscErrorCode PetscSFComputeMultiRootOriginalNumbering(PetscSF sf, const PetscInt degree[], PetscInt *nMultiRoots, PetscInt *multiRootsOrigNumbering[])

Collective

## Input Parameters

- sf - star forest

- degree - degree of each root vertex, computed with `PetscSFComputeDegreeBegin()` and `PetscSFComputeDegreeEnd()`

## Output Parameters

- nMultiRoots - (optional) number of multi-roots (roots of multi-`PetscSF`)

- multiRootsOrigNumbering - original indices of multi-roots; length of this array is `nMultiRoots`

## Note

The returned array `multiRootsOrigNumbering` should be destroyed with `PetscFree()` when no longer needed.

## See Also

PetscSF - an alternative to low-level MPI calls for data communication, `PetscSF`, `PetscSFComputeDegreeBegin()`, `PetscSFComputeDegreeEnd()`, `PetscSFGetMultiSF()`

## Level

developer

## Location

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

## Examples

src/vec/is/sf/tutorials/ex1.c

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