slepc-3.7.3 2016-09-29
Report Typos and Errors

NEPSetEigenvalueComparison

Specifies the eigenvalue comparison function when NEPSetWhichEigenpairs() is set to NEP_WHICH_USER.

Synopsis

#include "slepcnep.h" 
PetscErrorCode NEPSetEigenvalueComparison(NEP pep,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void* ctx)
Logically Collective on NEP

Input Parameters

pep  - eigensolver context obtained from NEPCreate()
func  - a pointer to the comparison function
ctx  - a context pointer (the last parameter to the comparison function)

Calling Sequence of func

  func(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx)

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
res  - result of comparison
ctx  - optional context, as set by NEPSetEigenvalueComparison()

Note

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

See Also

NEPSetWhichEigenpairs(), NEPWhich

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