#include "slepcnep.h" PetscErrorCode NEPSetEigenvalueComparison(NEP nep,PetscErrorCode (*comp)(PetscScalar ar,PetscScalar ai,PetscScalar br,PetscScalar bi,PetscInt *res,void *ctx),void* ctx)Logically Collective
nep | - eigensolver context obtained from NEPCreate() | |
comp | - a pointer to the comparison function | |
ctx | - a context pointer (the last parameter to the comparison function) |
PetscErrorCode comp(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() |
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 |