EPSCompareEigenvalues

Compares two (possibly complex) eigenvalues according to a certain criterion.

Synopsis

#include "slepceps.h" 
PetscErrorCode EPSCompareEigenvalues(EPS eps,PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *result)
Not Collective

Input Parameters

eps - the eigensolver context
ar - real part of the 1st eigenvalue
ai - imaginary part of the 1st eigenvalue
br - real part of the 2nd eigenvalue
bi - imaginary part of the 2nd eigenvalue

Output Parameter

res - result of comparison

Notes

The returning parameter 'res' can be

negative - if the 1st eigenvalue is preferred to the 2st one
zero - if both eigenvalues are equally preferred
positive - if the 2st eigenvalue is preferred to the 1st one

The criterion of comparison is related to the 'which' parameter set with EPSSetWhichEigenpairs().

See Also

EPSSortEigenvalues(), EPSSetWhichEigenpairs()

Location: src/eps/interface/solve.c
Index of all EPS routines
Table of Contents for all manual pages
Index of all manual pages