PEPSetScale — SLEPc 3.24.2 documentation

Skip to main content
`Ctrl`+`K`

# PEPSetScale

Specifies the scaling strategy to be used.

## Synopsis

    #include "slepcpep.h"
    PetscErrorCode PEPSetScale(PEP pep,PEPScale scale,PetscReal alpha,Vec Dl,Vec Dr,PetscInt its,PetscReal lambda)

Collective

## Input Parameters

- pep - the polynomial eigensolver context

- scale - scaling strategy, see `PEPScale` for possible values

- alpha - the scaling factor used in the scalar strategy

- Dl - the left diagonal matrix of the diagonal scaling algorithm

- Dr - the right diagonal matrix of the diagonal scaling algorithm

- its - number of iterations of the diagonal scaling algorithm

- lambda - approximation to wanted eigenvalues (modulus)

## Options Database Keys

- -pep_scale <scale> - set the scaling type, one of `none`,`scalar`,`diagonal`,`both`

- -pep_scale_factor <alpha> - set the scaling factor

- -pep_scale_its <its> - set the number of iterations

- -pep_scale_lambda <lambda> - set the approximation to eigenvalues

## Notes

There are two non-exclusive scaling strategies, scalar and diagonal. See discussion in section Scaling.

In the scalar strategy, scaling is applied to the eigenvalue, that is, \(\mu = \lambda/\alpha\) is the new eigenvalue and all matrices are scaled accordingly. After solving the scaled problem, the original \(\lambda\) is recovered. Parameter `alpha` must be positive. Use `PETSC_DETERMINE` to let the solver compute a reasonable scaling factor, and `PETSC_CURRENT` to retain a previously set value.

In the diagonal strategy, the solver works implicitly with matrix \(D_\ell P(\lambda)D_r\), where \(D_\ell\) and \(D_r\) are appropriate diagonal matrices. This improves the accuracy of the computed results in some cases. The user may provide the `Dl` and `Dr` matrices represented as `Vec` objects storing diagonal elements. If not provided, these matrices are computed internally. This option requires that the polynomial coefficient matrices are of `MATAIJ` type. The parameter `its` is the number of iterations performed by the method. Parameter `lambda` must be positive. Use `PETSC_DETERMINE` or set `lambda` = 1.0 if no information about eigenvalues is available. `PETSC_CURRENT` can also be used to leave `its` and `lambda` unchanged.

## See Also

PEP: Polynomial Eigenvalue Problems, Scaling, `PEPGetScale()`

## Level

intermediate

## Location

src/pep/interface/pepopts.c

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