Skip to main content
`Ctrl`+`K`

# MFNConvergedReasonView

Displays the reason an `MFN` solve converged or diverged.

## Synopsis

    #include "slepcmfn.h"
    PetscErrorCode MFNConvergedReasonView(MFN mfn,PetscViewer viewer)

Collective

## Input Parameters

- mfn - the matrix function solver context

- viewer - the viewer to display the reason

## Options Database Key

- -mfn_converged_reason - print reason for convergence/divergence, and number of iterations

## Notes

Use `MFNConvergedReasonViewFromOptions()` to display the reason based on values in the options database.

To change the format of the output call `PetscViewerPushFormat()` before this call. Use `PETSC_VIEWER_DEFAULT` for the default, or `PETSC_VIEWER_FAILED` to only display a reason if it fails. The latter can be set in the command line with `-mfn_converged_reason ::failed`.

## See Also

MFN: Matrix Function, `MFNSetTolerances()`, `MFNGetIterationNumber()`, `MFNConvergedReasonViewFromOptions()`

## Level

intermediate

## Location

src/mfn/interface/mfnbasic.c

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