petsc-3.7.1 2016-05-15
Report Typos and Errors

DMSubDomainHookAdd

adds a callback to be run when restricting a problem to the coarse grid

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
PetscErrorCode DMSubDomainHookAdd(DM global,PetscErrorCode (*ddhook)(DM,DM,void*),PetscErrorCode (*restricthook)(DM,VecScatter,VecScatter,DM,void*),void *ctx)
Logically Collective Many br

Input Arguments

global - global DM Many br
ddhook - function to run to pass data to the decomposition DM upon its creation Many br
restricthook - function to run to update data on block solve (at the beginning of the block solve) Many br
ctx - [optional] user-defined context for provide data for the hooks (may be NULL) Many br

Calling sequence for ddhook

   ddhook(DM global,DM block,void *ctx)

global - global DM Many br
block - block DM Many br
ctx - optional user-defined function context Many br

Calling sequence for restricthook

   restricthook(DM global,VecScatter out,VecScatter in,DM block,void *ctx)

global - global DM Many br
out - scatter to the outer (with ghost and overlap points) block vector Many br
in - scatter to block vector values only owned locally Many br
block - block DM Many br
ctx - optional user-defined function context Many br

Many br

Notes

This function is only needed if auxiliary data needs to be set up on subdomain DMs. Many br

If this function is called multiple times, the hooks will be run in the order they are added. Many br

In order to compose with nonlinear preconditioning without duplicating storage, the hook should be implemented to Many brextract the global information from its context (instead of from the SNES). Many br

This function is currently not available from Fortran. Many br

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