petsc-3.10.5 2019-03-28
Report Typos and Errors


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


#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 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()




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