struct _n_SlepcSC {
/* map values before sorting, typically a call to STBackTransform (mapctx=ST) */
PetscErrorCode (*map)(PetscObject,PetscInt,PetscScalar*,PetscScalar*);
PetscObject mapobj;
/* comparison function such as SlepcCompareLargestMagnitude */
SlepcEigenvalueComparisonFn *comparison;
void *comparisonctx;
/* optional region for filtering */
RG rg;
};
The comparison function must have the following calling sequence
comparison(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, stored in comparisonctx |
The returning parameter 'res' can be
| negative | - if the 1st value is preferred to the 2st one | |
| zero | - if both values are equally preferred | |
| positive | - if the 2st value is preferred to the 1st one |
Fortran usage is not supported.