CHROMA
inline_glue_diag_matelem_colorvec.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline measurement of glueball operators via colorstd::vector matrix elements
4  */
5 
6 #ifndef __inline_glue_diag_matelem_colorvec_h__
7 #define __inline_glue_diag_matelem_colorvec_h__
8 
10 #include "io/xml_group_reader.h"
11 
12 namespace Chroma
13 {
14  /*! \ingroup inlineglue */
15  namespace InlineGlueDiagMatElemColorVecEnv
16  {
17  bool registerAll();
18 
19 
20  //! Parameter structure
21  /*! \ingroup inlineglue */
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_max; /*!< (mom)^2 <= mom2_max */
33  int displacement_length; /*!< Displacement length for creat. and annih. ops */
34  int num_vecs; /*!< Number of color vectors to use */
35  int decay_dir; /*!< Decay direction */
36  multi1d< multi1d<int> > displacement_list; /*!< Array of displacements list to generate */
37  GroupXML_t link_smearing; /*!< link smearing xml */
38  };
39 
41  {
42  std::string gauge_id; /*!< Gauge field */
43  std::string colorvec_id; /*!< LatticeColorVector EigenInfo */
44  std::string glue_op_file; /*!< File name for creation operators */
45  };
46 
47  Param_t param; /*!< Parameters */
48  NamedObject_t named_obj; /*!< Named objects */
49  std::string xml_file; /*!< Alternate XML file pattern */
50  };
51 
52 
53  //! Inline measurement of glueball operators via colorstd::vector matrix elements
54  /*! \ingroup inlineglue */
56  {
57  public:
59  InlineMeas(const Params& p) : params(p) {}
61 
62  unsigned long getFrequency(void) const {return params.frequency;}
63 
64  //! Do the measurement
65  void operator()(const unsigned long update_no,
66  XMLWriter& xml_out);
67 
68  protected:
69  //! Do the measurement
70  void func(const unsigned long update_no,
71  XMLWriter& xml_out);
72 
73  private:
75  };
76 
77  } // namespace InlineGlueDiagMatElemColorVecEnv
78 }
79 
80 #endif
Abstract inline measurements.
Inline measurement of glueball operators via colorstd::vector matrix elements.
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.
void func(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.