MFNMonitorSet — SLEPc 3.24.3 documentation

Skip to main content
`Ctrl`+`K`

# MFNMonitorSet

Sets an ADDITIONAL function to be called at every iteration to monitor convergence.

## Synopsis

    #include "slepcmfn.h"
    PetscErrorCode MFNMonitorSet(MFN mfn,MFNMonitorFn *monitor,void *mctx,PetscCtxDestroyFn *monitordestroy)

Logically Collective

## Input Parameters

- mfn - the matrix function solver context

- monitor - pointer to function (if this is `NULL`, it turns off monitoring), see `MFNMonitorFn`

- 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`), see `PetscCtxDestroyFn` for the calling sequence

## Options Database Keys

- -mfn_monitor - print the error estimate

- -mfn_monitor draw::draw_lg - sets line graph monitor for the error estimate

- -mfn_monitor_cancel - cancels all monitors that have been hardwired into a code by calls to `MFNMonitorSet()`, but does not cancel those set via the options database.

## Notes

The options database option `-mfn_monitor` and related options are the easiest way to turn on `MFN` iteration monitoring.

`MFNMonitorRegister()` provides a way to associate an options database key with `MFN` monitor function.

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

## Fortran Note

Only a single monitor function can be set for each `LME` object.

## See Also

MFN: Matrix Function, `MFNMonitorDefault()`, `MFNMonitorDefaultDrawLG()`, `MFNMonitorCancel()`

## Level

intermediate

## Location

src/mfn/interface/mfnmon.c

Index of all MFN routines Table of Contents for all manual pages Index of all manual pages