# DMPlexSetPartitioner
Set the mesh partitioner 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexSetPartitioner(DM dm, PetscPartitioner part)
```
logically collective on DM


## Input Parameters

- ***dm -*** The DM
- ***part -*** The partitioner




Note: Any existing PetscPartitioner will be destroyed.


## See Also
`DMPlexDistribute()`, `DMPlexGetPartitioner()`, `PetscPartitionerCreate()`

## Level
developer

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


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


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