slepc-3.22.1 2024-10-28
Report Typos and Errors

# NEPSetWhichEigenpairs

Specifies which portion of the spectrum is to be sought.

### Synopsis

    #include "slepcnep.h"
    PetscErrorCode NEPSetWhichEigenpairs(NEP nep,NEPWhich which)

Logically Collective

### Input Parameters

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

### Options Database Keys

| -nep_largest_magnitude | - Sets largest eigenvalues in magnitude
| -nep_smallest_magnitude | - Sets smallest eigenvalues in magnitude
| -nep_largest_real | - Sets largest real parts
| -nep_smallest_real | - Sets smallest real parts
| -nep_largest_imaginary | - Sets largest imaginary parts
| -nep_smallest_imaginary | - Sets smallest imaginary parts
| -nep_target_magnitude | - Sets eigenvalues closest to target
| -nep_target_real | - Sets real parts closest to target
| -nep_target_imaginary | - Sets imaginary parts closest to target
| -nep_all | - Sets all eigenvalues in a region

### Notes

The parameter 'which' can have one of these values

| NEP_LARGEST_MAGNITUDE | - largest eigenvalues in magnitude (default)
| NEP_SMALLEST_MAGNITUDE | - smallest eigenvalues in magnitude
| NEP_LARGEST_REAL | - largest real parts
| NEP_SMALLEST_REAL | - smallest real parts
| NEP_LARGEST_IMAGINARY | - largest imaginary parts
| NEP_SMALLEST_IMAGINARY | - smallest imaginary parts
| NEP_TARGET_MAGNITUDE | - eigenvalues closest to the target (in magnitude)
| NEP_TARGET_REAL | - eigenvalues with real part closest to target
| NEP_TARGET_IMAGINARY | - eigenvalues with imaginary part closest to target
| NEP_ALL | - all eigenvalues contained in a given region
| NEP_WHICH_USER | - user defined ordering set with NEPSetEigenvalueComparison()

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

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

NEP_ALL is intended for use in the context of the CISS solver for computing all eigenvalues in a region.

### See Also

NEPGetWhichEigenpairs(), NEPSetTarget(), NEPSetEigenvalueComparison(), NEPWhich

### Level

intermediate

### Location

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