DMSubDomainHookAdd#
adds a callback to be run when restricting a problem to the coarse grid
Synopsis#
#include "petscdm.h"
#include "petscdmlabel.h"
#include "petscds.h"
PetscErrorCode DMSubDomainHookAdd(DM global, PetscErrorCode (*ddhook)(DM, DM, void *), PetscErrorCode (*restricthook)(DM, VecScatter, VecScatter, DM, void *), void *ctx)
Logically Collective; No Fortran Support
Input Parameters#
Calling sequence of ddhook
#
PetscErrorCode ddhook(DM global, DM block, void *ctx)
Calling sequence of restricthook
#
PetscErrorCode restricthook(DM global, VecScatter out, VecScatter in, DM block, void *ctx)
Notes#
This function is only needed if auxiliary data needs to be set up on subdomain DM
s.
If this function is called multiple times, the hooks will be run in the order they are added.
In order to compose with nonlinear preconditioning without duplicating storage, the hook should be implemented to
extract the global information from its context (instead of from the SNES
).
See Also#
DM Basics, DM
, DMSubDomainHookRemove()
, DMRefineHookAdd()
, SNESFASGetInterpolation()
, SNESFASGetInjection()
, PetscObjectCompose()
, PetscContainerCreate()
Level#
advanced
Location#
Examples#
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages