Skip to main content
`Ctrl`+`K`

# MatPartitioningSetAdjacency

Sets the adjacency graph (matrix) of the thing to be partitioned.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatPartitioningSetAdjacency(MatPartitioning part, Mat adj)

Collective

## Input Parameters

- part - the partitioning context

- adj - the adjacency matrix, this can be any `MatType` but the natural representation is `MATMPIADJ`

## See Also

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

## Level

beginner

## Location

src/mat/graphops/partition/partition.c

## Examples

src/mat/tutorials/ex11.c
src/mat/tutorials/ex11f.F90
src/mat/tutorials/ex15.c
src/mat/tutorials/ex15f.F90
src/mat/tutorials/ex17.c
src/ksp/ksp/tutorials/ex64.c
src/mat/tutorials/ex17f.F90

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