# PetscPartitionerShellSetRandom
Set the flag to use a random partition 
## Synopsis
```
#include "petscpartitioner.h" 
PetscErrorCode PetscPartitionerShellSetRandom(PetscPartitioner part, PetscBool random)
```
Collective on PetscPartitioner


## Input Parameters

- ***part   -*** The PetscPartitioner
- ***random -*** The flag to use a random partition





## See Also
`PetscPartitionerShellGetRandom()`, `PetscPartitionerCreate()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/partitioner/impls/shell/partshell.c.html#PetscPartitionerShellSetRandom">src/dm/partitioner/impls/shell/partshell.c</A>


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


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