SlepcArbitrarySelectionFn#

A prototype of an arbitrary selection function that would be passed to EPSSetArbitrarySelection() and analogue functions in other solver types.

Synopsis#

PETSC_EXTERN_TYPEDEF typedef PetscErrorCode SlepcArbitrarySelectionFn(PetscScalar er,PetscScalar ei,Vec xr,Vec xi,PetscScalar *rr,PetscScalar *ri,void *ctx);

Calling Sequence#

  • er - real part of the current eigenvalue approximation

  • ei - imaginary part of the current eigenvalue approximation

  • xr - real part of the current eigenvector approximation

  • xi - imaginary part of the current eigenvector approximation

  • rr - result of evaluation (real part)

  • ri - result of evaluation (imaginary part)

  • ctx - [optional] user-defined context for private data for the arbitrary selection routine (may be NULL)

Notes#

Given a scalar and a vector (usually an approximate eigenvalue and the corresponding eigenvector) this function evaluates the result rr, ri which is the value that will be used in a subsequent sorting.

This evaluation function is collective, that is, all processes call it and it can use collective operations; furthermore, the computed result must be the same in all processes.

The result is expressed as a complex number so that it is possible to use the standard eigenvalue sorting functions, but normally only rr is used. Set ri to zero unless it is meaningful in your application.

See Also#

SlepcSC, SlepcEigenvalueComparisonFn, EPSSetArbitrarySelection()

Level#

advanced

Location#

include/slepcsc.h


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