DMCoarsenHookRemove#

remove a callback set with DMCoarsenHookAdd()

Synopsis#

#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMCoarsenHookRemove(DM fine, PetscErrorCode (*coarsenhook)(DM fine, DM coarse, PetscCtx ctx), PetscErrorCode (*restricthook)(DM fine, Mat rstrict, Vec rscale, Mat inject, DM coarse, PetscCtx ctx), PetscCtx ctx)

Logically Collective; No Fortran Support

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] application context for provide data for the hooks (may be NULL)

Calling sequence of coarsenhook#

  • fine - fine level DM

  • coarse - coarse level DM to restrict problem to

  • ctx - optional application function context

Calling sequence of restricthook#

  • fine - fine level DM

  • rstrict - matrix restricting a fine-level solution to the coarse grid, usually the transpose of the interpolation

  • rscale - scaling vector for restriction

  • inject - matrix restricting by injection

  • coarse - coarse level DM to update

  • ctx - optional application function context

Notes#

This function does nothing if the coarsenhook is not in the list.

See DMCoarsenHookAdd() for the calling sequence of coarsenhook and restricthook

See Also#

DM Basics, DM, DMCoarsenHookAdd(), DMRefineHookAdd(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate()

Level#

advanced

Location#

src/dm/interface/dm.c


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