CHROMA
MG_predictor.h
Go to the documentation of this file.
1 // MG_predictor.h
2 // Chrono predictor which will be used for incorporating MG into HMC.
3 /*
4  *
5  *
6  * Predictors for HMC
7  */
8 
9 #ifndef __MG_predictor_h__
10 #define __MG_predictor_h__
11 
12 #include "chromabase.h"
15 
16 
17 namespace Chroma
18 {
19 
20  namespace MG4DChronoPredictorEnv
21  {
22  extern const std::string name;
23  bool registerAll();
24  }
25 
26 
27  // MG predictor
28  template<typename T>
30  public AbsMGChronologicalPredictor4D<LatticeFermion>
31  {
32 
33  public:
34 
35  // Destructor is automagic
37 
38  MG4DChronoPredictor(void) : subspace_name("Default"),
39  refresh_rate(0){}
40 
44 
45  MG4DChronoPredictor(const std::string subspace_name_, const int refresh_rate_) :
46  subspace_name(subspace_name_),
47  refresh_rate(refresh_rate_){}
48 
49  void getSubspace()
50  {
51  START_CODE();
52 
53  QDPIO::cout << "MG4DChronoPredictor - Subspace Name: "<<subspace_name<<std::endl;
54 
55  END_CODE();
56  }
57 
58  void resetSubspace(int counter)
59  {
60  START_CODE();
61 
62  QDPIO::cout << "MG4DChronoPredictor - Current Counter: "<<counter<<std::endl;
63  QDPIO::cout << "MG4DChronoPredictor - Refresh Rate: "<<refresh_rate<<std::endl;
64 
65  END_CODE();
66  }
67 
68  void reset(void)
69  {
70 
71  QDPIO::cout<<"MG4DChronoPredictor - Do nothing!"<<std::endl;
72 
73  }
74 
75  void operator()(T& psi,
76  const LinearOperator<T>& A,
77  const T& chi)
78  {
79 
80  QDPIO::cout<<"MG4DChronoPredictor - Do nothing!"<<std::endl;
81 
82  }
83 
84  virtual void newVector(const T& psi)
85  {
86 
87  QDPIO::cout<<"MG4DChronoPredictor - Do nothing!"<<std::endl;
88 
89  }
90 
91 
92  private:
93 
96 
97  };
98 
99 
100 } // End Namespace Chroma
101 
102 #endif
Primary include file for CHROMA library code.
Monomial factories.
Linear Operator.
Definition: linearop.h:27
virtual void newVector(const T &psi)
Definition: MG_predictor.h:84
void resetSubspace(int counter)
Definition: MG_predictor.h:58
MG4DChronoPredictor(const MG4DChronoPredictor &p)
Definition: MG_predictor.h:41
MG4DChronoPredictor(const std::string subspace_name_, const int refresh_rate_)
Definition: MG_predictor.h:45
void operator()(T &psi, const LinearOperator< T > &A, const T &chi)
Definition: MG_predictor.h:75
bool registerAll()
Register all the factories.
Definition: MG_predictor.cc:38
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
START_CODE()
A(A, psi, r, Ncb, PLUS)
::std::string string
Definition: gtest.h:1979