CHROMA
lcm_exp_sdt.cc
Go to the documentation of this file.
1 #include "chromabase.h"
5 #include "io/xmllog_io.h"
6 #include <string>
7 
8 
9 namespace Chroma
10 {
11 
12  namespace LatColMatExpSdtIntegratorEnv
13  {
14  namespace
15  {
17  multi1d<LatticeColorMatrix> >*
18  createMDIntegrator(
19  XMLReader& xml,
20  const std::string& path)
21  {
22  // Read the integrator params
24 
25  return new LatColMatExpSdtIntegrator(p);
26  }
27 
28  //! Local registration flag
29  bool registered = false;
30  }
31 
32  const std::string name = "LCM_EXP_S";
33 
34  //! Register all the factories
35  bool registerAll()
36  {
37  bool success = true;
38  if (! registered)
39  {
40  success &= TheMDComponentIntegratorFactory::Instance().registerObject(name, createMDIntegrator);
41  registered = true;
42  }
43  return success;
44  }
45  }
46 
47 
49  {
50  XMLReader paramtop(xml_in, path);
51  try {
52  read(paramtop, "./n_steps", n_steps);
53  read(paramtop, "./monomial_list", monomial_list);
54  }
55  catch ( const std::string& e ) {
56  QDPIO::cout << "Error reading XML in LatColMatExpSdtIntegratorParams " << e << std::endl;
57  QDP_abort(1);
58  }
59  }
60 
61  void read(XMLReader& xml,
62  const std::string& path,
65  p = tmp;
66  }
67 
68  void write(XMLWriter& xml,
69  const std::string& path,
71  push(xml, path);
72  write(xml, "n_steps", p.n_steps);
73  write(xml, "monomial_list", p.monomial_list);
74  pop(xml);
75  }
76 
78  AbsFieldState<multi1d<LatticeColorMatrix>,
79  multi1d<LatticeColorMatrix> >& s,
80  const Real& traj_length) const
81  {
82 
83  START_CODE();
84  Real dtau = traj_length / n_steps;
85  for(int i=0; i < n_steps; i++) {
87  dtau,
88  s );
89  }
90 
91  END_CODE();
92 
93 
94  }
95 
96 
97 }
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 integrator interface for PQP leapfrog.
Definition: lcm_exp_sdt.h:58
void operator()(AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s, const Real &traj_length) const
Do an integration of length n*delta tau in n steps.
Definition: lcm_exp_sdt.cc:77
multi1d< IntegratorShared::MonomialPair > monomials
Definition: lcm_exp_sdt.h:114
static T & Instance()
Definition: singleton.h:432
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.
Intgrator for exp(S dt)
Integrator factories.
static bool registered
Local registration flag.
void leapP(const multi1d< IntegratorShared::MonomialPair > &monomials, const Real &dt, AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s)
LeapP for just a selected list of monomials.
bool registerAll()
Register all the factories.
Definition: lcm_exp_sdt.cc:35
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
push(xml_out,"Condensates")
int i
Definition: pbg5p_w.cc:55
pop(xml_out)
START_CODE()
multi1d< LatticeFermion > s(Ncb)
::std::string string
Definition: gtest.h:1979
multi1d< std::string > monomial_list
Definition: lcm_exp_sdt.h:38
Singleton instances of xml output.