EPSSetWhichEigenpairs — SLEPc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# EPSSetWhichEigenpairs

Specifies which portion of the spectrum is to be sought.

## Synopsis

    #include "slepceps.h"
    PetscErrorCode EPSSetWhichEigenpairs(EPS eps,EPSWhich which)

Logically Collective

## Input Parameters

- eps - the linear eigensolver context

- which - the portion of the spectrum to be sought, see `EPSWhich` for possible values

## Options Database Keys

- -eps_largest_magnitude - sets largest eigenvalues in magnitude

- -eps_smallest_magnitude - sets smallest eigenvalues in magnitude

- -eps_largest_real - sets largest real parts

- -eps_smallest_real - sets smallest real parts

- -eps_largest_imaginary - sets largest imaginary parts

- -eps_smallest_imaginary - sets smallest imaginary parts

- -eps_target_magnitude - sets eigenvalues closest to target

- -eps_target_real - sets real parts closest to target

- -eps_target_imaginary - sets imaginary parts closest to target

- -eps_all - sets all eigenvalues in an interval or region

- -eps_which_user - select the user-defined selection criterion

## Notes

Not all eigensolvers implemented in `EPS` account for all the possible values of `which`. Also, some values make sense only for certain types of problems. If SLEPc is compiled for real numbers `EPS_LARGEST_IMAGINARY` and `EPS_SMALLEST_IMAGINARY` use the absolute value of the imaginary part for eigenvalue selection.

The target is a scalar value provided with `EPSSetTarget()`.

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

`EPS_ALL` is intended for use in combination with an interval (see `EPSSetInterval()`), when all eigenvalues within the interval are requested, or in the context of the `EPSCISS` solver for computing all eigenvalues in a region.

## See Also

EPS: Eigenvalue Problem Solver, `EPSGetWhichEigenpairs()`, `EPSSetTarget()`, `EPSSetInterval()`, `EPSSetDimensions()`, `EPSSetEigenvalueComparison()`, `EPSWhich`

## Level

intermediate

## Location

src/eps/interface/epsopts.c

## Examples

src/eps/tutorials/ex11.c
src/eps/tutorials/ex25.c
src/eps/tutorials/ex10.c
src/eps/tutorials/ex30.c
src/eps/tutorials/ex10f.F90
src/eps/tutorials/ex24.c
src/eps/tutorials/ex12.c
src/eps/tutorials/ex44.c
src/eps/tutorials/ex46.c
src/eps/tutorials/ex9.c

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