Skip to main content
`Ctrl`+`K`

# MFNConvergedReason

Reason a matrix function iteration was determined to have converged or diverged.

## Synopsis

    typedef enum {/* converged */
                  MFN_CONVERGED_TOL                =  1,
                  MFN_CONVERGED_ITS                =  2,
                  /* diverged */
                  MFN_DIVERGED_ITS                 = -1,
                  MFN_DIVERGED_BREAKDOWN           = -2,
                  MFN_CONVERGED_ITERATING          =  0} MFNConvergedReason;

## Values

- `MFN_CONVERGED_TOL` - converged up to tolerance

- `MFN_CONVERGED_ITS` - solver completed the requested number of steps

- `MFN_DIVERGED_ITS` - exceeded the maximum number of allowed iterations

- `MFN_DIVERGED_BREAKDOWN` - generic breakdown in method

- `MFN_CONVERGED_ITERATING` - the solver is still running

## Note

Basic solvers (e.g., unrestarted Krylov iterations) cannot determine if the computation is accurate up to the requested tolerance. In that case, the converged reason is set to `MFN_CONVERGED_ITS` if the requested number of steps (for instance, the `ncv` value in unrestarted Krylov methods) have been completed successfully.

## See Also

MFN: Matrix Function, `MFNSolve()`, `MFNGetConvergedReason()`, `MFNSetTolerances()`

## Level

intermediate

## Location

include/slepcmfn.h

## Examples

src/mfn/tutorials/ex23.c
src/mfn/tutorials/ex23f.F90
src/mfn/tutorials/ex37.c

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