CHROMA
lcm_4mn4fp_recursive.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*! @file
4  * @brief Lat Col Mat 4th order 4 force calculation minimum norm integrator
5  *
6  * The 4th order 4 force calculation minimum norm integrator (position variant)
7  * from the paper by Takaishi and deForcrand (eq 26-27). Made recursive through
8  * replacing the Momentum update term with a subIntegrator call.
9  */
10 
11 #ifndef LCM_4MN4FP_RECURSIVE_H
12 #define LCM_4MN4FP_RECURSIVE_H
13 
14 
15 #include "chromabase.h"
19 
20 namespace Chroma
21 {
22 
23  /*! @ingroup integrator */
24  namespace LatColMat4MN4FPRecursiveIntegratorEnv
25  {
26  extern const std::string name;
27  bool registerAll();
28  }
29 
30 
31  /*! @ingroup integrator */
33  {
35  LatColMat4MN4FPRecursiveIntegratorParams(XMLReader& xml, const std::string& path);
36  int n_steps;
37  Real theta;
38  Real rho;
39  Real lambda;
40 
41  multi1d<std::string> monomial_ids;
43  };
44 
45  /*! @ingroup integrator */
46  void read(XMLReader& xml_in,
47  const std::string& path,
49 
50  /*! @ingroup integrator */
51  void write(XMLWriter& xml_out,
52  const std::string& path,
54 
55  //! MD integrator interface for 4th order 4 Force Min. Norm. Integrator (position variant)
56  /*! @ingroup integrator
57  * Specialised to multi1d<LatticeColorMatrix>
58  */
60  : public AbsRecursiveIntegrator<multi1d<LatticeColorMatrix>,
61  multi1d<LatticeColorMatrix> >
62  {
63  public:
64 
65  // Construct from params struct and Hamiltonian
68  ) : params(p), SubIntegrator(IntegratorShared::createSubIntegrator(p.subintegrator_xml)) {
70  }
71 
72 
73  // Copy constructor
76 
77  // ! Destruction is automagic
79 
80 
81  void operator()( AbsFieldState<multi1d<LatticeColorMatrix>,
82  multi1d<LatticeColorMatrix> >& s,
83  const Real& traj_length) const;
84 
86  multi1d<LatticeColorMatrix> >& getSubIntegrator() const {
87  return (*SubIntegrator);
88  }
89 
90  protected:
91  //! Refresh fields in just this level
92  void refreshFieldsThisLevel(AbsFieldState<multi1d<LatticeColorMatrix>,
93  multi1d<LatticeColorMatrix> >& s) const {
94  for(int i=0; i < monomials.size(); i++) {
95  monomials[i].mon->refreshInternalFields(s);
96  }
97  }
98 
99  //! Reset Predictors in just this level
100  void resetPredictorsThisLevel(void) const {
101  for(int i=0; i < monomials.size(); ++i) {
102  monomials[i].mon->resetPredictors();
103  }
104  }
105  private:
107 
108 
109  multi1d< IntegratorShared::MonomialPair > monomials;
110 
112  multi1d<LatticeColorMatrix> > > SubIntegrator;
113 
114 
115 
116  };
117 
118 }
119 
120 
121 #endif
Abstract Hamiltonian.
Integrators.
Primary include file for CHROMA library code.
MD integrator that can be used as a component for other integrators.
Abstract field state.
Definition: field_state.h:27
MD component integrator that has a sub integrator (recursive)
Class for counted reference semantics.
Definition: handle.h:33
MD integrator interface for 4th order 4 Force Min. Norm. Integrator (position variant)
multi1d< IntegratorShared::MonomialPair > monomials
AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > & getSubIntegrator() const
Return the next level down integrator.
LatColMat4MN4FPRecursiveIntegrator(const LatColMat4MN4FPRecursiveIntegrator &l)
LatColMat4MN4FPRecursiveIntegrator(const LatColMat4MN4FPRecursiveIntegratorParams &p)
void operator()(AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s, const Real &traj_length) const
Do an integration of lenght n*delta tau in n steps.
void refreshFieldsThisLevel(AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s) const
Refresh fields in just this level.
Handle< AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > SubIntegrator
LatColMat4MN4FPRecursiveIntegratorParams params
void resetPredictorsThisLevel(void) const
Reset Predictors in just this level.
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.
AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > * createSubIntegrator(const std::string &subintegrator_xml)
A routine to create a sub integrator from a generic piece of subintegrator XML.
void bindMonomials(const multi1d< std::string > &monomial_ids, multi1d< MonomialPair > &monomials)
A routine to bind Monomial IDs to an array of Monomial Handles.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int i
Definition: pbg5p_w.cc:55
multi1d< LatticeFermion > s(Ncb)
::std::string string
Definition: gtest.h:1979
int l
Definition: pade_trln_w.cc:111