CHROMA
inline_unsmeared_hadron_node_distillation_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline measurement that construct unsmeared hadron nodes using distillation
4  */
5 
6 #ifndef __inline_unsmeared_hadron_node_distillation_h__
7 #define __inline_unsmeared_hadron_node_distillation_h__
8 
9 #include "chromabase.h"
10 #ifndef QDP_IS_QDPJIT_NO_NVPTX
11 
13 #include "io/qprop_io.h"
14 #include "io/xml_group_reader.h"
15 
16 namespace Chroma
17 {
18  /*! \ingroup inlinehadron */
19  namespace InlineUnsmearedHadronNodeDistillationEnv
20  {
21  bool registerAll();
22 
23 
24  //! Parameter structure
25  /*! \ingroup inlinehadron */
26  struct Params
27  {
28  Params();
29  Params(XMLReader& xml_in, const std::string& path);
30 
31  unsigned long frequency;
32 
33  //! Parameters
34  struct Param_t
35  {
36  GroupXML_t link_smearing; /*!< link smearing xml */
37 
39  {
40  int gamma; /*!< The gamma matrix for this displacement */
41  std::vector<int> displacement; /*!< The displacement path for this gamma */
42  multi1d<int> mom; /*!< Array of momenta to generate */
43  };
44 
46  {
47  bool cacheP;
48  int num_vecs; /*!< Number of color vectors to use */
49  int t_source; /*!< Time slice source for props */
50  int Nt_forward; /*!< Forward */
51  int Nt_backward; /*!< Backward */
52  };
53 
54  struct SinkSource_t
55  {
56  int t_sink; /*!< Time slice for sinks */
57  int t_source; /*!< Time slice source for props */
58  int Nt_backward; /*!< Backward relative to source */
59  int Nt_forward; /*!< Forward relative to source */
60  };
61 
62  struct Contract_t
63  {
64  bool use_derivP; /*!< Use derivatives */
65  int decay_dir; /*!< Decay direction */
66  int displacement_length; /*!< Displacement length for insertions */
67  std::string mass_label; /*!< Some kind of mass label */
68  int num_tries; /*!< In case of bad things happening in the solution vectors, do retries */
69  };
70 
71  std::vector<KeySolnProp_t> prop_sources; /*!< Sources */
72  std::vector<SinkSource_t> sink_source_pairs; /*!< Combos */
73  std::vector<DispGammaMom_t> disp_gamma_mom_list; /*!< Array of displacements, gammas, and moms to generate */
74  ChromaProp_t prop; /*!< Propagator input */
75  Contract_t contract; /*!< Backward propagator and contraction pieces */
76  };
77 
79  {
80  std::string gauge_id; /*!< Gauge field */
81  std::vector<std::string> colorvec_files; /*!< Eigenvectors in mod format */
82  std::string dist_op_file; /*!< File name for propagator matrix elements */
83  };
84 
85  Param_t param; /*!< Parameters */
86  NamedObject_t named_obj; /*!< Named objects */
87  std::string xml_file; /*!< Alternate XML file pattern */
88  };
89 
90 
91  //! Inline measurement that construct hadron nodes using distillution
92  /*! \ingroup inlinehadron */
94  {
95  public:
97  InlineMeas(const Params& p) : params(p) {}
99 
100  unsigned long getFrequency(void) const {return params.frequency;}
101 
102  //! Do the measurement
103  void operator()(const unsigned long update_no,
104  XMLWriter& xml_out);
105 
106  protected:
107  //! Do the measurement
108  void func(const unsigned long update_no,
109  XMLWriter& xml_out);
110 
111  private:
113  };
114 
115  } // namespace InlineUnsmearedHadronNodeDistillationEnv
116 }
117 #endif
118 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
Inline measurement that construct hadron nodes using distillution.
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
Routines associated with Chroma propagator IO.
Propagator parameters.
Definition: qprop_io.h:75
Hold group xml and type id.
Read an XML group as a std::string.