FILTLAN  1.0a
Public Member Functions | Public Attributes | List of all members

An instance of this class, taken by LanczosEigenSolver(), is a collection of options for the Lanczos procedure to solve symmetric eigenvalue problems. More...

#include <laneig.h>

Inheritance diagram for LanczosOptions:
FilteredLanczosOptions

Public Member Functions

 LanczosOptions ()
 A default constructor to set default options.
 

Public Attributes

bool wantEigVec
 This parameter tells whether eigenvectors are wanted or not (default true). More...
 
mkIndex minIter
 Minimum number of Lanczos iterations. More...
 
mkIndex maxIter
 Maximum number of Lanczos iterations. More...
 
mkIndex extraIter
 Extra number of Lanczos iterations (default 100). More...
 
mkIndex stride
 The convergence is checked every ‘stride’ iterations (default 10).
 
mkIndex defaultMinIterFactor
 The default LanczosOptions::minIter, if not set, is LanczosOptions::defaultMinIterFactor times the number of (largest or smallest) eigenvalues requested. More...
 
mkIndex defaultMaxIterFactor
 The default LanczosOptions::maxIter, if not set, is 500 plus LanczosOptions::defaultMaxIterFactor times the number of (largest or smallest) eigenvalues requested. More...
 
Real tol
 Tolerance of eigenvalues, defined in the relative and average sense, for convergence check (default $\sqrt[5]{\epsilon^4}$, with $\epsilon$ the machine epsilon).
 
Vector v0
 The initial Lanczos vector. More...
 
int reorth
 A flag to tell which reorthogonalization scheme is used (default 1). The value can be 0,1,2. More...
 
Real doubleReorthGamma
 Reorthogonalization is doubled in the iterations with nrm < doubleReorthGamma*nrm_old, where nrm_old and nrm are the norms of the latest Lanczos vector before and after reorthogonalization. More...
 
Real localReorthGamma
 Local reorthogonalization is performed if beta[j-1]<localReorthGamma*beta[j] or localReorthGamma>=1.0, where beta[j] is the latest beta and beta[j-1] is the previous beta at jth Lanczos iteration. More...
 
int partialReorthStrategy
 A flag to tell which partial reorthogonalization strategy is used. The value can be 0,1,2,3. More...
 
bool checkReorth
 Set checkReorth=true for checking whether semi-orthogonality is preserved with partial reorthogonalization. More...
 
Real memoryExpansionFactor
 This parameter determines how much the memory should be expanded when the allocated memory is not sufficient to store the Lanczos vectors and the elements alpha's and beta's which form the symmetric tridiagonal matrix.
 
Real eigLowCut
 Eigenvalues larger than eigLowCut in the lower end will not be computed. More...
 
Real eigHighCut
 Eigenvalues smaller than eigHighCut in the upper end will not be computed. More...
 
int eigSort
 A flag which indicates how to sort eigenvalues (default -1). The value should be no less than -2. More...
 
int disp
 Diagnostic information display level (default 1). The value can be 0,1,2. More...
 
std::ostream * out
 A pointer to an output stream for diagnostic information. By default, it points to std::cout.
 
std::ostream * err
 A pointer to an output stream for error messages. By default, it points to std::cerr.
 

Detailed Description

An instance of this class, taken by LanczosEigenSolver(), is a collection of options for the Lanczos procedure to solve symmetric eigenvalue problems.

Member Data Documentation

◆ checkReorth

bool LanczosOptions::checkReorth

Set checkReorth=true for checking whether semi-orthogonality is preserved with partial reorthogonalization.

This is for verification purposes, and is expensive, comparable to full reorthogonalization. Therefore, checkReorth=true is not recommended for large problems.

By default, checkReorth==false.

Remarks
This parameter is effective only with partial reorthogonalization (LanczosOptions::reorth==1 as input of LanczosEigenSolver()).

◆ defaultMaxIterFactor

mkIndex LanczosOptions::defaultMaxIterFactor

The default LanczosOptions::maxIter, if not set, is 500 plus LanczosOptions::defaultMaxIterFactor times the number of (largest or smallest) eigenvalues requested.

The default value of LanczosOptions::defaultMaxIterFactor is 50.

◆ defaultMinIterFactor

mkIndex LanczosOptions::defaultMinIterFactor

The default LanczosOptions::minIter, if not set, is LanczosOptions::defaultMinIterFactor times the number of (largest or smallest) eigenvalues requested.

The default value of LanczosOptions::defaultMinIterFactor is 5.

◆ disp

int LanczosOptions::disp

Diagnostic information display level (default 1). The value can be 0,1,2.

  • 0 means that no information will be displayed.
  • 1 means that basic information will be displayed.
  • 2 means that more information will be displayed.

◆ doubleReorthGamma

Real LanczosOptions::doubleReorthGamma

Reorthogonalization is doubled in the iterations with nrm < doubleReorthGamma*nrm_old, where nrm_old and nrm are the norms of the latest Lanczos vector before and after reorthogonalization.

The default value of doubleReorthGamma is $\sqrt{2}$.

  • doubleReorthGamma==0.0 (or smaller) means that reorthogonalization is never doubled.
  • doubleReorthGamma==1.0 (or larger) means that reorthogonalization, whenever it is performed, is always doubled.
Remarks
This parameter is effective only if LanczosOptions::reorth==1 or LanczosOptions::reorth==2 (i.e. partial or full reorthogonalization).

◆ eigHighCut

Real LanczosOptions::eigHighCut

