CheMPS2
CheMPS2::Davidson Class Reference

#include <Davidson.h>

Public Member Functions

 Davidson (const int veclength, const int MAX_NUM_VEC, const int NUM_VEC_KEEP, const double RTOL, const double DIAG_CUTOFF, const bool debug_print, const char problem_type= 'E')
 Constructor. More...
 
virtual ~Davidson ()
 Destructor.
 
char FetchInstruction (double **pointers)
 The iterator to converge the ground state vector. More...
 
int GetNumMultiplications () const
 Get the number of matrix vector multiplications which have been performed. More...
 

Detailed Description

Davidson class.

Author
Sebastian Wouters sebas.nosp@m.tian.nosp@m.woute.nosp@m.rs@g.nosp@m.mail..nosp@m.com
Date
January 29, 2015

The Davidson class implements Davidson's algorithm to find the lowest eigenvalue and corresponding eigenvector of a symmetric operator. Information can be found in
[1] E.R. Davidson, J. Comput. Phys. 17 (1), 87-94 (1975). http://dx.doi.org/10.1016/0021-9991(75)90065-0
[2] http://people.inf.ethz.ch/arbenz/ewp/Lnotes/chapter11.pdf (In this class algorithm 11.1 is implemented, with equation (11.3) instead of line (16).)

Definition at line 34 of file Davidson.h.

Constructor & Destructor Documentation

CheMPS2::Davidson::Davidson ( const int  veclength,
const int  MAX_NUM_VEC,
const int  NUM_VEC_KEEP,
const double  RTOL,
const double  DIAG_CUTOFF,
const bool  debug_print,
const char  problem_type = 'E' 
)

Constructor.

Parameters
veclengthLinear dimension of the symmetric matrix, or the length of the vectors
MAX_NUM_VECThe maximum number of vectors in which the symmetric matrix is approximately diagonalized
NUM_VEC_KEEPThe number of vectors to keep during deflation
RTOLThe tolerance for the two-norm of the residual ( for convergence )
DIAG_CUTOFFCutoff value for the diagonal preconditioner
debug_printWhether or not to debug print
problem_type'E' for eigenvalue or 'L' for linear problem.

Definition at line 31 of file Davidson.cpp.

Member Function Documentation

char CheMPS2::Davidson::FetchInstruction ( double **  pointers)

The iterator to converge the ground state vector.

Parameters
pointersArray of double* of length 2 when problem_type=='E' or length 3 when problem_type=='L'.
Returns
Instruction character. 'A' means copy the initial guess to pointers[0] and the diagonal of the symmetric matrix to pointers[1]. If 'A' and problem_type=='E', the right-hand side of the problem should be copied to pointers[2]. 'B' means calculate pointers[1] as the result of multiplying the symmetric matrix with pointers[0]. 'C' means that the converged solution can be copied back from pointers[0], and pointers[1][0] contains the ground-state energy if problem_type=='E' or the residual norm if problem_type=='L'. 'D' means that an error has occurred.

Definition at line 105 of file Davidson.cpp.

+ Here is the caller graph for this function:

int CheMPS2::Davidson::GetNumMultiplications ( ) const

Get the number of matrix vector multiplications which have been performed.

Returns
The number of matrix vector multiplications which have been performed

Definition at line 103 of file Davidson.cpp.

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: