CHROMA
inline_baryon_matelem_colorvec_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline measurement of baryon
4  operators via colorstd::vector matrix elements
5  */
6 
7 #ifndef __inline_baryon_matelem_colorvec_h__
8 #define __inline_baryon_matelem_colorvec_h__
9 
11 #include "io/xml_group_reader.h"
12 
13 namespace Chroma
14 {
15  /*! \ingroup inlinehadron */
16  namespace InlineBaryonMatElemColorVecEnv
17  {
18  bool registerAll();
19 
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  {
34  {
35  multi1d<int> left; /*!< Left quark displacement array */
36  multi1d<int> middle; /*!< Middle quark displacement array */
37  multi1d<int> right; /*!< Rifht quark displacement array */
38  };
39 
40  bool use_derivP; /*!< Are these displacements or derivatives? */
41  int mom2_max; /*!< (mom)^2 <= mom2_max */
42  int displacement_length; /*!< Displacement length for creat. and annih. ops */
43  int num_vecs; /*!< Number of color vectors to use */
44  int decay_dir; /*!< Decay direction */
45  multi1d<Displacement_t> displacement_list; /*!< Array of displacements list to generate */
46  GroupXML_t link_smearing; /*!< link smearing xml */
47 
48  // This all may need some work
49  bool site_orthog_basis; /*!< Whether all the basis vectors are site level orthog */
50  };
51 
53  {
54  std::string gauge_id; /*!< Gauge field */
55  std::string colorvec_id; /*!< LatticeColorVector EigenInfo */
56  std::string baryon_op_file; /*!< File name for creation operators */
57  };
58 
59  Param_t param; /*!< Parameters */
60  NamedObject_t named_obj; /*!< Named objects */
61  std::string xml_file; /*!< Alternate XML file pattern */
62  };
63 
64 
65  //! Inline measurement of baryon operators via colorstd::vector matrix elements
66  /*! \ingroup inlinehadron */
68  {
69  public:
71  InlineMeas(const Params& p) : params(p) {}
73 
74  unsigned long getFrequency(void) const {return params.frequency;}
75 
76  //! Do the measurement
77  void operator()(const unsigned long update_no,
78  XMLWriter& xml_out);
79 
80  protected:
81  //! Do the measurement
82  void func(const unsigned long update_no,
83  XMLWriter& xml_out);
84 
85  private:
87  };
88 
89  } // namespace InlineBaryonMatElemColorVecEnv
90 }
91 
92 #endif
Abstract inline measurements.
Inline measurement of baryon operators via colorstd::vector matrix elements.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
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.
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.