votca 2024.2-dev
|
Use Davidson algorithm to solve A*V=E*V. More...
#include <davidsonsolver.h>
Classes | |
struct | ProjectedSpace |
struct | RitzEigenPair |
Public Member Functions | |
DavidsonSolver (Logger &log) | |
void | set_iter_max (Index N) |
void | set_max_search_space (Index N) |
void | set_tolerance (std::string tol) |
void | set_correction (std::string method) |
void | set_size_update (std::string update_size) |
void | set_matrix_type (std::string mt) |
Eigen::ComputationInfo | info () const |
Eigen::VectorXd | eigenvalues () const |
Eigen::MatrixXd | eigenvectors () const |
Index | num_iterations () const |
template<typename MatrixReplacement > | |
void | solve (const MatrixReplacement &A, Index neigen, Index size_initial_guess=0) |
Private Types | |
enum | CORR { DPR , OLSEN } |
enum | UPDATE { MIN , SAFE , MAX } |
enum | MATRIX_TYPE { SYMM , HAM } |
using | ArrayXb = Eigen::Array<bool, Eigen::Dynamic, 1> |
Private Member Functions | |
template<typename MatrixReplacement > | |
void | updateProjection (const MatrixReplacement &A, ProjectedSpace &proj) const |
RitzEigenPair | getRitzEigenPairs (const ProjectedSpace &proj) const |
Eigen::MatrixXd | qr (const Eigen::MatrixXd &A) const |
RitzEigenPair | getHarmonicRitz (const ProjectedSpace &proj) const |
RitzEigenPair | getRitz (const ProjectedSpace &proj) const |
Index | getSizeUpdate (Index neigen) const |
void | checkOptions (Index operator_size) |
void | printOptions (Index operator_size) const |
void | printTiming (const std::chrono::time_point< std::chrono::system_clock > &start) const |
void | printIterationData (const RitzEigenPair &rep, const ProjectedSpace &proj, Index neigen) const |
ArrayXl | argsort (const Eigen::VectorXd &V) const |
Eigen::MatrixXd | setupInitialEigenvectors (Index size_initial_guess) const |
Eigen::MatrixXd | extract_vectors (const Eigen::MatrixXd &V, const ArrayXl &idx) const |
void | orthogonalize (Eigen::MatrixXd &V, Index nupdate) const |
void | gramschmidt (Eigen::MatrixXd &A, Index nstart) const |
Eigen::VectorXd | computeCorrectionVector (const Eigen::VectorXd &qj, double lambdaj, const Eigen::VectorXd &Aqj) const |
Eigen::VectorXd | dpr (const Eigen::VectorXd &r, double lambda) const |
Eigen::VectorXd | olsen (const Eigen::VectorXd &r, const Eigen::VectorXd &x, double lambda) const |
ProjectedSpace | initProjectedSpace (Index neigen, Index size_initial_guess) const |
Index | extendProjection (const RitzEigenPair &rep, ProjectedSpace &proj) const |
bool | checkConvergence (const RitzEigenPair &rep, ProjectedSpace &proj, Index neigen) const |
void | restart (const RitzEigenPair &rep, ProjectedSpace &proj, Index newtestvectors) const |
void | storeConvergedData (const RitzEigenPair &rep, Index neigen) |
void | storeNotConvergedData (const RitzEigenPair &rep, const ArrayXb &root_converged, Index neigen) |
void | storeEigenPairs (const RitzEigenPair &rep, Index neigen) |
Private Attributes | |
Logger & | log_ |
Index | iter_max_ = 50 |
Index | i_iter_ = 0 |
double | tol_ = 1E-4 |
Index | max_search_space_ = 0 |
Eigen::VectorXd | Adiag_ |
Index | restart_size_ = 0 |
CORR | davidson_correction_ = CORR::DPR |
UPDATE | davidson_update_ = UPDATE::SAFE |
MATRIX_TYPE | matrix_type_ = MATRIX_TYPE::SYMM |
Eigen::VectorXd | eigenvalues_ |
Eigen::MatrixXd | eigenvectors_ |
Eigen::ComputationInfo | info_ = Eigen::ComputationInfo::NoConvergence |
Use Davidson algorithm to solve A*V=E*V.
For a rough overview https://joshuagoings.com/2013/08/23/davidsons-method/ For the symmetric case we simply extract the smallest eigenvalues For the non-symmetric case we need the smallest non-negative eigenvalues These are harder to extract, because iterative methods tend to converge towards extreme eigenvalues, thus we use harmonic ritz values.
Definition at line 47 of file davidsonsolver.h.
|
private |
Definition at line 125 of file davidsonsolver.h.
|
private |
Enumerator | |
---|---|
DPR | |
OLSEN |
Definition at line 133 of file davidsonsolver.h.
|
private |
Enumerator | |
---|---|
SYMM | |
HAM |
Definition at line 139 of file davidsonsolver.h.
|
private |
Enumerator | |
---|---|
MIN | |
SAFE | |
MAX |
Definition at line 136 of file davidsonsolver.h.
votca::xtp::DavidsonSolver::DavidsonSolver | ( | Logger & | log | ) |
Definition at line 32 of file davidsonsolver.cc.
|
private |
Definition at line 175 of file davidsonsolver.cc.
|
private |
Definition at line 350 of file davidsonsolver.cc.
|
private |
Definition at line 47 of file davidsonsolver.cc.
|
private |
Definition at line 392 of file davidsonsolver.cc.
|
private |
Definition at line 419 of file davidsonsolver.cc.
|
inline |
Definition at line 60 of file davidsonsolver.h.
|
inline |
Definition at line 61 of file davidsonsolver.h.
|
private |
Definition at line 357 of file davidsonsolver.cc.
|
private |
Definition at line 383 of file davidsonsolver.cc.
|
private |
Definition at line 244 of file davidsonsolver.cc.
|
private |
Definition at line 224 of file davidsonsolver.cc.
|
private |
Definition at line 210 of file davidsonsolver.cc.
Definition at line 152 of file davidsonsolver.cc.
|
private |
Definition at line 445 of file davidsonsolver.cc.
|
inline |
Definition at line 59 of file davidsonsolver.h.
|
private |
Definition at line 337 of file davidsonsolver.cc.
|
inline |
Definition at line 62 of file davidsonsolver.h.
|
private |
Definition at line 427 of file davidsonsolver.cc.
|
private |
Definition at line 441 of file davidsonsolver.cc.
|
private |
Definition at line 90 of file davidsonsolver.cc.
|
private |
Definition at line 67 of file davidsonsolver.cc.
|
private |
Definition at line 34 of file davidsonsolver.cc.
|
private |
Definition at line 483 of file davidsonsolver.cc.
|
private |
Definition at line 493 of file davidsonsolver.cc.
void votca::xtp::DavidsonSolver::set_correction | ( | std::string | method | ) |
Definition at line 114 of file davidsonsolver.cc.
|
inline |
Definition at line 52 of file davidsonsolver.h.
void votca::xtp::DavidsonSolver::set_matrix_type | ( | std::string | mt | ) |
Definition at line 104 of file davidsonsolver.cc.
|
inline |
Definition at line 53 of file davidsonsolver.h.
void votca::xtp::DavidsonSolver::set_size_update | ( | std::string | update_size | ) |
Definition at line 139 of file davidsonsolver.cc.
void votca::xtp::DavidsonSolver::set_tolerance | ( | std::string | tol | ) |
Definition at line 125 of file davidsonsolver.cc.
|
private |
Definition at line 183 of file davidsonsolver.cc.
|
inline |
Definition at line 65 of file davidsonsolver.h.
|
private |
Definition at line 518 of file davidsonsolver.cc.
|
private |
Definition at line 552 of file davidsonsolver.cc.
|
private |
Definition at line 527 of file davidsonsolver.cc.
|
inlineprivate |
Definition at line 172 of file davidsonsolver.h.
|
private |
Definition at line 131 of file davidsonsolver.h.
Definition at line 134 of file davidsonsolver.h.
|
private |
Definition at line 137 of file davidsonsolver.h.
|
private |
Definition at line 142 of file davidsonsolver.h.
|
private |
Definition at line 143 of file davidsonsolver.h.
|
private |
Definition at line 128 of file davidsonsolver.h.
|
private |
Definition at line 144 of file davidsonsolver.h.
|
private |
Definition at line 127 of file davidsonsolver.h.
|
private |
Definition at line 126 of file davidsonsolver.h.
|
private |
Definition at line 140 of file davidsonsolver.h.
|
private |
Definition at line 130 of file davidsonsolver.h.
|
private |
Definition at line 132 of file davidsonsolver.h.
|
private |
Definition at line 129 of file davidsonsolver.h.