# PetscSFGetMultiSF
gets the inner `PetscSF` implementing gathers and scatters 
## Synopsis
```
#include "petscsf.h" 
PetscErrorCode PetscSFGetMultiSF(PetscSF sf, PetscSF *multi)
```
Collective


## Input Parameter

- ***sf -*** star forest that may contain roots with 0 or with more than 1 vertex



## Output Parameter

- ***multi -*** star forest with split roots, such that each root has degree exactly 1





## Note
In most cases, users should use `PetscSFGatherBegin()` and `PetscSFScatterBegin()` instead of manipulating multi
directly. Since multi satisfies the stronger condition that each entry in the global space has exactly one incoming
edge, it is a candidate for future optimization that might involve its removal.


## See Also
 `PetscSF`, `PetscSFSetGraph()`, `PetscSFGatherBegin()`, `PetscSFScatterBegin()`, `PetscSFComputeMultiRootOriginalNumbering()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/interface/sf.c.html#PetscSFGetMultiSF">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)  
