CHROMA
lcm_4mn5fv_recursive.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*! @file
4  * @brief Lat Col Mat 4th order 5 force calculation minimum norm integrator
5  *
6  * The 4th order 5 force calculation minimum norm integrator (velocity variant)
7  * from the paper by Takaishi and deForcrand (eq 24-25). Made recursive through
8  * replacing the Momentum update term with a subIntegrator call.
9  */
10 
11 #ifndef LCM_4MN5FV_RECURSIVE_H
12 #define LCM_4MN5FV_RECURSIVE_H
13 
14 
15 #include "chromabase.h"
19 
20 namespace Chroma
21 {
22 
23  /*! @ingroup integrator */
24  namespace LatColMat4MN5FVRecursiveIntegratorEnv
25  {
26  extern const std::string name;
27  bool registerAll();
28  }
29 
30 
31  /*! @ingroup integrator */
33  {
35  LatColMat4MN5FVRecursiveIntegratorParams(XMLReader& xml, const std::string& path);
36  int n_steps;
37  Real theta;
38  Real rho;
39  Real lambda;
40  Real mu;
41 
42  multi1d<std::string> monomial_ids;
44  };
45 
46  /*! @ingroup integrator */
47  void read(XMLReader& xml_in,
48  const std::string& path,
50 
51  /*! @ingroup integrator */
52  void write(XMLWriter& xml_out,
53  const std::string& path,
55 
56  //! MD integrator interface for 4th order 5 Force Min. Norm. Integrator (Velocity variant)
57  /*! @ingroup integrator
58  * Specialised to multi1d<LatticeColorMatrix>
59  */
61  : public AbsRecursiveIntegrator<multi1d<LatticeColorMatrix>,
62  multi1d<LatticeColorMatrix> >
63  {
64  public:
65 
66  // Construct from params struct and Hamiltonian
69  ) : params(p), SubIntegrator(IntegratorShared::createSubIntegrator(p.subintegrator_xml)) {
71  }
72 
73 
74  // Copy constructor
77 
78  // ! Destruction is automagic
80 
81 
82  void operator()( AbsFieldState<multi1d<LatticeColorMatrix>,
83  multi1d<LatticeColorMatrix> >& s,
84  const Real& traj_length) const;
85 
87  multi1d<LatticeColorMatrix> >& getSubIntegrator() const {
88  return (*SubIntegrator);
89  }
90 
91  protected:
92  //! Refresh fields in just this level
93  void refreshFieldsThisLevel(AbsFieldState<multi1d<LatticeColorMatrix>,
94  multi1d<LatticeColorMatrix> >& s) const {
95  for(int i=0; i < monomials.size(); i++) {
96  monomials[i].mon->refreshInternalFields(s);
97  }
98  }
99 
100  //! Reset Predictors in just this level
101  void resetPredictorsThisLevel(void) const {
102  for(int i=0; i < monomials.size(); ++i) {
103  monomials[i].mon->resetPredictors();
104  }
105  }
106 
107  private:
109 
110 
111  multi1d< IntegratorShared::MonomialPair > monomials;
112 
114  multi1d<LatticeColorMatrix> > > SubIntegrator;
115 
116 
117 
118  };
119 
120 }
121 
122 
123 #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 5 Force Min. Norm. Integrator (Velocity variant)
LatColMat4MN5FVRecursiveIntegratorParams params
multi1d< IntegratorShared::MonomialPair > monomials
LatColMat4MN5FVRecursiveIntegrator(const LatColMat4MN5FVRecursiveIntegrator &l)
void refreshFieldsThisLevel(AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s) const
Refresh fields in just this level.
Handle< AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > SubIntegrator
AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > & getSubIntegrator() const
Return the next level down integrator.
void resetPredictorsThisLevel(void) const
Reset Predictors in just this level.
LatColMat4MN5FVRecursiveIntegrator(const LatColMat4MN5FVRecursiveIntegratorParams &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 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