CHROMA
inline_genprop_matelem_pt_colorvec_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Compute the matrix element of LatticeColorVector*M^-1*Gamma*M^-1**LatticeColorVector
4  *
5  * Generalized propagator calculation on a colorstd::vector
6  */
7 
8 #ifndef __inline_genprop_matelem_pt_colorvec_h__
9 #define __inline_genprop_matelem_pt_colorvec_h__
10 
12 #include "io/xml_group_reader.h"
13 
14 namespace Chroma
15 {
16  /*! \ingroup inlinehadron */
17  namespace InlineGenPropMatElemPtColorVecEnv
18  {
19  bool registerAll();
20 
21  //! Parameter structure
22  /*! \ingroup inlinehadron */
23  struct Params
24  {
25  Params();
26  Params(XMLReader& xml_in, const std::string& path);
27  void writeXML(XMLWriter& xml_out, const std::string& path) const;
28 
29  unsigned long frequency;
30 
31  struct Param_t
32  {
33  bool restrict_plateau; /*!< Restrict the time slices save to the plateau region */
34  bool avg_equiv_mom; /*!< Average the genprop over rotations of momenta at fixed mom^2 */
35  int t_sink; /*!< Sink time slice for props */
36  int mom2_max; /*!< (mom)^2 <= mom2_max */
37  multi1d<int> mom_offset; /*!< Momentum origin - the mom2_max will be around here */
38  int displacement_length; /*!< Displacement length for creat. and annih. ops */
39  int num_vecs; /*!< Number of color vectors to use */
40  std::string mass_label; /*!< Some kind of mass label */
41 
42  struct DispGamma_t
43  {
44  int gamma; /*!< The gamma matrix for this displacement */
45  multi1d<int> displacement; /*!< The displacement path for this gamma */
46  };
47 
48  multi1d<DispGamma_t> disp_gamma_list; /*!< Array of displacements and gammas to generate */
49 
50  GroupXML_t link_smearing; /*!< link smearing xml */
51  };
52 
54  {
55  std::string gauge_id; /*!< Gauge field */
56  std::string source_prop_id; /*!< Id for input propagator solutions */
57  std::string sink_prop_id; /*!< Id for input propagator solutions */
58  std::string genprop_op_file; /*!< File for generalized propagators operators */
59  };
60 
61  Param_t param; /*!< Parameters */
62  NamedObject_t named_obj; /*!< Named objects */
63  std::string xml_file; /*!< Alternate XML file pattern */
64  };
65 
66 
67  //! Compute the matrix element of LatticeColorVector*M^-1*Gamma*M^-1**LatticeColorVector
68  /*! \ingroup inlinehadron */
70  {
71  public:
73  InlineMeas(const Params& p) : params(p) {}
75 
76  unsigned long getFrequency(void) const {return params.frequency;}
77 
78  //! Do the measurement
79  void operator()(const unsigned long update_no,
80  XMLWriter& xml_out);
81 
82  protected:
83  //! Do the measurement
84  void func(const unsigned long update_no,
85  XMLWriter& xml_out);
86 
87  private:
89  };
90 
91  } // namespace InlineGenPropMatElemPtColorVecEnv
92 }
93 
94 #endif
Abstract inline measurements.
Compute the matrix element of LatticeColorVector*M^-1*Gamma*M^-1**LatticeColorVector.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Hold group xml and type id.
void writeXML(XMLWriter &xml_out, const std::string &path) const
Read an XML group as a std::string.