petsc-3.7.1 2016-05-15
Report Typos and Errors

SNESMonitorSet

Sets an ADDITIONAL function that is to be used at every iteration of the nonlinear solver to display the iteration's progress.

Synopsis

#include "petscsnes.h"  
PetscErrorCode  SNESMonitorSet(SNES snes,PetscErrorCode (*f)(SNES,PetscInt,PetscReal,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))
Logically Collective on SNES Many br

Input Parameters

snes - the SNES context Many br
f - the monitor function, see SNESMonitorFunction for the calling sequence Many br
mctx - [optional] user-defined context for private data for the Many brmonitor routine (use NULL if no context is desired) Many br
monitordestroy - [optional] routine that frees monitor context Many br(may be NULL) Many br

Options Database Keys

-snes_monitor - sets SNESMonitorDefault() Many br
-snes_monitor_lg_residualnorm - sets line graph monitor, Many bruses SNESMonitorLGCreate() Many br
-snes_monitor_cancel - cancels all monitors that have Many brbeen hardwired into a code by Many brcalls to SNESMonitorSet(), but Many brdoes not cancel those set via Many brthe options database. Many br

Notes

Several different monitoring routines may be set by calling Many brSNESMonitorSet() multiple times; all will be called in the Many brorder in which they were set. Many br

Fortran notes: Only a single monitor function can be set for each SNES object Many br

Many br

Keywords

SNES, nonlinear, set, monitor

See Also

SNESMonitorDefault(), SNESMonitorCancel(), SNESMonitorFunction

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

Examples

src/snes/examples/tutorials/ex2.c.html
src/snes/examples/tutorials/ex3.c.html
src/snes/examples/tutorials/ex12.c.html
src/snes/examples/tutorials/ex21.c.html
src/snes/examples/tutorials/ex22.c.html
src/ts/examples/tutorials/ex7.c.html
src/ts/examples/tutorials/ex12.c.html