petsc-3.7.1 2016-05-15
Report Typos and Errors

MatPartitioningSetPartitionWeights

Sets the weights for each partition.

Synopsis

#include "petscmat.h" 
PetscErrorCode  MatPartitioningSetPartitionWeights(MatPartitioning part,const PetscReal weights[])
Logically Collective on Partitioning Many br

Input Parameters

part - the partitioning context Many br
weights - An array of size nparts that is used to specify the fraction of Many brvertex weight that should be distributed to each sub-domain for Many brthe balance constraint. If all of the sub-domains are to be of Many brthe same size, then each of the nparts elements should be set Many brto a value of 1/nparts. Note that the sum of all of the weights Many brshould be one. Many br

Many br

Notes

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

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

Examples

src/mat/examples/tutorials/ex15.c.html