Eigenvalue measurements
[Measurement routines]


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.
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.
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.
template<typename T>
void Chroma::GramSchm_T (T &psi, const multi1d< T > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
template<typename T>
void Chroma::GramSchm_T (T &psi, const T &vec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchm (multi1d< LatticeFermion > &psi, const int Npsi, const multi1d< LatticeFermion > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchm (LatticeFermion &psi, const multi1d< LatticeFermion > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchm (LatticeColorVector &psi, const multi1d< LatticeColorVector > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchm (multi1d< LatticeFermion > &psi, const multi1d< LatticeFermion > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchm (multi1d< LatticeFermion > &psi, const multi1d< LatticeFermion > &vec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchm (LatticeFermion &psi, const multi1d< LatticeFermion > &vec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchm (LatticeFermion &psi, const LatticeFermion &vec, const Subset &sub)
 Gram Schmidt rothogonalisation.
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.
template<typename T>
void Chroma::GramSchmArray_T (multi1d< T > &psi, const multi2d< T > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
template<typename T>
void Chroma::GramSchmArray_T (multi1d< T > &psi, const multi1d< T > &vec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchmArray (multi2d< LatticeFermion > &psi, const int Npsi, const multi2d< LatticeFermion > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchmArray (multi1d< LatticeFermion > &psi, const multi2d< LatticeFermion > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchmArray (multi2d< LatticeFermion > &psi, const multi2d< LatticeFermion > &vec, const int Nvec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchmArray (multi2d< LatticeFermion > &psi, const multi2d< LatticeFermion > &vec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchmArray (multi1d< LatticeFermion > &psi, const multi2d< LatticeFermion > &vec, const Subset &sub)
 Gram Schmidt rothogonalisation.
void Chroma::GramSchmArray (multi1d< LatticeFermion > &psi, const multi1d< LatticeFermion > &vec, const Subset &sub)
 Gram Schmidt rothogonalisation.
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.
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.
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.
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.
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.
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.
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.

Detailed Description

Central include file for all measurements related to calculations of eigenvalues of various linear operators.

Function Documentation

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 42 of file eig_spec_array.cc.

References END_CODE, Chroma::n_count, Chroma::PLUS, Chroma::Ritz(), Chroma::LinearOperatorArray< T >::size(), START_CODE, Chroma::LinearOperatorArray< T >::subset(), and Chroma::write().

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 42 of file eig_spec.cc.

References END_CODE, Chroma::n_count, Chroma::PLUS, Chroma::Ritz(), 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::GramSchm ( LatticeFermion &  psi,
const LatticeFermion &  vec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against the first Nvec vectors of vec

Templated version Arguments:

Parameters:
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 261 of file gramschm.cc.

References END_CODE, and START_CODE.

void Chroma::GramSchm ( LatticeFermion &  psi,
const multi1d< LatticeFermion > &  vec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Convenience function: Orthogonalise single vector psi against all the vectors of vec

Arguments:

Parameters:
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 239 of file gramschm.cc.

References Chroma::GramSchm_T().

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:

Parameters:
psi Pseudofermion field (Modify)
vec subspace wrt orthog (Read)
sub Subset to use (Read)

Definition at line 219 of file gramschm.cc.

References Chroma::GramSchm_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:

Parameters:
psi Pseudofermion field (Modify)
vec subspace wrt orthog (Read)
Nvec Number of vectors (Read)
sub Subset to use (Read)

Definition at line 198 of file gramschm.cc.

References Chroma::GramSchm_T().

void Chroma::GramSchm ( LatticeColorVector &  psi,
const multi1d< LatticeColorVector > &  vec,
const int  Nvec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against the first Nvec vectors of vec

Arguments:

Parameters:
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 173 of file gramschm.cc.

References END_CODE, Chroma::GramSchm_T(), and START_CODE.

void Chroma::GramSchm ( LatticeFermion &  psi,
const multi1d< LatticeFermion > &  vec,
const int  Nvec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against the first Nvec vectors of vec

Arguments:

Parameters:
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 148 of file gramschm.cc.

References END_CODE, Chroma::GramSchm_T(), and START_CODE.

void Chroma::GramSchm ( multi1d< LatticeFermion > &  psi,
const int  Npsi,
const multi1d< LatticeFermion > &  vec,
const int  Nvec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Arguments:

Parameters:
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 128 of file gramschm.cc.

References Chroma::GramSchm_T().

Referenced by Chroma::MREInitCG4DChronoPredictor::find_extrap_solution(), Chroma::MinimalResidualExtrapolation4DChronoPredictor::find_extrap_solution(), Chroma::GaussianInitObjCallMapEnv::gaussianInitSubsetVectors(), Chroma::MInvMR_a(), Chroma::lovlapms::operator()(), Chroma::lovlap_double_pass::operator()(), Chroma::lovddag::operator()(), Chroma::lovddag_double_pass::operator()(), Chroma::lg5eps::operator()(), Chroma::lg5eps_double_pass::operator()(), and Chroma::Ritz_t().

template<typename T>
void Chroma::GramSchm_T ( T psi,
const T vec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against the first Nvec vectors of vec

Templated version Arguments:

Parameters:
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 101 of file gramschm.cc.

References END_CODE, and START_CODE.

template<typename T>
void Chroma::GramSchm_T ( T psi,
const multi1d< T > &  vec,
const int  Nvec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against the first Nvec vectors of vec

Templated version Arguments:

Parameters:
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 66 of file gramschm.cc.

References END_CODE, and START_CODE.

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.

Templated version

Arguments:

Parameters:
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 27 of file gramschm.cc.

References END_CODE, and START_CODE.

Referenced by Chroma::GramSchm().

void Chroma::GramSchmArray ( multi1d< LatticeFermion > &  psi,
const multi1d< LatticeFermion > &  vec,
const Subset &  s 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against a single vector vec

Templated version Arguments:

Parameters:
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 285 of file gramschm_array.cc.

References Chroma::GramSchmArray_T().

void Chroma::GramSchmArray ( multi1d< LatticeFermion > &  psi,
const multi2d< LatticeFermion > &  vec,
const Subset &  s 
)

Gram Schmidt rothogonalisation.

Convenience function: Orthogonalise single vector psi against all the vectors of vec

Arguments:

Parameters:
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 263 of file gramschm_array.cc.

References Chroma::GramSchmArray_T().

void Chroma::GramSchmArray ( multi2d< LatticeFermion > &  psi,
const multi2d< LatticeFermion > &  vec,
const Subset &  s 
)

Gram Schmidt rothogonalisation.

Convenience function: Orthogonalise all vectors of psi against the all the vectors of vec

Arguments:

Parameters:
psi 5D Pseudofermion fields (Modify)
vec 5D subspace wrt orthog (Read)
sub Subset to use (Read)

Definition at line 243 of file gramschm_array.cc.

References Chroma::GramSchmArray_T().

void Chroma::GramSchmArray ( multi2d< LatticeFermion > &  psi,
const multi2d< LatticeFermion > &  vec,
const int  Nvec,
const Subset &  s 
)

Gram Schmidt rothogonalisation.

Convenience function: Orthogonalise all vectors of psi against the first Nvec vectors of vec

Arguments:

Parameters:
psi 5D Pseudofermion field (Modify)
vec 5D subspace wrt orthog (Read)
Nvec Number of vectors (Read)
sub Subset to use (Read)

Definition at line 222 of file gramschm_array.cc.

References Chroma::GramSchmArray_T().

void Chroma::GramSchmArray ( multi1d< LatticeFermion > &  psi,
const multi2d< LatticeFermion > &  vec,
const int  Nvec,
const Subset &  s 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against the first Nvec vectors of vec

Arguments:

Parameters:
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 197 of file gramschm_array.cc.

References END_CODE, Chroma::GramSchmArray_T(), and START_CODE.

void Chroma::GramSchmArray ( multi2d< LatticeFermion > &  psi,
const int  Npsi,
const multi2d< LatticeFermion > &  vec,
const int  Nvec,
const Subset &  s 
)

Gram Schmidt rothogonalisation.

Arguments:

Parameters:
psi 5D Pseudofermion field (Modify)
vec 5D subspace wrt orthog (Read)
Nvec Number of vectors (Read)
Npsi Number of source vectors (Read)

Definition at line 177 of file gramschm_array.cc.

References Chroma::GramSchmArray_T().

Referenced by Chroma::MinimalResidualExtrapolation5DChronoPredictor::find_extrap_solution(), and Chroma::RitzArray_t().

template<typename T>
void Chroma::GramSchmArray_T ( multi1d< T > &  psi,
const multi1d< T > &  vec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against vec

Templated version Arguments:

Parameters:
psi 5D Pseudofermion field (Modify)
vec 5D vector to orthog. against (Read)
sub Subset to use (Read)

Definition at line 137 of file gramschm_array.cc.

References END_CODE, N5, and START_CODE.

template<typename T>
void Chroma::GramSchmArray_T ( multi1d< T > &  psi,
const multi2d< T > &  vec,
const int  Nvec,
const Subset &  sub 
)

Gram Schmidt rothogonalisation.

Orthogonalise single vector psi against the first Nvec vectors of vec

Templated version Arguments:

Parameters:
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 90 of file gramschm_array.cc.

References END_CODE, N5, and START_CODE.

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.

Templated version

Arguments:

Parameters:
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 29 of file gramschm_array.cc.

References END_CODE, N5, and START_CODE.

Referenced by Chroma::GramSchmArray().

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.

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 eigenvector p Direction 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...

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.

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 eigenvector p Direction 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 104 of file ritz.cc.

References END_CODE, Chroma::GramSchm(), Chroma::PLUS, Chroma::psi(), START_CODE, Chroma::LinearOperator< T >::subset(), and T.

Referenced by Chroma::Ritz().

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.

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 eigenvector p Direction 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 104 of file ritz_array.cc.

References END_CODE, Chroma::GramSchmArray(), N5, Chroma::PLUS, Chroma::psi(), START_CODE, and Chroma::LinearOperatorArray< T >::subset().

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/vector finder.

Parameters:
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)
Returns:
Number of Jacobi iters (Write)

Definition at line 228 of file sn_jacob.cc.

References 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/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)

Parameters:
sub Subset to use (Read)
Returns:
Number of Jacobi iters (Write)

Definition at line 238 of file sn_jacob_array.cc.

References Chroma::SN_Jacob_Array_t().

Referenced by Chroma::EigSpecRitzKS(), and Chroma::fixMMev2Mev().

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.

This subroutine contains a "single node" Jacobi routine to be used with the Ritz functional eigenvialue/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)

Parameters:
sub Subset to use (Read)
Returns:
Number of Jacobi iters (Write)

Definition at line 31 of file sn_jacob_array.cc.

References END_CODE, m, N5, Chroma::n_count, and START_CODE.

Referenced by Chroma::SN_Jacob_Array().

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.

This subroutine contains a "single node" Jacobi routine to be used with the Ritz functional eigenvialue/vector finder.

Parameters:
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)
Returns:
Number of Jacobi iters (Write)

Definition at line 29 of file sn_jacob.cc.

References END_CODE, m, Chroma::n_count, START_CODE, and T.

Referenced by Chroma::SN_Jacob().


Generated on Sun Nov 22 04:38:39 2009 for CHROMA by  doxygen 1.4.7