#include "petscsnes.h" #include "petscdmshell.h" #include "petscsys.h" PetscErrorCode SNESMonitorSet(SNES snes,PetscErrorCode (*monitor)(SNES,PetscInt,PetscReal,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))Logically 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 desired) | |
monitordestroy | - [optional] routine that frees monitor context (may be PETSC_NULL) |
int func(SNES snes,PetscInt 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 SNESMonitorDefault() | |
-snes_monitor_draw | - sets line graph monitor, uses SNESMonitorLGCreate() | |
-snes_monitor_cancel | - cancels all monitors that have been hardwired into a code by calls to SNESMonitorSet(), but does not cancel those set via the options database. |
Fortran notes: Only a single monitor function can be set for each SNES object
Level:intermediate
Location:src/snes/interface/snes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages