:orphan:
# MatPartitioningImprove
Improves the quality of a given partition.
## Synopsis
```
#include "petscmat.h"
PetscErrorCode MatPartitioningImprove(MatPartitioning matp, IS *partitioning)
```
Collective
## Input Parameters
- ***matp -*** the matrix partitioning object
- ***partitioning -*** the original partitioning. For each local node this tells the processor
number that that node is assigned to.
## Options Database Key
- ***-mat_partitioning_improve -*** improve the quality of the given partition
## See Also
[](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningType`, `MatPartitioningApply()`, `MatPartitioningCreate()`,
`MatPartitioningDestroy()`, `MatPartitioningSetAdjacency()`, `ISPartitioningToNumbering()`,
`ISPartitioningCount()`
## Level
beginner
## Location
src/mat/partition/partition.c
## Implementations
MatPartitioningImprove_Hierarchical in src/mat/partition/impls/hierarchical/hierarchical.c
MatPartitioningImprove_Parmetis in src/mat/partition/impls/pmetis/pmetis.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/partition/partition.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)