NEPComputeError#

Computes the error (based on the residual norm) associated with the i-th computed eigenpair.

Synopsis#

#include "slepcnep.h" 
PetscErrorCode NEPComputeError(NEP nep,PetscInt i,NEPErrorType type,PetscReal *error)

Collective

Input Parameters#

  • nep - the nonlinear eigensolver context

  • i - the solution index

  • type - the type of error to compute, see NEPErrorType

Output Parameter#

  • error - the error

Notes#

The error can be computed in various ways, all of them based on the residual norm computed as \(\|T(\lambda)x\|_2\) where \((\lambda,x)\) is the approximate eigenpair.

If the computation of left eigenvectors was enabled with NEPSetTwoSided(), then the error will be computed using the maximum of the value above and the left residual norm \(\|y^*T(\lambda)\|_2\), where \(y\) is the approximate left eigenvector.

See Also#

NEP: Nonlinear Eigenvalue Problems, NEPErrorType, NEPSolve(), NEPGetErrorEstimate(), NEPSetTwoSided()

Level#

beginner

Location#

src/nep/interface/nepsolve.c

Examples#

src/nep/tutorials/ex20f.F90
src/nep/tutorials/ex20.c


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