# MatPartitioningSetUseEdgeWeights
Set a flag to indicate whether or not to use edge weights. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatPartitioningSetUseEdgeWeights(MatPartitioning part, PetscBool use_edge_weights)
```
Logically Collective on part


## Input Parameters

- ***part -*** the partitioning context
- ***use_edge_weights -*** the flag indicateing whether or not to use edge weights. By default no edge weights will be used,
that is, use_edge_weights is set to FALSE. If set use_edge_weights to TRUE, users need to make sure legal
edge weights are stored in an ADJ matrix.




## Options Database Keys

- ***-mat_partitioning_use_edge_weights -*** (true or false)



## See Also
 `MatPartitioning`, `MatPartitioningCreate()`, `MatPartitioningSetType()`, `MatPartitioningSetVertexWeights()`, `MatPartitioningSetPartitionWeights()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/partition/partition.c.html#MatPartitioningSetUseEdgeWeights">src/mat/partition/partition.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/tutorials/ex15.c.html">src/mat/tutorials/ex15.c.html</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
