:orphan:
# DMPlexGetGatherDM
Get a copy of the `DMPLEX` that gathers all points on the root process of the original's communicator. 
## Synopsis
```
#include "petscdmplex.h"   
#include "petscdmlabel.h"  
PetscErrorCode DMPlexGetGatherDM(DM dm, PetscSF *sf, DM *gatherMesh)
```
Collective


## Input Parameter

- ***dm -*** the original `DMPLEX` object



## Output Parameters

- ***sf -*** the `PetscSF` used for point distribution (optional)
- ***gatherMesh -*** the gathered `DM` object, or `NULL`





## See Also
 `DMPLEX`, `DM`, `PetscSF`, `DMPlexDistribute()`, `DMPlexGetRedundantDM()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexdistribute.c.html#DMPlexGetGatherDM">src/dm/impls/plex/plexdistribute.c</A>


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


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