:orphan: # MatPartitioningSetNParts Set how many partitions need to be created; by default this is one per processor. Certain partitioning schemes may in fact only support that option. ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatPartitioningSetNParts(MatPartitioning part, PetscInt n) ``` Collective ## Input Parameters - ***partitioning -*** the partitioning context - ***n -*** the number of partitions ## See Also [](ch_matrices), `Mat`, `MatPartitioning`, `MatPartitioningCreate()`, `MatPartitioningApply()` ## Level intermediate ## Location src/mat/partition/partition.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)