slepc-3.18.0 2022-10-01
Report Typos and Errors

# NEPGetConvergedReason

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

### Synopsis

    #include "slepcnep.h"
    PetscErrorCode NEPGetConvergedReason(NEP nep,NEPConvergedReason *reason)

Not Collective

### Input Parameter

| nep | - the nonlinear eigensolver context

### Output Parameter

| reason | - negative value indicates diverged, positive value converged

### Options Database Key

| -nep_converged_reason | - print the reason to a viewer

### Notes

Possible values for reason are

| NEP_CONVERGED_TOL | - converged up to tolerance
| NEP_CONVERGED_USER | - converged due to a user-defined condition
| NEP_DIVERGED_ITS | - required more than max_it iterations to reach convergence
| NEP_DIVERGED_BREAKDOWN | - generic breakdown in method
| NEP_DIVERGED_LINEAR_SOLVE | - inner linear solve failed
| NEP_DIVERGED_SUBSPACE_EXHAUSTED | - run out of space for the basis in an unrestarted solver

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

### See Also

NEPSetTolerances(), NEPSolve(), NEPConvergedReason

### Level

intermediate

### Location

src/nep/interface/nepsolve.c
Index of all NEP routines
Table of Contents for all manual pages
Index of all manual pages