NEPSetTwoSided — SLEPc 3.24.3 documentation

Skip to main content
`Ctrl`+`K`

# NEPSetTwoSided

Sets the solver to use a two-sided variant so that left eigenvectors are also computed.

## Synopsis

    #include "slepcnep.h"
    PetscErrorCode NEPSetTwoSided(NEP nep,PetscBool twosided)

Logically Collective

## Input Parameters

- nep - the nonlinear eigensolver context

- twosided - whether the two-sided variant is to be used or not

## Options Database Key

- -nep_two_sided - toggles the twosided flag

## Notes

If the user sets `twosided`=`PETSC_TRUE` then the solver uses a variant of the algorithm that computes both right and left eigenvectors. This is usually much more costly. This option is not available in all solvers, see table Nonlinear eigenvalue solvers available in the NEP module.

When using two-sided solvers, the problem matrices must have both the `MATOP_MULT` and `MATOP_MULT_TRANSPOSE` operations defined.

## See Also

NEP: Nonlinear Eigenvalue Problems, `NEPGetTwoSided()`, `NEPGetLeftEigenvector()`

## Level

advanced

## Location

src/nep/interface/nepopts.c

## Examples

src/nep/tutorials/ex42.c

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