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, PetscErrorCode (*monitordestroy)(void **ctx))

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)

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

Calling sequence of monitordestroy#

Options Database Keys#

See Also#

SNES: Nonlinear Solvers, DMAdaptorMonitorError(), DMAdaptor

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