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 monitoringctx - [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
), seePetscCtxDestroyFn
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 errorsctx - 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#
SNES: Nonlinear Solvers, DMAdaptorMonitorError()
, DMAdaptor
, PetscCtxDestroyFn
Level#
beginner
Location#
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages