CHROMA
syssolver_qop_mg_params.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Parameters for the external QDP clover multigrid solver
4  */
5 
6 #ifndef __syssolver_qop_mg_params_h__
7 #define __syssolver_qop_mg_params_h__
8 
9 #include "chromabase.h"
10 
11 
12 namespace Chroma
13 {
14 
15  //! Parameters for the external QDP multigrid inverter
16  /*! \ingroup invert */
18  {
20  SysSolverQOPMGParams(XMLReader& in, const std::string& path);
21 
22  /* These parameters are translated directly from the sample code in wilmg.c
23  * in qcdalg. The comments give the command-line flag used to input the
24  * parameters in compiled QDP, followed by the C variable name used,
25  * follwed by a description of how the value is used. We will try to use
26  * the default values from wilmg.c to initialize these parameters.
27  */
28 
29  // Lattice Action Parameters
30  Real AnisoXi; /*!< Lattice bare anisotropy (xi_0) */
31  Real AnisoNu; /*!< Lattice bare dispersion parameter (nu_s) */
32  Real Kappa; /*!< Hopping parameter to solve */
33  Real KappaCrit; /*!< Critical hopping parameter (for null vectors) */
34  Real Mass; /*!< Bare mass of fermion (sets kappa) */
35  Real MassCrit; /*!< Bare critical mass (sets kappac) */
36  Real Clover; /*!< Spatial clover parameter */
37  Real CloverT; /*!< Temporal clover parameter */
38  // Solver Parameters
39  Real Residual; /*!< Stopping residual for solver */
40  int MaxIter; /*!< Maximum number of iterations to allow in solver */
41  int RefreshThreshold; /*!< If this number of iterations is reached in an MdagM solver, the space will be refreshed */
42 
43  int NumGCRVecs; /*!< Number of GCR vectors at top level */
44  // Diagnostic Parameters
45  int Verbose; /*!< Level of diagnostic verbosity */
46  // Multigrid Parameters
47  int Levels; /*!< Number of levels in multigrid
48  If Levels is specified to be nonpositive, the same multigrid setup
49  previously created will be reused by this inversion.
50  If Levels is negative, the multigrid structure will be deleted following
51  the inversion. */
52  multi1d< multi1d<int> > Blocking;/*!< Spacetime blocking of each multigrid level */
53  multi1d<int> NumNullVecs; /*!< Number of null vectors per multigrid level */
54  // Null-Vector Setup Parameters
55  multi1d<int> NullMaxIter; /*!< Maximum iterations for setup on each std::vector */
56  multi1d<Real> NullResidual; /*!< Residual to converge each std::vector */
57  multi1d<Real> NullConvergence; /*!< Convergence criterion
58  This indicates the level at which a std::vector is considered to have
59  converged. That is, if it changes less than this amount during the
60  relaxation, a new random std::vector will be generated for further nullvecs. */
61  multi1d<int> NumExtraVecs; /*!< Number of extra vectors to generate and discard */
62  // Multigrid Solver Parameters
63  multi1d<Real> Underrelax; /*!< Underrelaxation for each V-cycle */
64  multi1d<int> NumPreHits; /*!< Number of smoother pre-hits per V-cycle */
65  multi1d<int> NumPostHits; /*!< Number of smoother post-hits per V-cycle */
66  multi1d<int> CoarseNumGCRVecs;/*!< Number of GCR vectors in coarse solver */
67  // Solver will run until one of the following two stopping criteria is met
68  multi1d<int> CoarseMaxIter; /*!< Coarse-level maximum number of iterations */
69  multi1d<Real> CoarseResidual; /*!< Coarse-level relative stopping residual */
70 
71 
72  bool ExternalSubspace; /*!< Load an MG Subspace from Named Object Store */
73  std::string SubspaceId; /*!< The ID of the subspace to load/save */
74  Real RsdToleranceFactor; /*!< Slack in tolerance we are willing to accept -- e.g. a factor of 10, or 20% or somesuch */
75  bool TerminateOnFail; /*!< If true, the solver will terminate the program if MaxIters is reached and RsdTarget is not met */
76  };
77 
78 
79  // Reader and writer
80  /*! \ingroup invert */
81  void read(XMLReader& xml, const std::string& path, SysSolverQOPMGParams& param);
82 
83  /*! \ingroup invert */
84  void write(XMLWriter& xml, const std::string& path,
85  const SysSolverQOPMGParams& param);
86 
87 } // End namespace
88 
89 #endif
90 
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
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Parameters for the external QDP multigrid inverter.
multi1d< multi1d< int > > Blocking