CHROMA
lcm_creutz_gocksch_4_recursive.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*! @file
4  * @brief Lat Col Mat 4th order Creutz-Gocksch (Campostrini?) Integrator
5  *
6  * Integrator that is accurate to 5th order per time step or 4th order
7  * per trajectory. Creutz-Gocksch (Campostrini?) Construction. This
8  * particular one is from the paper of Sexton and Weingarten eq: 6.1
9  */
10 
11 #ifndef LCM_CREUTZ_GOCKSCH_RECURSIVE_4_H
12 #define LCM_CREUTZ_GOCKSCH_RECURSIVE_4_H
13 
14 
15 #include "chromabase.h"
19 
20 namespace Chroma
21 {
22 
23  /*! @ingroup integrator */
24  namespace LatColMatCreutzGocksch4RecursiveIntegratorEnv
25  {
26  extern const std::string name;
27  bool registerAll();
28  }
29 
30 
31  /*! @ingroup integrator */
33  {
36  int n_steps;
37 
38  multi1d<std::string> monomial_ids;
40  };
41 
42  /*! @ingroup integrator */
43  void read(XMLReader& xml_in,
44  const std::string& path,
46 
47  /*! @ingroup integrator */
48  void write(XMLWriter& xml_out,
49  const std::string& path,
51 
52  //! MD integrator interface for 4th order 5 Force Min. Norm. Integrator (Velocity variant)
53  /*! @ingroup integrator
54  * Specialised to multi1d<LatticeColorMatrix>
55  */
57  : public AbsRecursiveIntegrator<multi1d<LatticeColorMatrix>,
58  multi1d<LatticeColorMatrix> >
59  {
60  public:
61 
62  // Construct from params struct and Hamiltonian
65  ) : params(p), SubIntegrator(IntegratorShared::createSubIntegrator(p.subintegrator_xml)) {
67  }
68 
69 
70  // Copy constructor
73 
74  // ! Destruction is automagic
76 
77 
78  void operator()( AbsFieldState<multi1d<LatticeColorMatrix>,
79  multi1d<LatticeColorMatrix> >& s,
80  const Real& traj_length) const;
81 
83  multi1d<LatticeColorMatrix> >& getSubIntegrator() const {
84  return (*SubIntegrator);
85  }
86 
87  protected:
88  //! Refresh fields in just this level
89  void refreshFieldsThisLevel(AbsFieldState<multi1d<LatticeColorMatrix>,
90  multi1d<LatticeColorMatrix> >& s) const {
91  for(int i=0; i < monomials.size(); i++) {
92  monomials[i].mon->refreshInternalFields(s);
93  }
94  }
95 
96 
97  //! Reset Predictors in just this level
98  void resetPredictorsThisLevel(void) const {
99  for(int i=0; i < monomials.size(); ++i) {
100  monomials[i].mon->resetPredictors();
101  }
102  }
103 
104  private:
106 
107 
108  multi1d< IntegratorShared::MonomialPair > monomials;
109 
111  multi1d<LatticeColorMatrix> > > SubIntegrator;
112 
113 
114 
115  };
116 
117 }
118 
119 
120 #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)
LatColMatCreutzGocksch4RecursiveIntegrator(const LatColMatCreutzGocksch4RecursiveIntegratorParams &p)
AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > & getSubIntegrator() const
Return the next level down integrator.
LatColMatCreutzGocksch4RecursiveIntegrator(const LatColMatCreutzGocksch4RecursiveIntegrator &l)
Handle< AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > SubIntegrator
void refreshFieldsThisLevel(AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s) const
Refresh fields in just this level.
LatColMatCreutzGocksch4RecursiveIntegratorParams params
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 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.
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