LMEMonitorSet — SLEPc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# LMEMonitorSet

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

## Synopsis

    #include "slepclme.h"
    PetscErrorCode LMEMonitorSet(LME lme,LMEMonitorFn *monitor,PetscCtx ctx,PetscCtxDestroyFn *monitordestroy)

Logically Collective

## Input Parameters

- lme - the linear matrix equation solver context

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

- ctx - [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

- -lme_monitor - print the error estimate

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

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

## Notes

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

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

Several different monitoring routines may be set by calling `LMEMonitorSet()` 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

LME: Linear Matrix Equation, `LMEMonitorDefault()`, `LMEMonitorDefaultDrawLG()`, `LMEMonitorCancel()`

## Level

intermediate

## Location

src/lme/interface/lmemon.c

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