petsc-3.7.1 2016-05-15
Report Typos and Errors

KSPComputeRitz

Computes the Ritz or harmonic Ritz pairs associated to the smallest or largest in modulus, for the preconditioned operator. Called after KSPSolve().

Synopsis

#include "petscksp.h" 
PetscErrorCode  KSPComputeRitz(KSP ksp,PetscBool ritz,PetscBool small,PetscInt *nrit,Vec S[],PetscReal tetar[],PetscReal tetai[])
Not Collective Many br

Input Parameter

Output Parameters

ksp - iterative context obtained from KSPCreate() Many br
ritz - PETSC_TRUE or PETSC_FALSE for ritz pairs or harmonic Ritz pairs, respectively Many br
small - PETSC_TRUE or PETSC_FALSE for smallest or largest (harmonic) Ritz values, respectively Many br
nrit - number of (harmonic) Ritz pairs to compute Many br

Notes

-For GMRES, the (harmonic) Ritz pairs are computed from the Hessenberg matrix obtained during Many brthe last complete cycle, or obtained at the end of the solution if the method is stopped before Many bra restart. Then, the number of actual (harmonic) Ritz pairs computed is less or equal to the restart Many brparameter for GMRES if a complete cycle has been performed or less or equal to the number of GMRES Many briterations. Many br-Moreover, for real matrices, the (harmonic) Ritz pairs are possibly complex-valued. In such a case, Many brthe routine selects the complex (harmonic) Ritz value and its conjugate, and two successive columns of S Many brare equal to the real and the imaginary parts of the associated vectors. Many br-the (harmonic) Ritz pairs are given in order of increasing (harmonic) Ritz values in modulus Many br-this is currently not implemented when PETSc is built with complex numbers Many br

One must call KSPSetComputeRitz() before calling KSPSetUp() Many brin order for this routine to work correctly. Many br

Many br

Keywords

KSP, compute, ritz, values

See Also

KSPSetComputeRitz()

Level:advanced
Location:
src/ksp/ksp/interface/itfunc.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages

nrit - actual number of computed (harmonic) Ritz pairs Many br
S - multidimensional vector with Ritz vectors Many br
tetar - real part of the Ritz values Many br
tetai - imaginary part of the Ritz values Many br