# PetscSFComputeMultiRootOriginalNumbering
Returns original numbering of multi-roots (roots of multi-SF 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()`/`PetscSFComputeDegreeEnd()`



## Output Parameters

- ***nMultiRoots -*** (optional) number of multi-roots (roots of multi-SF)
- ***multiRootsOrigNumbering -*** original indices of multi-roots; length of this array is nMultiRoots





## Note
The returned array multiRootsOrigNumbering is newly allocated and should be destroyed with `PetscFree()` when no longer needed.


## See Also
 `PetscSF`, `PetscSFComputeDegreeBegin()`, `PetscSFComputeDegreeEnd()`, `PetscSFGetMultiSF()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/interface/sf.c.html#PetscSFComputeMultiRootOriginalNumbering">src/vec/is/sf/interface/sf.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/tutorials/ex1.c.html">src/vec/is/sf/tutorials/ex1.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/sf/interface/sf.c)


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