PetscOptionsSetMonitor

Sets an ADDITIONAL function to be called at every method that modified the PETSc options database.

Synopsis

#include "petsc.h"   
PetscErrorCode PETSC_DLLEXPORT PetscOptionsSetMonitor(PetscErrorCode (*monitor)(const char name[], const char value[], void*),void *mctx,PetscErrorCode (*monitordestroy)(void*))
Not collective

Input Parameters

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)

Calling Sequence of monitor

    monitor (const char name[], const char value[], void *mctx)

name - option name string
value - option value string
mctx - optional monitoring context, as set by PetscOptionsSetMonitor()

Options Database Keys

-options_monitor - sets PetscOptionsDefaultMonitor()
-options_cancelmonitors - cancels all monitors that have been hardwired into a code by calls to PetscOptionsSetMonitor(), but does not cancel those set via the options database.

Notes

The default is to do nothing. To print the name and value of options being inserted into the database, use PetscOptionsDefaultMonitor() as the monitoring routine, with a null monitoring context.

Several different monitoring routines may be set by calling PetscOptionsSetMonitor() multiple times; all will be called in the order in which they were set.

Keywords

PetscOptions, set, monitor

See Also

PetscOptionsDefaultMonitor(), PetscOptionsClearMonitor()

Level:beginner
Location:
src/sys/objects/options.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages