![]() |
QMCPACK
|
Public Member Functions | |
Real | getLowestEigenvector (Matrix< Real > &A, std::vector< Real > &ev) const |
Real | getNonLinearRescale (std::vector< Real > &dP, Matrix< Real > &S, const QMCCostFunctionBase &optTarget) const |
Static Public Member Functions | |
static Real | selectEigenvalue (std::vector< Real > &eigenvals, Matrix< Real > &eigenvectors, Real zerozero, std::vector< Real > &ev) |
Select eigenvalue and return corresponding scaled eigenvector. More... | |
static Real | getLowestEigenvector_Inv (Matrix< Real > &A, Matrix< Real > &B, std::vector< Real > &ev) |
Solve the generalized eigenvalue problem and return a scaled eigenvector corresponding to the selected eigenvalue. More... | |
static Real | getLowestEigenvector_Gen (Matrix< Real > &A, Matrix< Real > &B, std::vector< Real > &ev) |
Solve the generalized eigenvalue problem and return a scaled eigenvector corresponding to the selected eigenvalue. More... | |
Private Types | |
using | Real = QMCTraits::RealType |
Private Member Functions | |
void | getNonLinearRange (int &first, int &last, const QMCCostFunctionBase &optTarget) const |
Definition at line 31 of file LinearMethod.h.
|
private |
Definition at line 33 of file LinearMethod.h.
LinearMethod::Real getLowestEigenvector | ( | Matrix< Real > & | A, |
std::vector< Real > & | ev | ||
) | const |
Definition at line 123 of file LinearMethod.cpp.
References qmcplusplus::Units::distance::A, APP_ABORT, qmcplusplus::app_log(), Matrix< T, Alloc >::data(), LAPACK::geev(), and qmcplusplus::Units::second.
Referenced by QMCFixedSampleLinearOptimizeBatched::previous_linear_methods_run(), QMCFixedSampleLinearOptimize::run(), and QMCFixedSampleLinearOptimizeBatched::solveShiftsWithoutLMYEngine().
|
static |
Solve the generalized eigenvalue problem and return a scaled eigenvector corresponding to the selected eigenvalue.
[in] | A | Hamiltonian matrix |
[in] | B | Overlap matrix |
[out] | ev | Scaled eigenvector |
This uses a generalized eigenvalue solver (LAPACK ggev).
Definition at line 41 of file LinearMethod.cpp.
References qmcplusplus::Units::distance::A, B(), LinearMethod::selectEigenvalue(), and Eigensolver::solveGeneralizedEigenvalues().
Referenced by QMCFixedSampleLinearOptimizeBatched::one_shift_run().
|
static |
Solve the generalized eigenvalue problem and return a scaled eigenvector corresponding to the selected eigenvalue.
[in] | A | Hamiltonian matrix |
[in] | B | Overlap matrix |
[out] | ev | Scaled eigenvector |
This uses a regular eigenvalue solver for B^-1 A (LAPACK geev). In theory using the generalized eigenvalue solver is more numerically stable, but in practice this solver is sufficiently stable, and is faster than the generalized solver.
Definition at line 31 of file LinearMethod.cpp.
References qmcplusplus::Units::distance::A, B(), LinearMethod::selectEigenvalue(), and Eigensolver::solveGeneralizedEigenvalues_Inv().
Referenced by QMCFixedSampleLinearOptimizeBatched::one_shift_run().
|
private |
Definition at line 208 of file LinearMethod.cpp.
References QMCCostFunctionBase::getParameterTypes(), and optimize::LINEAR_P.
Referenced by LinearMethod::getNonLinearRescale().
LinearMethod::Real getNonLinearRescale | ( | std::vector< Real > & | dP, |
Matrix< Real > & | S, | ||
const QMCCostFunctionBase & | optTarget | ||
) | const |
Definition at line 240 of file LinearMethod.cpp.
References LinearMethod::getNonLinearRange(), and qmcplusplus::sqrt().
Referenced by QMCFixedSampleLinearOptimizeBatched::one_shift_run(), QMCFixedSampleLinearOptimizeBatched::previous_linear_methods_run(), QMCFixedSampleLinearOptimize::run(), and QMCFixedSampleLinearOptimizeBatched::solveShiftsWithoutLMYEngine().
|
static |
Select eigenvalue and return corresponding scaled eigenvector.
[in] | eigenvals | Eigenvalues |
[in] | eigenvectors | Eigenvectors |
[in] | zerozero | The H(0,0) element, used to guide eigenvalue selection |
[out] | ev | The eigenvector scaled by the reciprocal of the first element |
Definition at line 57 of file LinearMethod.cpp.
References qmcplusplus::app_log(), and qmcplusplus::Units::second.
Referenced by LinearMethod::getLowestEigenvector_Gen(), LinearMethod::getLowestEigenvector_Inv(), and qmcplusplus::TEST_CASE().