petsc-3.7.7 2017-09-25
Report Typos and Errors

DMGlobalToLocalHookAdd

adds a callback to be run when global to local is called

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
PetscErrorCode DMGlobalToLocalHookAdd(DM dm,PetscErrorCode (*beginhook)(DM,Vec,InsertMode,Vec,void*),PetscErrorCode (*endhook)(DM,Vec,InsertMode,Vec,void*),void *ctx)
Logically Collective

Input Arguments

dm - the DM
beginhook - function to run at the beginning of DMGlobalToLocalBegin()
endhook - function to run after DMGlobalToLocalEnd() has completed
ctx - [optional] user-defined context for provide data for the hooks (may be NULL)

Calling sequence for beginhook

   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 for endhook

   endhook(DM fine,VecScatter out,VecScatter in,DM coarse,void *ctx)

global - global DM
ctx - optional user-defined function context

See Also

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