PetscErrorCode QPSMonitorSet(QPS qps,PetscErrorCode (*monitor)(QPS,PetscInt,PetscReal,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))Logically Collective on QPS
qps | - iterative context obtained from QPSCreate() | |
monitor | - pointer to function | |
mctx | - [optional] context for private data for the monitor routine (use NULL if no context is desired) | |
monitordestroy | - [optional] routine that frees monitor context (may be NULL) |
monitor (QPS qps, PetscInt it, PetscReal rnorm, void *mctx)
qps | - iterative context obtained from QPSCreate() | |
it | - iteration number | |
rnorm | - 2-norm of the residual (more general, a vector whose norm determines convergence, such as a projected gradient for QPSMPGP) | |
mctx | - optional monitoring context, as set by QPSMonitorSet() |
-qps_monitor | - sets QPSMonitorDefault() | |
-qps_monitor_cost | - sets QPSMonitorCostFunction() | |
-qps_monitor_cancel | - cancels all monitors that have been hardwired into a code by calls to QPSMonitorSet(), but does not cancel those set via the options database. |
Several different monitoring routines may be set by calling QPSMonitorSet() multiple times; all will be called in the order in which they were set.