EPSSetTrueResidual — SLEPc 3.24.3 documentation

Skip to main content
`Ctrl`+`K`

# EPSSetTrueResidual

Specifies if the solver must compute the true residual explicitly or not.

## Synopsis

    #include "slepceps.h"
    PetscErrorCode EPSSetTrueResidual(EPS eps,PetscBool trueres)

Logically Collective

## Input Parameters

- eps - the linear eigensolver context

- trueres - whether true residuals are required or not

## Options Database Key

- -eps_true_residual - toggles the true residual

## Notes

If the user sets `trueres`=`PETSC_TRUE` then the solver explicitly computes the true residual for each eigenpair approximation, and uses it for convergence testing. Computing the residual is usually an expensive operation. Some solvers (e.g., Krylov solvers) can avoid this computation by using a cheap estimate of the residual norm, but this may sometimes give inaccurate results (especially if a spectral transform is being used). On the contrary, preconditioned eigensolvers (e.g., Davidson solvers) do rely on computing the true residual, so this option is irrelevant for them.

## See Also

EPS: Eigenvalue Problem Solver, `EPSGetTrueResidual()`

## Level

advanced

## Location

src/eps/interface/epsopts.c

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