MatPartitioningSetNParts — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# 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

- part - the partitioning context

- n - the number of partitions

## See Also

Matrices, `Mat`, `MatPartitioning`, `MatPartitioningCreate()`, `MatPartitioningApply()`

## Level

intermediate

## Location

src/mat/graphops/partition/partition.c

Index of all MatGraphOperations routines
Table of Contents for all manual pages
Index of all manual pages