:orphan:
# MatPartitioningPTScotchSetStrategy
Sets the strategy to be used in PTScotch.
## Synopsis
```
#include "petscmat.h"
PetscErrorCode MatPartitioningPTScotchSetStrategy(MatPartitioning part, MPPTScotchStrategyType strategy)
```
Collective
## Input Parameters
- ***part -*** the partitioning context
- ***strategy -*** the strategy, one of
```none
MP_PTSCOTCH_DEFAULT - Default behavior
MP_PTSCOTCH_QUALITY - Prioritize quality over speed
MP_PTSCOTCH_SPEED - Prioritize speed over quality
MP_PTSCOTCH_BALANCE - Enforce load balance
MP_PTSCOTCH_SAFETY - Avoid methods that may fail
MP_PTSCOTCH_SCALABILITY - Favor scalability as much as possible
```
## Options Database Key
- ***-mat_partitioning_ptscotch_strategy [quality,speed,balance,safety,scalability] -*** strategy
## Note
The default is `MP_SCOTCH_QUALITY`. See the PTScotch documentation for more information.
## See Also
`MATPARTITIONINGSCOTCH`, `MatPartitioningPTScotchSetImbalance()`, `MatPartitioningPTScotchGetStrategy()`
## Level
advanced
## Location
src/mat/partition/impls/scotch/scotch.c
## Implementations
MatPartitioningPTScotchSetStrategy_PTScotch in src/mat/partition/impls/scotch/scotch.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/partition/impls/scotch/scotch.c)
[Index of all MatOrderings routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)