slepc-3.22.2 2024-12-02
Report Typos and Errors

# NEPNLEIGSSetRKShifts

Sets a list of shifts to be used in the Rational Krylov method.

### Synopsis

    #include "slepcnep.h"
    PetscErrorCode NEPNLEIGSSetRKShifts(NEP nep,PetscInt ns,PetscScalar shifts[])

Collective

### Input Parameters

| nep | - the nonlinear eigensolver context
| ns | - number of shifts
| shifts | - array of scalar values specifying the shifts

### Options Database Key

| -nep_nleigs_rk_shifts | - Sets the list of shifts

### Notes

If only one shift is provided, the built subspace built is equivalent to shift-and-invert Krylov-Schur (provided that the absolute convergence criterion is used).

In the case of real scalars, complex shifts are not allowed. In the command line, a comma-separated list of complex values can be provided with the format [+/-][realnumber][+/-]realnumberi with no spaces, e.g. -nep_nleigs_rk_shifts 1.0+2.0i,1.5+2.0i,1.0+1.5i

Use ns=0 to remove previously set shifts.

### See Also

NEPNLEIGSGetRKShifts()

### Level

advanced

### Location

src/nep/impls/nleigs/nleigs.c
Index of all NEP routines
Table of Contents for all manual pages
Index of all manual pages