DMGlobalToLocalHookAdd#
adds a callback to be run when DMGlobalToLocal()
is called
Synopsis#
#include "petscdm.h"
#include "petscdmlabel.h"
#include "petscds.h"
PetscErrorCode DMGlobalToLocalHookAdd(DM dm, PetscErrorCode (*beginhook)(DM, Vec, InsertMode, Vec, void *), PetscErrorCode (*endhook)(DM, Vec, InsertMode, Vec, void *), void *ctx)
Logically Collective
Input Parameters#
dm - the
DM
beginhook - function to run at the beginning of
DMGlobalToLocalBegin()
endhook - function to run after
DMGlobalToLocalEnd()
has completedctx - [optional] user-defined context for provide data for the hooks (may be
NULL
)
Calling sequence of beginhook
#
PetscErrorCode beginhook(DM fine, VecScatter out, VecScatter in, DM coarse, void *ctx)
dm - global DM
g - global vector
mode - mode
l - local vector
ctx - optional user-defined function context
Calling sequence of endhook
#
PetscErrorCode endhook(DM fine, VecScatter out, VecScatter in, DM coarse, void *ctx)
global - global DM
ctx - optional user-defined function context
Note#
The hook may be used to provide, for example, values that represent boundary conditions in the local vectors that do not exist on the global vector.
See Also#
DM Basics, DM
, DMGlobalToLocal()
, DMRefineHookAdd()
, SNESFASGetInterpolation()
, SNESFASGetInjection()
, PetscObjectCompose()
, PetscContainerCreate()
Level#
advanced
Location#
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages