:orphan:
# DMLabelGather
Gather all label values from leafs into roots 
## Synopsis
```
#include "petscdmlabel.h"   
#include "petscsection.h"   
PetscErrorCode DMLabelGather(DMLabel label, PetscSF sf, DMLabel *labelNew)
```
Collective


## Input Parameters

- ***label -*** the `DMLabel`
- ***sf -*** the `PetscSF` communication map



## Output Parameter

- ***labelNew -*** the new `DMLabel` with localised leaf values





## Note
This is the inverse operation to `DMLabelDistribute()`.


## See Also
 `DMLabel`, `DM`, `DMLabelDistribute()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/label/dmlabel.c.html#DMLabelGather">src/dm/label/dmlabel.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/label/dmlabel.c)


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