CHROMA
|
Functions | |
void | Chroma::EigSpecRitzCG (const LinearOperator< LatticeFermion > &M, multi1d< Real > &lambda_H, multi1d< LatticeFermion > &psi, int n_eig, int n_renorm, int n_min, int MaxCG, const Real &Rsd_r, const Real &Rsd_a, const Real &zero_cutoff, const bool ProjApsiP, int &n_cg_tot, XMLWriter &xml_out) |
Compute low lying eigenvalues of the hermitian H. More... | |
void | Chroma::EigSpecRitzCG (const LinearOperatorArray< LatticeFermion > &M, multi1d< Real > &lambda_H, multi2d< LatticeFermion > &psi, int n_eig, int n_renorm, int n_min, int MaxCG, const Real &Rsd_r, const Real &Rsd_a, const Real &zero_cutoff, const bool ProjApsiP, int &n_cg_tot, XMLWriter &xml_out) |
Compute low lying eigenvalues of the hermitian H. More... | |
template<typename T > | |
void | Chroma::GramSchm_T (multi1d< T > &psi, const int Npsi, const multi1d< T > &vec, const int Nvec, const Subset &sub) |
Gramm-Schmidt orthogonolization. More... | |
template<typename T > | |
void | Chroma::GramSchm_T (T &psi, const multi1d< T > &vec, const int Nvec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
template<typename T > | |
void | Chroma::GramSchm_T (T &psi, const T &vec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchm (multi1d< LatticeFermion > &psi, const int Npsi, const multi1d< LatticeFermion > &vec, const int Nvec, const Subset &sub) |
Gramm-Schmidt orthogonolization. More... | |
void | Chroma::GramSchm (LatticeFermion &psi, const multi1d< LatticeFermion > &vec, const int Nvec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchm (LatticeColorVector &psi, const multi1d< LatticeColorVector > &vec, const int Nvec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchm (multi1d< LatticeFermion > &psi, const multi1d< LatticeFermion > &vec, const int Nvec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchm (multi1d< LatticeFermion > &psi, const multi1d< LatticeFermion > &vec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchm (LatticeFermion &psi, const multi1d< LatticeFermion > &vec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchm (LatticeFermion &psi, const LatticeFermion &vec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
template<typename T > | |
void | Chroma::GramSchmArray_T (multi2d< T > &psi, const int Npsi, const multi2d< T > &vec, const int Nvec, const Subset &sub) |
Gramm-Schmidt orthogonolization. More... | |
template<typename T > | |
void | Chroma::GramSchmArray_T (multi1d< T > &psi, const multi2d< T > &vec, const int Nvec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
template<typename T > | |
void | Chroma::GramSchmArray_T (multi1d< T > &psi, const multi1d< T > &vec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchmArray (multi2d< LatticeFermion > &psi, const int Npsi, const multi2d< LatticeFermion > &vec, const int Nvec, const Subset &sub) |
Gramm-Schmidt orthogonolization. More... | |
void | Chroma::GramSchmArray (multi1d< LatticeFermion > &psi, const multi2d< LatticeFermion > &vec, const int Nvec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchmArray (multi2d< LatticeFermion > &psi, const multi2d< LatticeFermion > &vec, const int Nvec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchmArray (multi2d< LatticeFermion > &psi, const multi2d< LatticeFermion > &vec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchmArray (multi1d< LatticeFermion > &psi, const multi2d< LatticeFermion > &vec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
void | Chroma::GramSchmArray (multi1d< LatticeFermion > &psi, const multi1d< LatticeFermion > &vec, const Subset &sub) |
Gram Schmidt rothogonalisation. More... | |
template<typename T > | |
void | Chroma::Ritz_t (const LinearOperator< T > &A, Real &lambda, multi1d< T > &psi_all, int N_eig, const Real &Rsd_r, const Real &Rsd_a, const Real &zero_cutoff, int n_renorm, int n_min, int n_max, int MaxCG, bool ProjApsiP, int &n_count, Real &final_grad, bool Kalk_Sim, const Real &delta_cycle, const Real &gamma_factor) |
Minimizes the Ritz functional with a CG based algorithm. More... | |
template<typename T > | |
void | Chroma::RitzArray_t (const LinearOperatorArray< T > &A, Real &lambda, multi2d< T > &psi_all, int N_eig, const Real &Rsd_r, const Real &Rsd_a, const Real &zero_cutoff, int n_renorm, int n_min, int n_max, int MaxCG, bool ProjApsiP, int &n_count, Real &final_grad, bool Kalk_Sim, const Real &delta_cycle, const Real &gamma_factor) |
Minimizes the Ritz functional with a CG based algorithm. More... | |
template<typename T > | |
void | Chroma::Ritz_t (const LinearOperatorArray< T > &A, Real &lambda, multi2d< T > &psi_all, int N_eig, const Real &Rsd_r, const Real &Rsd_a, const Real &zero_cutoff, int n_renorm, int n_min, int n_max, int MaxCG, bool ProjApsiP, int &n_count, Real &final_grad, bool Kalk_Sim, const Real &delta_cycle, const Real &gamma_factor) |
Minimizes the Ritz functional with a CG based algorithm. More... | |
template<typename T > | |
int | Chroma::SN_Jacob_t (multi1d< T > &psi, const int N_eig, multi1d< Real > &lambda, multi1d< Complex > &off_diag, Real tolerance, int N_max, const Subset &sub) |
Single-node Jacobi rotation. More... | |
int | Chroma::SN_Jacob (multi1d< LatticeFermion > &psi, const int N_eig, multi1d< Real > &lambda, multi1d< Complex > &off_diag, Real tolerance, int N_max, const Subset &sub) |
Single-node Jacobi rotation. More... | |
template<typename T > | |
int | Chroma::SN_Jacob_Array_t (multi2d< T > &psi, const int N_eig, multi1d< Real > &lambda, multi1d< Complex > &off_diag, Real tolerance, int N_max, const Subset &sub) |
Single-node Jacobi rotation. More... | |
int | Chroma::SN_Jacob_Array (multi2d< LatticeFermion > &psi, const int N_eig, multi1d< Real > &lambda, multi1d< Complex > &off_diag, Real tolerance, int N_max, const Subset &sub) |
Single-node Jacobi rotation. More... | |
Central include file for all measurements related to calculations of eigenvalues of various linear operators.
void Chroma::EigSpecRitzCG | ( | const LinearOperator< LatticeFermion > & | M, |
multi1d< Real > & | lambda_H, | ||
multi1d< LatticeFermion > & | psi, | ||
int | n_eig, | ||
int | n_renorm, | ||
int | n_min, | ||
int | MaxCG, | ||
const Real & | Rsd_r, | ||
const Real & | Rsd_a, | ||
const Real & | zero_cutoff, | ||
const bool | ProjApsiP, | ||
int & | n_cg_tot, | ||
XMLWriter & | xml_out | ||
) |
Compute low lying eigenvalues of the hermitian H.
Compute low lying eigenvalues of the hermitian H using the Ritz functional minimization routine, if desired in the Kalkreuter-Simma algorithm H The operator (Read) lambda_H Eigenvalues (Modify) psi Eigenvectors (Modify) N_eig No of eigenvalues (Read) N_min Minimal CG iterations (Read) N_max Maximal CG iterations (Read) Kalk_Sim Use Kalkreuter-Simma criterion (Read) n_renorm Renormalize every n_renorm iter. (Read) N_KS_max Max number of Kalkreuter-Simma iterations (Read) RsdR_r (relative) residue (Read) Cv_fact "Convergence factor" required (Read) NCG_tot Total number of CG iter (Write) n_KS total number of Kalkreuter-Simma iterations (Write) n_valid number of valid eigenvalues (Write) ProjApsiP flag for projecting A.psi (Read)
Definition at line 41 of file eig_spec.cc.
References Chroma::END_CODE(), Chroma::i, Chroma::MaxCG, n, Chroma::n_count, Chroma::PLUS, Chroma::pop(), Chroma::psi, Chroma::push(), r_norm, Chroma::Ritz(), Chroma::s(), Chroma::START_CODE(), Chroma::LinearOperator< T >::subset(), and Chroma::write().
Referenced by Chroma::InlineEigBndsMdagM::do4d(), Chroma::InlineEigBndsMdagM::do5d(), Chroma::EigSpecRitzKS(), main(), RitzCode4D(), RitzCode4DHw(), Chroma::InlineRitzEnv::RitzCode4DHw(), and RitzCode5D().
void Chroma::EigSpecRitzCG | ( | const LinearOperatorArray< LatticeFermion > & | M, |
multi1d< Real > & | lambda_H, | ||
multi2d< LatticeFermion > & | psi, | ||
int | n_eig, | ||
int | n_renorm, | ||
int | n_min, | ||
int | MaxCG, | ||
const Real & | Rsd_r, | ||
const Real & | Rsd_a, | ||
const Real & | zero_cutoff, | ||
const bool | ProjApsiP, | ||
int & | n_cg_tot, | ||
XMLWriter & | xml_out | ||
) |
Compute low lying eigenvalues of the hermitian H.
Compute low lying eigenvalues of the hermitian H using the Ritz functional minimization routine, if desired in the Kalkreuter-Simma algorithm H The operator (Read) lambda_H Eigenvalues (Modify) psi Eigenvectors (Modify) N_eig No of eigenvalues (Read) N_min Minimal CG iterations (Read) N_max Maximal CG iterations (Read) Kalk_Sim Use Kalkreuter-Simma criterion (Read) n_renorm Renormalize every n_renorm iter. (Read) N_KS_max Max number of Kalkreuter-Simma iterations (Read) RsdR_r (relative) residue (Read) Cv_fact "Convergence factor" required (Read) NCG_tot Total number of CG iter (Write) n_KS total number of Kalkreuter-Simma iterations (Write) n_valid number of valid eigenvalues (Write) ProjApsiP flag for projecting A.psi (Read)
Definition at line 41 of file eig_spec_array.cc.
References Chroma::END_CODE(), Chroma::i, j, Chroma::MaxCG, n, Chroma::n_count, Chroma::PLUS, Chroma::pop(), Chroma::psi, Chroma::push(), r_norm, Chroma::Ritz(), Chroma::s(), Chroma::LinearOperatorArray< T >::size(), Chroma::START_CODE(), Chroma::LinearOperatorArray< T >::subset(), and Chroma::write().
void Chroma::GramSchm | ( | LatticeColorVector & | psi, |
const multi1d< LatticeColorVector > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against the first Nvec vectors of vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Convenience function: Orthogonalise single std::vector psi against the first Nvec vectors of vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Definition at line 172 of file gramschm.cc.
References Chroma::END_CODE(), Chroma::GramSchm_T(), Chroma::psi, and Chroma::START_CODE().
void Chroma::GramSchm | ( | LatticeFermion & | psi, |
const LatticeFermion & | vec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against the first Nvec vectors of vec
Templated version Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Definition at line 260 of file gramschm.cc.
References Chroma::END_CODE(), Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), Chroma::psi, and Chroma::START_CODE().
void Chroma::GramSchm | ( | LatticeFermion & | psi, |
const multi1d< LatticeFermion > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against the first Nvec vectors of vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Convenience function: Orthogonalise single std::vector psi against the first Nvec vectors of vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Definition at line 147 of file gramschm.cc.
References Chroma::END_CODE(), Chroma::GramSchm_T(), Chroma::psi, and Chroma::START_CODE().
void Chroma::GramSchm | ( | LatticeFermion & | psi, |
const multi1d< LatticeFermion > & | vec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Convenience function: Orthogonalise single std::vector psi against all the vectors of vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Definition at line 238 of file gramschm.cc.
References Chroma::GramSchm_T(), and Chroma::psi.
void Chroma::GramSchm | ( | multi1d< LatticeFermion > & | psi, |
const int | Npsi, | ||
const multi1d< LatticeFermion > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gramm-Schmidt orthogonolization.
Gram Schmidt rothogonalisation.
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
Npsi | Number of source vectors (Read) |
sub | Subset to use (Read) |
Orthogonalise the first Npsi vectors from psi, against the first Nvec vectors from vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
Npsi | Number of source vectors (Read) |
sub | Subset to use (Read) |
Definition at line 127 of file gramschm.cc.
References Chroma::GramSchm_T(), and Chroma::psi.
Referenced by Chroma::MREInitCG4DChronoPredictor::find_extrap_solution(), Chroma::MinimalResidualExtrapolation4DChronoPredictor< T >::find_extrap_solution(), Chroma::MInvMR_a(), Chroma::lg5eps_double_pass::operator()(), Chroma::lg5eps::operator()(), Chroma::lovddag_double_pass::operator()(), Chroma::lovddag::operator()(), Chroma::lovlap_double_pass::operator()(), Chroma::lovlapms::operator()(), and Chroma::Ritz_t().
void Chroma::GramSchm | ( | multi1d< LatticeFermion > & | psi, |
const multi1d< LatticeFermion > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Convenience function: Orthogonalise all vectors of psi against the first Nvec vectors of vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
sub | Subset to use (Read) |
Definition at line 197 of file gramschm.cc.
References Chroma::GramSchm_T(), and Chroma::psi.
void Chroma::GramSchm | ( | multi1d< LatticeFermion > & | psi, |
const multi1d< LatticeFermion > & | vec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Convenience function: Orthogonalise all vectors of psi against the all the vectors of vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
sub | Subset to use (Read) |
Definition at line 218 of file gramschm.cc.
References Chroma::GramSchm_T(), and Chroma::psi.
void Chroma::GramSchm_T | ( | multi1d< T > & | psi, |
const int | Npsi, | ||
const multi1d< T > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gramm-Schmidt orthogonolization.
Templated version
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
Npsi | Number of source vectors (Read) |
sub | Subset to use (Read) |
Definition at line 26 of file gramschm.cc.
References Chroma::END_CODE(), Chroma::i, Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), Chroma::psi, Chroma::QDP_error_exit(), Chroma::s(), and Chroma::START_CODE().
Referenced by Chroma::GramSchm().
void Chroma::GramSchm_T | ( | T & | psi, |
const multi1d< T > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against the first Nvec vectors of vec
Templated version Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Definition at line 65 of file gramschm.cc.
References Chroma::END_CODE(), Chroma::i, Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), Chroma::psi, Chroma::QDP_error_exit(), and Chroma::START_CODE().
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against the first Nvec vectors of vec
Templated version Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Definition at line 100 of file gramschm.cc.
References Chroma::END_CODE(), Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), Chroma::psi, and Chroma::START_CODE().
void Chroma::GramSchmArray | ( | multi1d< LatticeFermion > & | psi, |
const multi1d< LatticeFermion > & | vec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against a single std::vector vec
Templated version Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Convenience function: Orthogonalise single std::vector psi against a single std::vector vec
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D std::vector wrt orthog (Read) |
s | Subset to use (Read) |
Definition at line 284 of file gramschm_array.cc.
References Chroma::GramSchmArray_T(), and Chroma::psi.
void Chroma::GramSchmArray | ( | multi1d< LatticeFermion > & | psi, |
const multi2d< LatticeFermion > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against the first Nvec vectors of vec
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Convenience function: Orthogonalise single std::vector psi against the first Nvec vectors of vec
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
s | Subset to use (Read) |
Definition at line 196 of file gramschm_array.cc.
References Chroma::END_CODE(), Chroma::GramSchmArray_T(), Chroma::psi, and Chroma::START_CODE().
void Chroma::GramSchmArray | ( | multi1d< LatticeFermion > & | psi, |
const multi2d< LatticeFermion > & | vec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Convenience function: Orthogonalise single std::vector psi against all the vectors of vec
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Convenience function: Orthogonalise single std::vector psi against all the vectors of vec
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
s | Subset to use (Read) |
Definition at line 262 of file gramschm_array.cc.
References Chroma::GramSchmArray_T(), and Chroma::psi.
void Chroma::GramSchmArray | ( | multi2d< LatticeFermion > & | psi, |
const int | Npsi, | ||
const multi2d< LatticeFermion > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gramm-Schmidt orthogonolization.
Gram Schmidt rothogonalisation.
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
Npsi | Number of source vectors (Read) |
Orthogonalise the first Npsi vectors from psi, against the first Nvec vectors from vec
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
Npsi | Number of source vectors (Read) |
s | Subset to use (Read) |
Definition at line 176 of file gramschm_array.cc.
References Chroma::GramSchmArray_T(), and Chroma::psi.
Referenced by Chroma::MinimalResidualExtrapolation5DChronoPredictor::find_extrap_solution(), and Chroma::RitzArray_t().
void Chroma::GramSchmArray | ( | multi2d< LatticeFermion > & | psi, |
const multi2d< LatticeFermion > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Convenience function: Orthogonalise all vectors of psi against the first Nvec vectors of vec
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
sub | Subset to use (Read) |
Convenience function: Orthogonalise all vectors of psi against the first Nvec vectors of vec
Arguments:
psi | Pseudofermion field (Modify) |
vec | subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
s | Subset to use (Read) |
Definition at line 221 of file gramschm_array.cc.
References Chroma::GramSchmArray_T(), and Chroma::psi.
void Chroma::GramSchmArray | ( | multi2d< LatticeFermion > & | psi, |
const multi2d< LatticeFermion > & | vec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Convenience function: Orthogonalise all vectors of psi against the all the vectors of vec
Arguments:
psi | 5D Pseudofermion fields (Modify) |
vec | 5D subspace wrt orthog (Read) |
sub | Subset to use (Read) |
Convenience function: Orthogonalise all vectors of psi against the all the vectors of vec
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
s | Subset to use (Read) |
Definition at line 242 of file gramschm_array.cc.
References Chroma::GramSchmArray_T(), and Chroma::psi.
void Chroma::GramSchmArray_T | ( | multi1d< T > & | psi, |
const multi1d< T > & | vec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against vec
Templated version Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D std::vector to orthog. against (Read) |
sub | Subset to use (Read) |
Definition at line 136 of file gramschm_array.cc.
References Chroma::END_CODE(), Chroma::i, Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), N5, Chroma::psi, Chroma::QDP_error_exit(), and Chroma::START_CODE().
void Chroma::GramSchmArray_T | ( | multi1d< T > & | psi, |
const multi2d< T > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gram Schmidt rothogonalisation.
Orthogonalise single std::vector psi against the first Nvec vectors of vec
Templated version Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | no of vectors to orthog against (Read) |
sub | Subset to use (Read) |
Definition at line 89 of file gramschm_array.cc.
References Chroma::END_CODE(), Chroma::i, Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), n, N5, Chroma::psi, Chroma::QDP_error_exit(), and Chroma::START_CODE().
void Chroma::GramSchmArray_T | ( | multi2d< T > & | psi, |
const int | Npsi, | ||
const multi2d< T > & | vec, | ||
const int | Nvec, | ||
const Subset & | sub | ||
) |
Gramm-Schmidt orthogonolization.
Templated version
Arguments:
psi | 5D Pseudofermion field (Modify) |
vec | 5D subspace wrt orthog (Read) |
Nvec | Number of vectors (Read) |
Npsi | Number of source vectors (Read) |
sub | Subset to use (Read) |
Definition at line 28 of file gramschm_array.cc.
References Chroma::END_CODE(), Chroma::i, Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), n, N5, Chroma::psi, Chroma::QDP_error_exit(), Chroma::s(), and Chroma::START_CODE().
Referenced by Chroma::GramSchmArray().
void Chroma::Ritz_t | ( | const LinearOperator< T > & | A, |
Real & | lambda, | ||
multi1d< T > & | psi_all, | ||
int | N_eig, | ||
const Real & | Rsd_r, | ||
const Real & | Rsd_a, | ||
const Real & | zero_cutoff, | ||
int | n_renorm, | ||
int | n_min, | ||
int | n_max, | ||
int | MaxCG, | ||
bool | ProjApsiP, | ||
int & | n_count, | ||
Real & | final_grad, | ||
bool | Kalk_Sim, | ||
const Real & | delta_cycle, | ||
const Real & | gamma_factor | ||
) |
Minimizes the Ritz functional with a CG based algorithm.
This subroutine minimizes the Ritz functional with a CG based algorithm to find the n-th lowest eigenvalue of a hermitian A
lambda_n = min_z <z|Az>/<z|z>
In the subspace orthogonal to the (n-1) lower eigenvectors of A
This routine can handle the original version or be a part of a Kalkreuter Simma algorithm.
The algorithm has been modified that there is now only one target residue – the relative one.
so the original stopping criterion is now:
|| g || < Rsd_r * lambda
The two key features for Kalkreuter - Simma over the normal procedure are: i) Adaptive termination of the procedure (controlled from caller)
The iteration will stop if the gradient has decreased by at least a given factor of gamma^{-1} which according to the paper is O(10)
ii) The initial error estimate is now the "delta_cycle" criterion. basically this scales the norm of || g^2 ||. So the iteration will also stop if delta_cycle || gamma^2 || < Rsd_r mu.
To run in non K-S mode, set gamma = 1, delta_cycle = 1.
For details of the Kalkreuter Simma algorithm see hep-lat/9507023
Algorithm:
Apsi[0] := A . Psi[0] ; mu[0] := < Psi[0] | A . Psi[0] > ; Initial Ritz value Note: we assume < Psi[0] |Psi[0] > = 1 p[1] = g[0] := ( A - mu[0] ) Psi[0] ; Initial direction if converged then return FOR k FROM 1 TO MaxCG DO CG iterations s1 = (mu[k-1] + < p[k] | A p[k] >/p[k]|^2) / 2; s2 = (mu[k-1] - < p[k] | A p[k] >/p[k]|^2) / 2; s3 = |g[k-1]|^2 / |p[k]|; Compute a and cos(theta), sin(theta) (see DESY internal report, September 1994, by Bunk, Jansen, Luescher and Simma) lambda = mu[k] = mu[k-1] - 2 a sin^2(theta); Psi[k] = cos(theta) Psi[k-1] + sin(theta) p[k]/|p[k]|; Apsi[k] = cos(theta) Apsi[k-1] + sin(theta) A p[k]/|p[k]|; g[k] = Apsi[k] - mu[k] Psi[k]
if now converged, then exit
b[k+1] := cos(theta) |g[k]|^2 / |g[k-1]|^2; p[k+1] := g[k] + b[k+1] (p[k] - Psi[k] < Psi[k] | p[k] >); New direction
Arguments:
A The hermitian Matrix as a lin op (Read) lambda Eigenvalue to find (Write) Psi_all Eigenvectors (Modify) N_eig Current Eigenvalue number (Read) RsdR_r (relative) residue (Read) n_renorm Renormalize every n_renorm iter.(Read) n_min Minimum no of CG iters to do (Read) n_max Maximum no of CG iters to do (Read) n_count Number of CG iteration (done) (Write) Kalk_Sim Use Kalkreuter-Simma criterion (Read) delta_cycle The initial error estimate (Read) gamma "Convergence factor" gamma required (Read) ProjApsiP flag for projecting A.psi (Read)
Local Variables:
psi New eigenstd::vector p Direction std::vector Apsi Temporary for A.psi Ap Temporary for A.p, and other mu Ritz functional value g2 | g[k] |**2 p2 | p[k] |**2 k CG iteration counter b beta[k+1] and some others...
Definition at line 103 of file ritz.cc.
References Chroma::a, Chroma::A(), Chroma::b, Chroma::d, Chroma::END_CODE(), Chroma::GramSchm(), Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), Chroma::k, Chroma::MaxCG, mu, Chroma::n_count, Chroma::one, Chroma::p, Chroma::PLUS, Chroma::psi, Chroma::s(), Chroma::START_CODE(), and Chroma::two.
Referenced by Chroma::Ritz().
void Chroma::Ritz_t | ( | const LinearOperatorArray< T > & | A, |
Real & | lambda, | ||
multi2d< T > & | psi_all, | ||
int | N_eig, | ||
const Real & | Rsd_r, | ||
const Real & | Rsd_a, | ||
const Real & | zero_cutoff, | ||
int | n_renorm, | ||
int | n_min, | ||
int | n_max, | ||
int | MaxCG, | ||
bool | ProjApsiP, | ||
int & | n_count, | ||
Real & | final_grad, | ||
bool | Kalk_Sim, | ||
const Real & | delta_cycle, | ||
const Real & | gamma_factor | ||
) |
Minimizes the Ritz functional with a CG based algorithm.
This subroutine minimizes the Ritz functional with a CG based algorithm to find the n-th lowest eigenvalue of a hermitian A
lambda_n = min_z <z|Az>/<z|z>
In the subspace orthogonal to the (n-1) lower eigenvectors of A
This routine can handle the original version or be a part of a Kalkreuter Simma algorithm.
The algorithm has been modified that there is now only one target residue – the relative one.
so the original stopping criterion is now:
|| g || < Rsd_r * lambda
The two key features for Kalkreuter - Simma over the normal procedure are: i) Adaptive termination of the procedure (controlled from caller)
The iteration will stop if the gradient has decreased by at least a given factor of gamma^{-1} which according to the paper is O(10)
ii) The initial error estimate is now the "delta_cycle" criterion. basically this scales the norm of || g^2 ||. So the iteration will also stop if delta_cycle || gamma^2 || < Rsd_r mu.
To run in non K-S mode, set gamma = 1, delta_cycle = 1.
For details of the Kalkreuter Simma algorithm see hep-lat/9507023
Algorithm:
Apsi[0] := A . Psi[0] ; mu[0] := < Psi[0] | A . Psi[0] > ; Initial Ritz value Note: we assume < Psi[0] |Psi[0] > = 1 p[1] = g[0] := ( A - mu[0] ) Psi[0] ; Initial direction if converged then return FOR k FROM 1 TO MaxCG DO CG iterations s1 = (mu[k-1] + < p[k] | A p[k] >/p[k]|^2) / 2; s2 = (mu[k-1] - < p[k] | A p[k] >/p[k]|^2) / 2; s3 = |g[k-1]|^2 / |p[k]|; Compute a and cos(theta), sin(theta) (see DESY internal report, September 1994, by Bunk, Jansen, Luescher and Simma) lambda = mu[k] = mu[k-1] - 2 a sin^2(theta); Psi[k] = cos(theta) Psi[k-1] + sin(theta) p[k]/|p[k]|; Apsi[k] = cos(theta) Apsi[k-1] + sin(theta) A p[k]/|p[k]|; g[k] = Apsi[k] - mu[k] Psi[k]
if now converged, then exit
b[k+1] := cos(theta) |g[k]|^2 / |g[k-1]|^2; p[k+1] := g[k] + b[k+1] (p[k] - Psi[k] < Psi[k] | p[k] >); New direction
Arguments:
A The hermitian Matrix as a lin op (Read) lambda Eigenvalue to find (Write) Psi_all Eigenvectors (Modify) N_eig Current Eigenvalue number (Read) RsdR_r (relative) residue (Read) n_renorm Renormalize every n_renorm iter.(Read) n_min Minimum no of CG iters to do (Read) n_max Maximum no of CG iters to do (Read) n_count Number of CG iteration (done) (Write) Kalk_Sim Use Kalkreuter-Simma criterion (Read) delta_cycle The initial error estimate (Read) gamma "Convergence factor" gamma required (Read) ProjApsiP flag for projecting A.psi (Read)
Local Variables:
psi New eigenstd::vector p Direction std::vector Apsi Temporary for A.psi Ap Temporary for A.p, and other mu Ritz functional value g2 | g[k] |**2 p2 | p[k] |**2 k CG iteration counter b beta[k+1] and some others...
void Chroma::RitzArray_t | ( | const LinearOperatorArray< T > & | A, |
Real & | lambda, | ||
multi2d< T > & | psi_all, | ||
int | N_eig, | ||
const Real & | Rsd_r, | ||
const Real & | Rsd_a, | ||
const Real & | zero_cutoff, | ||
int | n_renorm, | ||
int | n_min, | ||
int | n_max, | ||
int | MaxCG, | ||
bool | ProjApsiP, | ||
int & | n_count, | ||
Real & | final_grad, | ||
bool | Kalk_Sim, | ||
const Real & | delta_cycle, | ||
const Real & | gamma_factor | ||
) |
Minimizes the Ritz functional with a CG based algorithm.
This subroutine minimizes the Ritz functional with a CG based algorithm to find the n-th lowest eigenvalue of a hermitian A
lambda_n = min_z <z|Az>/<z|z>
In the subspace orthogonal to the (n-1) lower eigenvectors of A
This routine can handle the original version or be a part of a Kalkreuter Simma algorithm.
The algorithm has been modified that there is now only one target residue – the relative one.
so the original stopping criterion is now:
|| g || < Rsd_r * lambda
The two key features for Kalkreuter - Simma over the normal procedure are: i) Adaptive termination of the procedure (controlled from caller)
The iteration will stop if the gradient has decreased by at least a given factor of gamma^{-1} which according to the paper is O(10)
ii) The initial error estimate is now the "delta_cycle" criterion. basically this scales the norm of || g^2 ||. So the iteration will also stop if delta_cycle || gamma^2 || < Rsd_r mu.
To run in non K-S mode, set gamma = 1, delta_cycle = 1.
For details of the Kalkreuter Simma algorithm see hep-lat/9507023
Algorithm:
Apsi[0] := A . Psi[0] ; mu[0] := < Psi[0] | A . Psi[0] > ; Initial Ritz value Note: we assume < Psi[0] |Psi[0] > = 1 p[1] = g[0] := ( A - mu[0] ) Psi[0] ; Initial direction if converged then return FOR k FROM 1 TO MaxCG DO CG iterations s1 = (mu[k-1] + < p[k] | A p[k] >/p[k]|^2) / 2; s2 = (mu[k-1] - < p[k] | A p[k] >/p[k]|^2) / 2; s3 = |g[k-1]|^2 / |p[k]|; Compute a and cos(theta), sin(theta) (see DESY internal report, September 1994, by Bunk, Jansen, Luescher and Simma) lambda = mu[k] = mu[k-1] - 2 a sin^2(theta); Psi[k] = cos(theta) Psi[k-1] + sin(theta) p[k]/|p[k]|; Apsi[k] = cos(theta) Apsi[k-1] + sin(theta) A p[k]/|p[k]|; g[k] = Apsi[k] - mu[k] Psi[k]
if now converged, then exit
b[k+1] := cos(theta) |g[k]|^2 / |g[k-1]|^2; p[k+1] := g[k] + b[k+1] (p[k] - Psi[k] < Psi[k] | p[k] >); New direction
Arguments:
A The hermitian Matrix as a lin op (Read) lambda Eigenvalue to find (Write) Psi_all Eigenvectors (Modify) N_eig Current Eigenvalue number (Read) RsdR_r (relative) residue (Read) n_renorm Renormalize every n_renorm iter.(Read) n_min Minimum no of CG iters to do (Read) n_max Maximum no of CG iters to do (Read) n_count Number of CG iteration (done) (Write) Kalk_Sim Use Kalkreuter-Simma criterion (Read) delta_cycle The initial error estimate (Read) gamma "Convergence factor" gamma required (Read) ProjApsiP flag for projecting A.psi (Read)
Local Variables:
psi New eigenstd::vector p Direction std::vector Apsi Temporary for A.psi Ap Temporary for A.p, and other mu Ritz functional value g2 | g[k] |**2 p2 | p[k] |**2 k CG iteration counter b beta[k+1] and some others...
Definition at line 103 of file ritz_array.cc.
References Chroma::a, Chroma::A(), Chroma::b, Chroma::d, Chroma::END_CODE(), Chroma::GramSchmArray(), Chroma::InlinePropAndMatElemDistillation2Env::local::innerProduct(), Chroma::k, Chroma::MaxCG, mu, n, N5, Chroma::n_count, Chroma::one, Chroma::p, Chroma::PLUS, Chroma::psi, Chroma::s(), Chroma::START_CODE(), and Chroma::two.
Referenced by Chroma::Ritz().
int Chroma::SN_Jacob | ( | multi1d< LatticeFermion > & | psi, |
const int | N_eig, | ||
multi1d< Real > & | lambda, | ||
multi1d< Complex > & | off_diag, | ||
Real | tolerance, | ||
int | N_max, | ||
const Subset & | sub | ||
) |
Single-node Jacobi rotation.
This subroutine contains a "single node" Jacobi routine to be used with the Ritz functional eigenvialue/std::vector finder.
psi | Eigenvectors (Modify) |
N_eig | Eigenvalue number (Read) |
lambda | Diagonals / Eigenvalues (Modify) |
off_diag | Upper triang off-diag matrix elems (Modify) |
tolererance | Tolerance for off-diag elems (Read) |
N_max | Maximal number of Jacobi iters (Read) |
sub | Subset to use (Read) |
Definition at line 226 of file sn_jacob.cc.
References Chroma::psi, and Chroma::SN_Jacob_t().
Referenced by Chroma::EigSpecRitzKS(), Chroma::MREInitCG4DChronoPredictor::find_extrap_solution(), and Chroma::fixMMev2Mev().
int Chroma::SN_Jacob_Array | ( | multi2d< LatticeFermion > & | psi, |
const int | N_eig, | ||
multi1d< Real > & | lambda, | ||
multi1d< Complex > & | off_diag, | ||
Real | tolerance, | ||
int | N_max, | ||
const Subset & | sub | ||
) |
Single-node Jacobi rotation.
This subroutine contains a "single node" Jacobi routine to be used with the Ritz functional eigenvialue/std::vector finder.
Psi Eigenvectors (Modify) N_eig Eigenvalue number (Read) lambda Diagonals / Eigenvalues (Modify) off_diag Upper triang off-diag matrix elems (Modify) Toler Tolerance for off-diag elems (Read) N_max Maximal number of Jacobi iters (Read)
sub | Subset to use (Read) |
Definition at line 236 of file sn_jacob_array.cc.
References Chroma::psi, and Chroma::SN_Jacob_Array_t().
Referenced by Chroma::EigSpecRitzKS(), and Chroma::fixMMev2Mev().
int Chroma::SN_Jacob_Array_t | ( | multi2d< T > & | psi, |
const int | N_eig, | ||
multi1d< Real > & | lambda, | ||
multi1d< Complex > & | off_diag, | ||
Real | tolerance, | ||
int | N_max, | ||
const Subset & | sub | ||
) |
Single-node Jacobi rotation.
This subroutine contains a "single node" Jacobi routine to be used with the Ritz functional eigenvialue/std::vector finder.
Psi Eigenvectors (Modify) N_eig Eigenvalue number (Read) lambda Diagonals / Eigenvalues (Modify) off_diag Upper triang off-diag matrix elems (Modify) Toler Tolerance for off-diag elems (Read) N_max Maximal number of Jacobi iters (Read) Ncb Number of sublattices (Read)
sub | Subset to use (Read) |
Definition at line 30 of file sn_jacob_array.cc.
References Chroma::c, Chroma::END_CODE(), Chroma::i, j, Chroma::k, m, n, N5, Chroma::n_count, Chroma::psi, Chroma::QDP_error_exit(), Chroma::s(), Chroma::START_CODE(), and t.
Referenced by Chroma::SN_Jacob_Array().
int Chroma::SN_Jacob_t | ( | multi1d< T > & | psi, |
const int | N_eig, | ||
multi1d< Real > & | lambda, | ||
multi1d< Complex > & | off_diag, | ||
Real | tolerance, | ||
int | N_max, | ||
const Subset & | sub | ||
) |
Single-node Jacobi rotation.
This subroutine contains a "single node" Jacobi routine to be used with the Ritz functional eigenvialue/std::vector finder.
psi | Eigenvectors (Modify) |
N_eig | Eigenvalue number (Read) |
lambda | Diagonals / Eigenvalues (Modify) |
off_diag | Upper triang off-diag matrix elems (Modify) |
tolererance | Tolerance for off-diag elems (Read) |
N_max | Maximal number of Jacobi iters (Read) |
sub | Subset to use (Read) |
Definition at line 28 of file sn_jacob.cc.
References Chroma::c, Chroma::END_CODE(), Chroma::i, j, Chroma::k, m, Chroma::n_count, Chroma::psi, Chroma::QDP_error_exit(), Chroma::s(), Chroma::START_CODE(), and t.
Referenced by Chroma::SN_Jacob().