# MatCoarsenDestroy
Destroys the coarsen context. 
## Synopsis
```
#include "petscmatcoarsen.h" 
PetscErrorCode MatCoarsenDestroy(MatCoarsen *agg)
```
Collective on agg


## Input Parameters

- ***agg -*** the coarsen context





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

## Level
advanced

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