#include "petscksp.h" PetscErrorCode KSPMonitorSet(KSP ksp,PetscErrorCode (*monitor)(KSP,PetscInt,PetscReal,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))Logically Collective on KSP
ksp | - iterative context obtained from KSPCreate() | |
monitor | - pointer to function (if this is PETSC_NULL, it turns off monitoring | |
mctx | - [optional] 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) |
monitor (KSP ksp, int it, PetscReal rnorm, void *mctx)
ksp | - iterative context obtained from KSPCreate() | |
it | - iteration number | |
rnorm | - (estimated) 2-norm of (preconditioned) residual | |
mctx | - optional monitoring context, as set by KSPMonitorSet() |
-ksp_monitor | - sets KSPMonitorDefault() | |
-ksp_monitor_true_residual | - sets KSPMonitorTrueResidualNorm() | |
-ksp_monitor_draw | - sets line graph monitor, uses KSPMonitorLGCreate() | |
-ksp_monitor_draw_true_residual | - sets line graph monitor, uses KSPMonitorLGCreate() | |
-ksp_monitor_singular_value | - sets KSPMonitorSingularValue() | |
-ksp_monitor_cancel | - cancels all monitors that have been hardwired into a code by calls to KSPMonitorSet(), but does not cancel those set via the options database. |
Several different monitoring routines may be set by calling KSPMonitorSet() multiple times; all will be called in the order in which they were set.
Fortran notes: Only a single monitor function can be set for each KSP object
Level:beginner
Location:src/ksp/ksp/interface/itfunc.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages