CHROMA
lcm_toplevel_integrator.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 #ifndef __LCM_TOPLEVEL_INTEGRATOR_H_
4 #define __LCM_TOPLEVEL_INTEGRATOR_H_
5 
6 #include "chromabase.h"
8 
9 using namespace QDP;
10 
11 namespace Chroma {
12 
13  //! A Struct for holding pairs of IDs in the copy list
14  struct IDPair {
17  };
18 
19  //! A reader for an element of the copy list
20  void read(XMLReader& xml, const std::string& path, IDPair& p);
21 
22  //! A Writer for an element of the copy list
23  void write(XMLWriter& xml, const std::string& path, const IDPair& p);
24 
25 
26  //! A Structure to hold the top level parameters
28 
29  //! Construct from XML
30  LCMToplevelIntegratorParams(XMLReader& xml, const std::string& path);
31  Real tau0;
32  multi1d<IDPair> copy_list;
34  bool anisoP;
35  int t_dir;
36  Real xi_mom;
37 
38  };
39 
40  //! Read the Integrator Params
41  void read(XMLReader& xml, const std::string& path, LCMToplevelIntegratorParams& p);
42 
43  //! Write the Integrator Params
44  void write(XMLWriter& xml, const std::string& path, const LCMToplevelIntegratorParams& p);
45 
46  class LCMToplevelIntegrator : public
47  AbsMDIntegrator< multi1d<LatticeColorMatrix>,
48  multi1d<LatticeColorMatrix> >
49  {
50  public:
51 
52  //! Construct from parameters.
54 
55  //! Copy Constructor
56  LCMToplevelIntegrator(const LCMToplevelIntegrator& i) : params(i.params), top_integrator(i.top_integrator) {}
57 
58  //! Destructor is automagic
60 
61  //! Get the length of a trajectory
62  Real getTrajLength(void) const {
63  return params.tau0;
64  }
65 
66  //! Copy fields between the monomials of a copy list
67  void copyFields(void) const;
68 
70  multi1d<LatticeColorMatrix> >& getIntegrator(void) const {
71  return *top_integrator;
72  }
73 
74  private:
77  multi1d<LatticeColorMatrix> > > top_integrator;
78  };
79 
80 
81 }
82 
83 
84 #endif
Integrators.
Primary include file for CHROMA library code.
MD integrator that can be used as a component for other integrators.
New MD integrator interface.
Class for counted reference semantics.
Definition: handle.h:33
LCMToplevelIntegratorParams params
AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > & getIntegrator(void) const
Get the toplevel sub integrator.
Handle< AbsComponentIntegrator< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > top_integrator
~LCMToplevelIntegrator()
Destructor is automagic.
Real getTrajLength(void) const
Get the length of a trajectory.
LCMToplevelIntegrator(const LCMToplevelIntegrator &i)
Copy Constructor.
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.
Params params
unsigned i
Definition: ldumul_w.cc:34
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
A Struct for holding pairs of IDs in the copy list.
A Structure to hold the top level parameters.