Template Function Davidson¶
Defined in File Davidson.hpp
Function Documentation¶
-
template<typename T, typename HilbertField>
void Davidson(T &hamil, size_t dim, size_t K, vector<double> &val, vector<vector<HilbertField>> &x, double accuracy, bool verb = false)¶ Davidson algorithm for finding multiple eigenpairs.
Davidson algorithm
conditions on the virtual structure hamil:
must contain a method hamil.mult_add(vector<HilbertField> &x, vector<HilbertField> &y) that does y –> y + H.x
must contain a method hamil.diag(vector<HilbertField> &d) that provides the diagonal d of H
See “Monster matrices: their eigenvalues and eigenvectors” Davidson, Ernest R and Thompson, William J and others Computers in Physics 7 (519—522) 1993.
- Parameters:
hamil – Hamiltonian (templated)
dim – dimension of the matrix
K – number of states desired
val – eigenvalues
x – eigenstates (initial vectors)
accuracy – desired accuracy