CHROMA
inline_meson_matelem_colorvec_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline measurement of meson operators via colorstd::vector matrix elements
4  */
5 
6 #ifndef __inline_meson_matelem_colorvec_h__
7 #define __inline_meson_matelem_colorvec_h__
8 
10 #include "io/xml_group_reader.h"
11 
12 namespace Chroma
13 {
14  /*! \ingroup inlinehadron */
15  namespace InlineMesonMatElemColorVecEnv
16  {
17  bool registerAll();
18 
19 
20  //! Parameter structure
21  /*! \ingroup inlinehadron */
22  struct Params
23  {
24  Params();
25  Params(XMLReader& xml_in, const std::string& path);
26  void writeXML(XMLWriter& xml_out, const std::string& path) const;
27 
28  unsigned long frequency;
29 
30  struct Param_t
31  {
32  int mom2_min; /*!< (mom)^2 >= mom2_min */
33  int mom2_max; /*!< (mom)^2 <= mom2_max */
34  multi1d< multi1d<int> > mom_list; /*!< Array of momenta to generate */
35  int displacement_length; /*!< Displacement length for creat. and annih. ops */
36  int num_vecs; /*!< Number of color vectors to use */
37  int decay_dir; /*!< Decay direction */
38  multi1d< multi1d<int> > displacement_list; /*!< Array of displacements list to generate */
39  GroupXML_t link_smearing; /*!< link smearing xml */
40 
41  // This all may need some work
42  bool orthog_basis; /*!< Whether all the basis vectors are orthog */
43  };
44 
46  {
47  std::string gauge_id; /*!< Gauge field */
48  std::string colorvec_id; /*!< LatticeColorVector EigenInfo */
49  std::string meson_op_file; /*!< File name for creation operators */
50  };
51 
52  Param_t param; /*!< Parameters */
53  NamedObject_t named_obj; /*!< Named objects */
54  std::string xml_file; /*!< Alternate XML file pattern */
55  };
56 
57 
58  //! Inline measurement of meson operators via colorstd::vector matrix elements
59  /*! \ingroup inlinehadron */
61  {
62  public:
64  InlineMeas(const Params& p) : params(p) {}
66 
67  unsigned long getFrequency(void) const {return params.frequency;}
68 
69  //! Do the measurement
70  void operator()(const unsigned long update_no,
71  XMLWriter& xml_out);
72 
73  protected:
74  //! Do the measurement
75  void func(const unsigned long update_no,
76  XMLWriter& xml_out);
77 
78  private:
80  };
81 
82  } // namespace InlineMesonMatElemColorVecEnv
83 }
84 
85 #endif
Abstract inline measurements.
Inline measurement of meson operators via colorstd::vector matrix elements.
void func(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.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
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.