CHROMA
key_prop_distillution.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Key for distillution propagator sources and solutions
3  */
4 
6 #include <vector>
7 
8 namespace Chroma
9 {
10  //----------------------------------------------------------------------------
11  //! Diagnostics
12  StandardOutputStream& operator<<(StandardOutputStream& os, const KeyPropDistillution_t& param)
13  {
14  os << "KeyPropDistillution_t:";
15  os << " prop_type= " << param.prop_type;
16  os << " annihP= " << param.annihP;
17  os << " t_slice= " << param.t_slice;
18  os << " t_source= " << param.t_source;
19  os << " spin_snk= " << param.spin_snk;
20  os << " spin_src= " << param.spin_src;
21  os << " dist_src= " << param.dist_src;
22  os << " quark_line= " << param.quark_line;
23  os << " mass= " << param.mass;
24  os << std::endl;
25 
26  return os;
27  }
28 
29  //----------------------------------------------------------------------------
30  // KeyPropDist read
31  void read(BinaryReader& bin, KeyPropDistillution_t& param)
32  {
33  readDesc(bin, param.prop_type);
34  read(bin, param.annihP);
35  read(bin, param.t_source);
36  read(bin, param.t_slice);
37  read(bin, param.dist_src);
38  read(bin, param.spin_src);
39  read(bin, param.spin_snk);
40  read(bin, param.quark_line);
41  readDesc(bin, param.mass);
42  }
43 
44  // KeyPropDist write
45  void write(BinaryWriter& bin, const KeyPropDistillution_t& param)
46  {
47  writeDesc(bin, param.prop_type);
48  write(bin, param.annihP);
49  write(bin, param.t_source);
50  write(bin, param.t_slice);
51  write(bin, param.dist_src);
52  write(bin, param.spin_src);
53  write(bin, param.spin_snk);
54  write(bin, param.quark_line);
55  writeDesc(bin, param.mass);
56  }
57 
58  //! KeyPropDist reader
59  void read(XMLReader& xml, const std::string& path, KeyPropDistillution_t& param)
60  {
61  XMLReader paramtop(xml, path);
62 
63  read(paramtop, "prop_type", param.prop_type);
64  read(paramtop, "annihP", param.annihP);
65  read(paramtop, "t_source", param.t_source);
66  read(paramtop, "t_slice", param.t_slice);
67  read(paramtop, "dist_src", param.dist_src);
68  read(paramtop, "spin_src", param.spin_src);
69  read(paramtop, "spin_snk", param.spin_snk);
70  read(paramtop, "quark_line", param.quark_line);
71  read(paramtop, "mass", param.mass);
72  }
73 
74  // KeyPropDist writer
75  void write(XMLWriter& xml, const std::string& path, const KeyPropDistillution_t& param)
76  {
77  push(xml, path);
78 
79  write(xml, "prop_type", param.prop_type);
80  write(xml, "annihP", param.annihP);
81  write(xml, "t_source", param.t_source);
82  write(xml, "t_slice", param.t_slice);
83  write(xml, "dist_src", param.dist_src);
84  write(xml, "spin_src", param.spin_src);
85  write(xml, "spin_snk", param.spin_snk);
86  write(xml, "quark_line", param.quark_line);
87  write(xml, "mass", param.mass);
88 
89  pop(xml);
90  }
91 
92 } // namespace Chroma
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
Key for distillution propagator sources and solutions.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
QDP::StandardOutputStream & operator<<(QDP::StandardOutputStream &s, const multi1d< int > &d)
Definition: npr_vertex_w.cc:12
push(xml_out,"Condensates")
pop(xml_out)
::std::string string
Definition: gtest.h:1979
Distillution propagators.