#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
global | - global DM | |
ddhook | - function to run to pass data to the decomposition DM upon its creation | |
restricthook | - function to run to update data on block solve (at the beginning of the block solve) | |
ctx | - [optional] user-defined context for provide data for the hooks (may be NULL) |
ddhook(DM global,DM block,void *ctx)
global | - global DM | |
block | - block DM | |
ctx | - optional user-defined function context |
restricthook(DM global,VecScatter out,VecScatter in,DM block,void *ctx)
global | - global DM | |
out | - scatter to the outer (with ghost and overlap points) block vector | |
in | - scatter to block vector values only owned locally | |
block | - block DM | |
ctx | - optional user-defined function context |
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).
This function is currently not available from Fortran.
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