CHROMA
null_predictor.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Null predictor: Leaves input x0 unchanged
4  *
5  * Predictors for HMC
6  */
7 
8 #ifndef __null_predictor_h__
9 #define __null_predictor_h__
10 
11 #include "chromabase.h"
14 
15 
16 namespace Chroma
17 {
18 
19  /*! @ingroup predictor */
20  namespace Null4DChronoPredictorEnv
21  {
22  extern const std::string name;
23  bool registerAll();
24  }
25 
26  //! Zero initial guess predictor
27  /*! @ingroup predictor */
29  public AbsTwoStepChronologicalPredictor4D<LatticeFermion>
30  {
31  public:
32 
33  // Destructor is automagic
35 
36  // Zero out psi -- it is a zero guess after all
37  void predictX(LatticeFermion& X,
39  const LatticeFermion& chi)
40  {
41  START_CODE();
42 
43  QDPIO::cout << "Null Predictor Predict X: Leaving guess unchanged" << std::endl;
44 
45  END_CODE();
46  }
47 
48  void predictY(LatticeFermion& Y,
50  const LatticeFermion& chi)
51  {
52  START_CODE();
53  QDPIO::cout << "Null Predictor Predict Y: Leaving guess unchanged" << std::endl;
54 
55  END_CODE();
56  }
57 
58 
59 
60  // No internal state so reset is a nop
61  void reset(void) {
62  }
63 
64  // Ignore new std::vector
65  void newXVector(const LatticeFermion& psi) {
66  // Nothing
67  }
68 
69  void newYVector(const LatticeFermion& psi) {
70  // Nothing
71  }
72 
73  };
74 
75 
76 
77  /*! @ingroup predictor */
78  namespace Null5DChronoPredictorEnv
79  {
80  extern const std::string name;
81  bool registerAll();
82  }
83 
84  //! Zero initial guess predictor
85  /*! @ingroup predictor */
87  public AbsChronologicalPredictor5D<LatticeFermion>
88  {
89  public:
91 
92  // Creation
93  Null5DChronoPredictor(const int N5_) {}
94 
95  // Copying
97  {}
98 
99  // Zero out psi -- it is a zero guess after all
100  void operator()(multi1d<LatticeFermion>& psi,
102  const multi1d<LatticeFermion>& chi)
103  {
104  }
105 
106 
107  // No internal state so reset is a Nop
108  void reset(void) {
109  }
110 
111  // Ignore new std::vector
112  void newVector(const multi1d<LatticeFermion>& psi) {
113  }
114 
115  };
116 
117 } // End Namespace Chroma
118 
119 #endif
Primary include file for CHROMA library code.
Chronological predictor for HMC.
Monomial factories.
Abstract interface for a Chronological Solution predictor in 5D.
Abstract interface for a Chronological Solution predictor.
Linear Operator to arrays.
Definition: linearop.h:61
Zero initial guess predictor.
void newYVector(const LatticeFermion &psi)
void predictY(LatticeFermion &Y, const LinearOperator< LatticeFermion > &A, const LatticeFermion &chi)
void newXVector(const LatticeFermion &psi)
void predictX(LatticeFermion &X, const LinearOperator< LatticeFermion > &A, const LatticeFermion &chi)
Zero initial guess predictor.
void operator()(multi1d< LatticeFermion > &psi, const LinearOperatorArray< LatticeFermion > &A, const multi1d< LatticeFermion > &chi)
Null5DChronoPredictor(const Null5DChronoPredictor &p)
void newVector(const multi1d< LatticeFermion > &psi)
Null5DChronoPredictor(const int N5_)
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
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