slepc-3.12.2 2020-01-13
Report Typos and Errors

# PEPSetWhichEigenpairs

Specifies which portion of the spectrum is to be sought.

### Synopsis

    #include "slepcpep.h"
    PetscErrorCode PEPSetWhichEigenpairs(PEP pep,PEPWhich which)

Logically Collective on pep

### Input Parameters

| pep | - eigensolver context obtained from PEPCreate()
| which | - the portion of the spectrum to be sought

### Possible values

The parameter 'which' can have one of these values

| PEP_LARGEST_MAGNITUDE | - largest eigenvalues in magnitude (default)
| PEP_SMALLEST_MAGNITUDE | - smallest eigenvalues in magnitude
| PEP_LARGEST_REAL | - largest real parts
| PEP_SMALLEST_REAL | - smallest real parts
| PEP_LARGEST_IMAGINARY | - largest imaginary parts
| PEP_SMALLEST_IMAGINARY | - smallest imaginary parts
| PEP_TARGET_MAGNITUDE | - eigenvalues closest to the target (in magnitude)
| PEP_TARGET_REAL | - eigenvalues with real part closest to target
| PEP_TARGET_IMAGINARY | - eigenvalues with imaginary part closest to target
| PEP_ALL | - all eigenvalues contained in a given interval
| PEP_WHICH_USER | - user defined ordering set with PEPSetEigenvalueComparison()

### Options Database Keys

| -pep_largest_magnitude | - Sets largest eigenvalues in magnitude
| -pep_smallest_magnitude | - Sets smallest eigenvalues in magnitude
| -pep_largest_real | - Sets largest real parts
| -pep_smallest_real | - Sets smallest real parts
| -pep_largest_imaginary | - Sets largest imaginary parts
| -pep_smallest_imaginary | - Sets smallest imaginary parts
| -pep_target_magnitude | - Sets eigenvalues closest to target
| -pep_target_real | - Sets real parts closest to target
| -pep_target_imaginary | - Sets imaginary parts closest to target
| -pep_all | - Sets all eigenvalues in an interval

### Notes

Not all eigensolvers implemented in PEP account for all the possible values stated above. If SLEPc is compiled for real numbers PEP_LARGEST_IMAGINARY and PEP_SMALLEST_IMAGINARY use the absolute value of the imaginary part for eigenvalue selection.

The target is a scalar value provided with PEPSetTarget().

The criterion PEP_TARGET_IMAGINARY is available only in case PETSc and SLEPc have been built with complex scalars.

PEP_ALL is intended for use in combination with an interval (see PEPSetInterval()), when all eigenvalues within the interval are requested. In that case, the number of eigenvalues is unknown, so the nev parameter has a different sense, see PEPSetDimensions().

### See Also

PEPGetWhichEigenpairs(), PEPSetTarget(), PEPSetInterval(),
PEPSetDimensions(), PEPSetEigenvalueComparison(), PEPWhich

Location: src/pep/interface/pepopts.c
Index of all PEP routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/pep/examples/tutorials/ex38.c.html