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 - NULLif 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 - - Vecof cellwise errors
- ctx - optional monitoring context, as set by - DMAdaptorMonitorSet()
Calling sequence of monitordestroy#
- ctx - optional monitoring context, as set by - DMAdaptorMonitorSet()
Options Database Keys#
- -adaptor_monitor_size - sets - DMAdaptorMonitorSize()
- -adaptor_monitor_error - sets - DMAdaptorMonitorError()
- -adaptor_monitor_error draw - sets - DMAdaptorMonitorErrorDraw()and plots error
- -adaptor_monitor_error draw::draw_lg - sets - DMAdaptorMonitorErrorDrawLG()and plots error
- -dm_adaptor_monitor_cancel - Cancels all monitors that have been hardwired into a code by calls to - DMAdaptorMonitorSet(), but does not cancel those set via the options database.
See Also#
Level#
beginner
Location#
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages