2005-02-01 00:08:03 +01:00
|
|
|
#include "vec.h"
|
|
|
|
#include "smat.h"
|
|
|
|
#include "mat.h"
|
|
|
|
#include "sparsemat.h"
|
|
|
|
#include "nonclass.h"
|
2005-01-31 14:43:38 +01:00
|
|
|
|
2005-02-04 10:58:36 +01:00
|
|
|
//Davidson diagonalization of real symmetric matrix (modified Lanczos)
|
2005-01-31 14:43:38 +01:00
|
|
|
|
2005-02-01 00:08:03 +01:00
|
|
|
//matrix can be any class which has nrows(), ncols(), diagonalof() and NRVec::gemv() available
|
2005-01-31 14:43:38 +01:00
|
|
|
//does not even have to be explicitly stored - direct CI
|
|
|
|
|
2005-02-01 00:08:03 +01:00
|
|
|
export template <typename T, typename Matrix>
|
2005-02-06 15:01:27 +01:00
|
|
|
extern void davidson(const Matrix &bigmat, NRVec<T> &eivals, NRVec<T> *eivecs, const char *eivecsfile,
|
2005-02-04 10:58:36 +01:00
|
|
|
int nroots=1, const bool verbose=0, const double eps=1e-6,
|
|
|
|
const bool incore=1, int maxit=100, const int maxkrylov = 500);
|
2005-09-06 17:55:07 +02:00
|
|
|
|
|
|
|
//@@@options: left eigenvectors by matrix transpose, overridesymmetric (for nrmat)
|
|
|
|
//@@@small matrix gdiagonalize - shift complex roots up (option to gdiagonalize?)
|
|
|
|
//@@@test gdiagonalize whether it sorts the roots and what for complex ones
|