slepc-3.14.2 2021-02-01
Report Typos and Errors

# NEPMonitorSet

Sets an ADDITIONAL function to be called at every iteration to monitor the error estimates for each requested eigenpair.

### Synopsis

    #include "slepcnep.h"
    PetscErrorCode NEPMonitorSet(NEP nep,PetscErrorCode (*monitor)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void *mctx,PetscErrorCode (*monitordestroy)(void**))

Logically Collective on nep

### Input Parameters

| nep | - eigensolver context obtained from NEPCreate()
| monitor | - pointer to function (if this is NULL, it turns off monitoring)
| 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)

### Calling Sequence of monitor

      monitor(NEP nep,int its,int nconv,PetscScalar *eigr,PetscScalar *eigi,PetscReal* errest,int nest,void *mctx)

| nep | - nonlinear eigensolver context obtained from NEPCreate()
| its | - iteration number
| nconv | - number of converged eigenpairs
| eigr | - real part of the eigenvalues
| eigi | - imaginary part of the eigenvalues
| errest | - error estimates for each eigenpair
| nest | - number of error estimates
| mctx | - optional monitoring context, as set by NEPMonitorSet()

### Options Database Keys

| -nep_monitor | - print only the first error estimate
| -nep_monitor_all | - print error estimates at each iteration
| -nep_monitor_conv | - print the eigenvalue approximations only when convergence has been reached
| -nep_monitor_lg | - sets line graph monitor for the first unconverged approximate eigenvalue
| -nep_monitor_lg_all | - sets line graph monitor for all unconverged approximate eigenvalues
| -nep_monitor_cancel | - cancels all monitors that have been hardwired into a code by calls to NEPMonitorSet(), but does not cancel those set via the options database.

### Notes

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

### See Also

NEPMonitorFirst(), NEPMonitorAll(), NEPMonitorCancel()

Location: src/nep/interface/nepmon.c
Index of all NEP routines
Table of Contents for all manual pages
Index of all manual pages