slepc-3.21.1 2024-04-26
Report Typos and Errors

# EPSSetBalance

Specifies the balancing technique to be employed by the eigensolver, and some parameters associated to it.

### Synopsis

    #include "slepceps.h"
    PetscErrorCode EPSSetBalance(EPS eps,EPSBalance bal,PetscInt its,PetscReal cutoff)

Logically Collective

### Input Parameters

| eps | - the eigensolver context
| bal | - the balancing method, one of EPS_BALANCE_NONE, EPS_BALANCE_ONESIDE, EPS_BALANCE_TWOSIDE, or EPS_BALANCE_USER
| its | - number of iterations of the balancing algorithm
| cutoff | - cutoff value

### Options Database Keys

| -eps_balance <method> | - the balancing method, where <method> is one of 'none', 'oneside', 'twoside', or 'user'
| -eps_balance_its <its> | - number of iterations
| -eps_balance_cutoff <cutoff> | - cutoff value

### Notes

When balancing is enabled, the solver works implicitly with matrix DAD^-1, where D is an appropriate diagonal matrix. This improves the accuracy of the computed results in some cases. See the SLEPc Users Manual for details.

Balancing makes sense only for non-Hermitian problems when the required precision is high (i.e. a small tolerance such as 1e-15).

By default, balancing is disabled. The two-sided method is much more effective than the one-sided counterpart, but it requires the system matrices to have the MatMultTranspose operation defined.

The parameter 'its' is the number of iterations performed by the method. The cutoff value is used only in the two-side variant. Use PETSC_DEFAULT to assign a reasonably good value.

User-defined balancing is allowed provided that the corresponding matrix is set via STSetBalanceMatrix.

### See Also

EPSGetBalance(), EPSBalance, STSetBalanceMatrix()

### Level

intermediate

### Location

src/eps/interface/epsopts.c
Index of all EPS routines
Table of Contents for all manual pages
Index of all manual pages