# DMCoarsenHookRemove
remove a callback set with `DMCoarsenHookAdd()` 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMCoarsenHookRemove(DM fine, PetscErrorCode (*coarsenhook)(DM, DM, void *), PetscErrorCode (*restricthook)(DM, Mat, Vec, Mat, DM, void *), void *ctx)
```
Logically Collective on fine


## Input Parameters

- ***fine -*** `DM` on which to run a hook when restricting to a coarser level
- ***coarsenhook -*** function to run when setting up a coarser level
- ***restricthook -*** function to run to update data on coarser levels
- ***ctx -*** [optional] user-defined context for provide data for the hooks (may be NULL)





## Note
This function does nothing if the hook is not in the list.


## Fortran Note
This function is not available from Fortran.


## See Also
 `DMCoarsenHookAdd()`, `DMRefineHookAdd()`, `SNESFASGetInterpolation()`, `SNESFASGetInjection()`, `PetscObjectCompose()`, `PetscContainerCreate()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMCoarsenHookRemove">src/dm/interface/dm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c)


[Index of all DM routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
