# MatCoarsenSetAdjacency
Sets the adjacency graph (matrix) of the thing to be coarsened. 
## Synopsis
```
#include "petscmatcoarsen.h" 
PetscErrorCode MatCoarsenSetAdjacency(MatCoarsen agg, Mat adj)
```
Collective


## Input Parameters

- ***agg -*** the coarsen context
- ***adj -*** the adjacency matrix





## See Also
 `MatCoarsen`, `MatCoarsenSetFromOptions()`, `Mat`, `MatCoarsenCreate()`, `MatCoarsenApply()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/coarsen/coarsen.c.html#MatCoarsenSetAdjacency">src/mat/coarsen/coarsen.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/coarsen/coarsen.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)  
