DMAdaptorMonitorSet#

Sets an ADDITIONAL function to be called at every iteration to monitor the error etc.

Synopsis#

#include "petscdmadaptor.h" 
PetscErrorCode DMAdaptorMonitorSet(DMAdaptor adaptor, PetscErrorCode (*monitor)(DMAdaptor adaptor, PetscInt it, DM odm, DM adm, PetscInt Nf, PetscReal enorms[], Vec error, void *ctx), void *ctx, PetscCtxDestroyFn *monitordestroy)

Logically Collective

Input Parameters#

  • adaptor - the DMAdaptor

  • monitor - pointer to function (if this is NULL, it turns off monitoring

  • ctx - [optional] context for private data for the monitor routine (use NULL if no context is needed)

  • monitordestroy - [optional] routine that frees monitor context (may be NULL), see PetscCtxDestroyFn for its calling sequence

Calling sequence of monitor#

  • adaptor - the DMAdaptor

  • it - iteration number

  • odm - the original DM

  • adm - the adapted DM

  • Nf - number of fields

  • enorms - (estimated) 2-norm of the error for each field

  • error - Vec of cellwise errors

  • ctx - optional monitoring context, as set by DMAdaptorMonitorSet()

Options Database Keys#

See Also#

SNES: Nonlinear Solvers, DMAdaptorMonitorError(), DMAdaptor, PetscCtxDestroyFn

Level#

beginner

Location#

src/snes/utils/dm/dmadapt.c


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