CHROMA
syssolver_OPTeigcg_params.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Solve a CG1 system
4  */
5 
6 #ifndef __syssolver_OPTeigcg_params_h__
7 #define __syssolver_OPTeigcg_params_h__
8 
9 #include "chromabase.h"
10 
11 
12 namespace Chroma
13 {
14 
15  //! Params for EigCG inverter
16  /*! \ingroup invert */
18  {
20  SysSolverOptEigCGParams(XMLReader& in, const std::string& path);
21 
22  Real RsdCG ; /*!< CG residual */
23  int MaxCG ; /*!< Maximum CG iterations */
24  int PrintLevel ; /*!< Debugg level */
25  int Neig ; /*!< number of eigenvectors to compute */
26  int Nmax ; /*!< number of basis vectors */
27  int esize ; /*!< 2 <= esize <= 2*Neig + 1 */
28  int Neig_max ; /*!< maximum number of eigenvectors to be refined*/
29 
30  Real restartTol ; /*!< CG restart tolerence: restart when
31  |res|<restartTol*|b-A x(0)| */
32 
33  int updateRestartTol ; /*!< Whether to update restartTol from eresids
34  * Expensive. Requires computation of residuals
35  * =0 Never update restartTol
36  * =1 Compute all eigenresiduals and update
37  * when ncurEvals=ldh for the first time
38  * =2 Update based on up to 10 eres picked from
39  * ncurEvals, on every rhs that adds evecs
40  * =3 Compute all eres and update on every rhs
41  * that adds evecs--unnecessarily expensive
42  * If updateRestartTol>0 Cholesky is not used */
43  Real NormAest ; /* an estimate of the norm2 of the Matrix */
44 
45  bool cleanUpEvecs ; /*!< clean up evecs upon destruction of SystemSolver*/
46  std::string eigen_id ; /*!< named buffer holding the eigenvectors */
47 
48  struct File_t
49  {
50  bool read ;
51  bool write ;
53  QDP_volfmt_t file_volfmt;
54  } file;
55 
56 
57  void defaults(){
58  RsdCG = 1.0e-8;
59  MaxCG = 1000;
60  PrintLevel=2;
61  restartTol = zero;
62  updateRestartTol = 1;
63  Neig =0 ;
64  Neig_max =0 ;
65  esize = 4 ;
66  NormAest = 25.0 ;
67 
68  cleanUpEvecs=false;
69  eigen_id="NULL";
70 
71  //IO control
73  file.file_volfmt = QDPIO_SINGLEFILE ;
74 
75  file.read = false;
76  file.write = false;
77 
78  }
79 
80  };
81 
82 
83  // Reader/writers
84  /*! \ingroup invert */
85  void read(XMLReader& xml, const std::string& path, SysSolverOptEigCGParams& param);
86 
87  /*! \ingroup invert */
88  void write(XMLWriter& xml, const std::string& path, const SysSolverOptEigCGParams& param);
89 
90 } // End namespace
91 
92 #endif
93 
Primary include file for CHROMA library code.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
Double zero
Definition: invbicg.cc:106
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
struct Chroma::SysSolverOptEigCGParams::File_t file