CHROMA
lcm_sts_min_norm2_recursive.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*! @file
4  * @brief Intgrator for exp(S dt)
5  *
6  * A component integrator to integrate exp(Sdt) for some
7  * monomial list S (ie this is a leapP like component)
8  */
9 
10 #ifndef LCM_MIN_NORM2_RECURSIVE_H
11 #define LCM_MIN_NORM2_RECURSIVE_H
12 
13 
14 #include "chromabase.h"
18 
19 namespace Chroma
20 {
21 
22  /*! @ingroup integrator */
23  namespace LatColMatSTSMinNorm2RecursiveIntegratorEnv
24  {
25  extern const std::string name;
26  bool registerAll();
27  }
28 
29 
30  /*! @ingroup integrator */
32  {
35  int n_steps;
36  Real lambda;
37  multi1d<std::string> monomial_ids;
39  };
40 
41  /*! @ingroup integrator */
42  void read(XMLReader& xml_in,
43  const std::string& path,
45 
46  /*! @ingroup integrator */
47  void write(XMLWriter& xml_out,
48  const std::string& path,
50 
51  //! MD integrator interface for PQP leapfrog
52  /*! @ingroup integrator
53  * Specialised to multi1d<LatticeColorMatrix>
54  */
56  : public AbsRecursiveIntegrator<multi1d<LatticeColorMatrix>,
57  multi1d<LatticeColorMatrix> >
58  {
59  public:
60 
61  // Simplest Constructor
63  const multi1d<std::string>& monomial_ids_,
64  Real lambda_,
65 
66  Handle< AbsComponentIntegrator< multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > >& SubIntegrator_) : n_steps(n_steps_), lambda(lambda_), SubIntegrator(SubIntegrator_) {
67 
69  };
70 
71  // Construct from params struct and Hamiltonian
74 
76 
77  }
78 
79 
80  // Copy constructor
83 
84  // ! Destruction is automagic
86 
87 
88  void operator()( AbsFieldState<multi1d<LatticeColorMatrix>,
89  multi1d<LatticeColorMatrix> >& s,
90  const Real& traj_length) const;
91 
93  multi1d<LatticeColorMatrix> >& getSubIntegrator() const {
94  return (*SubIntegrator);
95  }
96 
97  protected:
98  //! Refresh fields in just this level
99  void refreshFieldsThisLevel(AbsFieldState<multi1d<LatticeColorMatrix>,
100  multi1d<LatticeColorMatrix> >& s) const {
101  for(int i=0; i < monomials.size(); i++) {
102  monomials[i].mon->refreshInternalFields(s);
103  }
104  }
105 
106  //! Reset Predictors in just this level
107  void resetPredictorsThisLevel(void) const {
108  for(int i=0; i < monomials.size(); ++i) {
109  monomials[i].mon->resetPredictors();
110  }
111  }
112 
113  private:
114 
115  int n_steps;
116  Real lambda;
117 
118  multi1d< IntegratorShared::MonomialPair > monomials;
119 
121  multi1d<LatticeColorMatrix> > > SubIntegrator;
122 
123 
124  };
125 
126 }
127 
128 
129 #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 PQP leapfrog.
LatColMatSTSMinNorm2RecursiveIntegrator(const LatColMatSTSMinNorm2RecursiveIntegrator &l)
void refreshFieldsThisLevel(AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s) const
Refresh fields in just this level.
LatColMatSTSMinNorm2RecursiveIntegrator(const LatColMatSTSMinNorm2RecursiveIntegratorParams &p)
AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > & getSubIntegrator() const
Return the next level down integrator.
void operator()(AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s, const Real &traj_length) const
Do an integration of lenght n*delta tau in n steps.
Handle< AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > SubIntegrator
LatColMatSTSMinNorm2RecursiveIntegrator(int n_steps_, const multi1d< std::string > &monomial_ids_, Real lambda_, Handle< AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > &SubIntegrator_)
multi1d< IntegratorShared::MonomialPair > monomials
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