slepc-main 2024-11-15
Report Typos and Errors

MFNGetConvergedReason

Gets the reason why the MFNSolve() iteration was stopped.

Synopsis

#include "slepcmfn.h" 
PetscErrorCode MFNGetConvergedReason(MFN mfn,MFNConvergedReason *reason)
Not Collective

Input Parameter

mfn  - the matrix function context

Output Parameter

reason  - negative value indicates diverged, positive value converged

Notes

Possible values for reason are

MFN_CONVERGED_TOL  - converged up to tolerance
MFN_CONVERGED_ITS  - solver completed the requested number of steps
MFN_DIVERGED_ITS  - required more than max_it iterations to reach convergence
MFN_DIVERGED_BREAKDOWN  - generic breakdown in method

Can only be called after the call to MFNSolve() is complete.

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

MFNSetTolerances(), MFNSolve(), MFNConvergedReason, MFNSetErrorIfNotConverged()

Level

intermediate

Location

src/mfn/interface/mfnsolve.c

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