# PetscSFGetGroups
gets incoming and outgoing process groups 
## Synopsis
```
#include "petscsf.h" 
PetscErrorCode PetscSFGetGroups(PetscSF sf, MPI_Group *incoming, MPI_Group *outgoing)
```
Collective


## Input Parameter

- ***sf -*** star forest



## Output Parameters

- ***incoming -*** group of origin processes for incoming edges (leaves that reference my roots)
- ***outgoing -*** group of destination processes for outgoing edges (roots that I reference)





## See Also
 `PetscSF`, `PetscSFGetWindow()`, `PetscSFRestoreWindow()`

## Level
developer

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


---
[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)  
