# MatCoarsenSetGreedyOrdering
Sets the ordering of the vertices to use with a greedy coarsening method 
## Synopsis
```
#include "petscmatcoarsen.h" 
PetscErrorCode MatCoarsenSetGreedyOrdering(MatCoarsen coarser, const IS perm)
```
Logically Collective on coarser


## Input Parameters

- ***coarser -*** the coarsen context
- ***perm -*** vertex ordering of (greedy) algorithm





## Note
The `IS` weights is freed by PETSc, the user should not destroy it or change it after this call


## See Also
 `MatCoarsen`, `MatCoarsenType`, `MatCoarsenCreate()`, `MatCoarsenSetType()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/coarsen/coarsen.c.html#MatCoarsenSetGreedyOrdering">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)  
