CHROMA
inline_create_colorvecs.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Construct colorvectors via power iteration of the laplacian
4  */
5 
6 #ifndef __inline_create_colorvecs_h__
7 #define __inline_create_colorvecs_h__
8 
9 #include "chromabase.h"
11 #include "io/xml_group_reader.h"
12 
13 namespace Chroma
14 {
15  /*! \ingroup inlinehadron */
16  namespace InlineCreateColorVecsEnv
17  {
18  bool registerAll();
19 
20  //! Parameter structure
21  /*! \ingroup inlinehadron */
22  struct Params
23  {
24  Params();
25  Params(XMLReader& xml_in, const std::string& path);
26 
27  unsigned long frequency;
28 
29  struct Param_t
30  {
31  int num_vecs; /*!< Number of vectors */
32  int decay_dir; /*!< Decay direction */
33  int num_iter; /*!< Number of hits/iterations of the gaussian smearing */
34  Real width; /*!< Smearing width - same conventions as gaussian quark smearing */
35  int num_orthog; /*!< Number of hits/iterations of orthogonalization step */
36  GroupXML_t link_smear; /*!< link smearing xml */
37  };
38 
40  {
41  std::string gauge_id; /*!< Gauge field */
42  std::string colorvec_id; /*!< Output colorvec id */
43  GroupXML_t colorvec_obj; /*!< Output colorvecs */
44  };
45 
46  Param_t param; /*!< Parameters */
47  NamedObject_t named_obj; /*!< Named objects */
48  std::string xml_file; /*!< Alternate XML file pattern */
49  };
50 
51 
52  //! Inline task for creating colorvectors
53  /*! \ingroup inlinehadron */
55  {
56  public:
58  InlineMeas(const Params& p) : params(p) {}
60 
61  unsigned long getFrequency(void) const {return params.frequency;}
62 
63  //! Do the measurement
64  void operator()(const unsigned long update_no,
65  XMLWriter& xml_out);
66 
67  protected:
68  //! Do the measurement
69  void func(const unsigned long update_no,
70  XMLWriter& xml_out);
71 
72  private:
74  };
75 
76  } // namespace CreateColorVecsEnv
77 
78 }
79 
80 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
Inline task for creating colorvectors.
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.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Hold group xml and type id.
Read an XML group as a std::string.