# MatPartitioningSetPartitionWeights

Sets the weights for each partition.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode PETSCMAT_DLLEXPORT MatPartitioningSetPartitionWeights(MatPartitioning part,const PetscReal weights[])

Collective on Partitioning

### Input Parameters

| part | - the partitioning context
| weights | - the weights

### Notes

The array weights is freed by PETSc so the user should not free the array. In C/C++ the array must be obtained with a call to PetscMalloc(), not malloc().

### Keywords

Partitioning, destroy, context

### See Also

MatPartitioningCreate(), MatPartitioningSetType(), MatPartitioningSetVertexWeights()

Level:beginner
Location:src/mat/partition/partition.c
Index of all MatOrderings routines
Table of Contents for all manual pages
Index of all manual pages