#include "petscsnes.h" int SNESSetMonitor(SNES snes,int (*func)(SNES,int,PetscReal,void*),void *mctx,int (*monitordestroy)(void *))Collective on SNES
snes | - the SNES context | |
func | - monitoring routine | |
mctx | - [optional] user-defined context for private data for the monitor routine (use PETSC_NULL if no context is desitre) | |
monitordestroy | - [optional] routine that frees monitor context (may be PETSC_NULL) |
int func(SNES snes,int its, PetscReal norm,void *mctx)
snes | - the SNES context | |
its | - iteration number | |
norm | - 2-norm function value (may be estimated) | |
mctx | - [optional] monitoring context |
-snes_monitor | - sets SNESDefaultMonitor() | |
-snes_xmonitor | - sets line graph monitor, uses SNESLGMonitorCreate() _ -snes_cancelmonitors - cancels all monitors that have been hardwired into a code by calls to SNESSetMonitor(), but does not cancel those set via the options database. |