Eigenvalues smaller than eigHighCut in the upper end will not be computed.

This parameter is effective when eigPart[] is "LA" for largest algebraic or when eigPart[] is "BE" for both ends.

◆ eigLowCut

Real LanczosOptions::eigLowCut

Eigenvalues larger than eigLowCut in the lower end will not be computed.

This parameter is effective when eigPart[] is "SA" for smallest algebraic or when eigPart[] is "BE" for both ends.

◆ eigSort

int LanczosOptions::eigSort

A flag which indicates how to sort eigenvalues (default -1). The value should be no less than -2.

  • -2 for ‘don't sort’.
  • -1 for the default setting:
    • If eigPart[] is "LA", 2 for to sort the eigenvalues in decreasing order.
    • If eigPart[] is "SA", 0 for to sort the eigenvalues in increasing order.
    • If eigPart[] is "BE", 0 for to sort the eigenvalues in increasing order.
  • Otherwise eigSort should be >=0, in which case
    • The first digit is 0 (or 1) for to sort the eigenvalues in the lower end in increasing (or decreasing) order.
    • The second digit is 0 (or 1) for to sort the eigenvalues in the higher end in increasing (or decreasing) order.
    • The third digit is 0 (or 1) for to list the eigenvalues in the lower end before (or after) those in the higher end.

Here eigPart[] is the input string of LanczosEigenSolver().

Remarks
When eigPart[] is "LA", the first and the third digits do not matter.
When eigPart[] is "SA", the second and the third digits do not matter.
When eigPart[] is "BE", set eigSort=0 (or 7) for eigenvalues sorted in increasing (or decreasing) order.

◆ extraIter

mkIndex LanczosOptions::extraIter

Extra number of Lanczos iterations (default 100).

This is the number of Lanczos iterations performed after the Ritz values are ‘deemed’ converged to the desired eigenvalues. There are two reasons to perform more Lanczos iterations.

  • To improve the accuracy of the computed eigenvalues / eigenvectors.
  • It is possible that there are missing eigenvalues.

The second can be illustrated by the following example. When the 10 largest Ritz values are converged to 10 eigenvalues, it is possible that the 10 eigenvalues are not the largest, because one or more of the 10 largest eigenvalues do not yet show up as Ritz values. Nevertheless, these missing eigenvalues, if any, may come out by applying more iterations. This issue can be serious in a filtered Lanczos procedure with a high degree polynomial.

Finally, the phase of such extra iterations may be repeated for a few times until all desired eigenvalues are found.

◆ localReorthGamma

Real LanczosOptions::localReorthGamma

Local reorthogonalization is performed if beta[j-1]<localReorthGamma*beta[j] or localReorthGamma>=1.0, where beta[j] is the latest beta and beta[j-1] is the previous beta at jth Lanczos iteration.

The default value of localReorthGamma is sqrt(0.5).
localReorthGamma=0.0 (or smaller) means that local reorthogonalization is never performed.

Remarks
This parameter is effective only if LanczosOptions::reorth==1 (i.e. partial reorthogonalization) as input of LanczosEigenSolver().

◆ maxIter

mkIndex LanczosOptions::maxIter

Maximum number of Lanczos iterations.

This is the maximum number of iterations performed even if some desired eigenvalues do not yet converge.

The default value is 0, which means that it will be determined by LanczosOptions::defaultMaxIterFactor.

◆ minIter

mkIndex LanczosOptions::minIter

Minimum number of Lanczos iterations.

This is the number of iterations performed before checking convergence.

The default value is 0, which means that it will be determined by LanczosOptions::defaultMinIterFactor.

◆ partialReorthStrategy

int LanczosOptions::partialReorthStrategy

A flag to tell which partial reorthogonalization strategy is used. The value can be 0,1,2,3.

  • 0 for reorthogonalization against previous Lanczos vectors in groups; each group consists of v(i),v(i+1),...,v(j) with omega(i),omega(i+1),...,omega(j) all greater than eta, and there is v(k) with omega(k)>delta, i<=k<=j.
  • 1 for reorthogonalization against previous Lanczos vectors v(i) with omega(i)>eta.
  • 2 for reorthogonalization against previous Lanczos vectors in one group v(i),v(i+1),...,v(j) such that i is the smallest index for omega(i)>eta, and j is the largest index for omega(j)>eta.
  • 3 for reorthogonalization against all previous Lanczos vectors.

omega(i) is the estimated orthogonal error of v(i) against the previous Lanczos vectors v(1),...,v(i-1). By default, the value of eta is eps^(0.75) and the value of delta is eps^(0.5), where eps is the machine epsilon.

Remarks
This parameter is effective only if LanczosOptions::reorth==1 (i.e. partial reorthogonalization).

◆ reorth

int LanczosOptions::reorth

A flag to tell which reorthogonalization scheme is used (default 1). The value can be 0,1,2.

  • 0 for no reorthogonalization (reserved option);
  • 1 for partial reorthogonalization (default and recommended);
  • 2 for full reorthogonalization.

◆ v0

Vector LanczosOptions::v0

The initial Lanczos vector.

If v0.Length() is not the number of rows/columns of the matrix, then a random vector is generated for the initial Lanczos vector as in the default case.

◆ wantEigVec

bool LanczosOptions::wantEigVec

This parameter tells whether eigenvectors are wanted or not (default true).

Note that the standard Lanczos procedure computes the eigenvalues first. The computation of eigenvectors is unnecessary if only the eigenvalues are required.


The documentation for this struct was generated from the following file: