#include "petscdm.h" #include "petscdmlabel.h" PetscErrorCode DMCoarsenHookAdd(DM fine,PetscErrorCode (*coarsenhook)(DM,DM,void*),PetscErrorCode (*restricthook)(DM,Mat,Vec,Mat,DM,void*),void *ctx)Logically Collective Many br
fine | - nonlinear solver context on which to run a hook when restricting to a coarser level Many br | |
coarsenhook | - function to run when setting up a coarser level Many br | |
restricthook | - function to run to update data on coarser levels (once per SNESSolve()) Many br | |
ctx | - [optional] user-defined context for provide data for the hooks (may be NULL) Many br |
coarsenhook(DM fine,DM coarse,void *ctx);
fine | - fine level DM Many br | |
coarse | - coarse level DM to restrict problem to Many br | |
ctx | - optional user-defined function context Many br |
restricthook(DM fine,Mat mrestrict,Vec rscale,Mat inject,DM coarse,void *ctx)
fine | - fine level DM Many br | |
mrestrict | - matrix restricting a fine-level solution to the coarse grid Many br | |
rscale | - scaling vector for restriction Many br | |
inject | - matrix restricting by injection Many br | |
coarse | - coarse level DM to update Many br | |
ctx | - optional user-defined function context Many br |
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 finest level information from its context (instead of from the SNES). Many br
This function is currently not available from Fortran. Many br
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