# 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
 [](chapter_unstructured), `DM`, `DMPLEX`, `PetscPartitioner`,`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)  
