CHROMA
aniso_sym_gaugeact_params.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Anisotropic gaugeact useful for spectrum from hep-lat/9911003
3  *
4  * Tree-level LW with tapole improvement, missing 1x2 in time, also including
5  * 2-plaq term. Taken from Morningstar-Peardon, hep-lat/9911003
6  */
7 
8 #include "chromabase.h"
9 
11 
12 namespace Chroma
13 {
14 
15 
17  {
18  XMLReader paramtop(xml_in, path);
19 
20  try
21  {
22  read(paramtop, "beta", beta);
23  read(paramtop, "u_s", u_s);
24  read(paramtop, "u_t", u_t);
25  read(paramtop, "AnisoParam", aniso);
26  if( paramtop.count("ZeroEnergy") == 1 ) {
27  read(paramtop, "ZeroEnergy", sub_zero);
28  use_subtraction = true;
29  }
30  else {
31  sub_zero = Real(0);
32  use_subtraction = false;
33  }
34  }
35  catch( const std::string& e ) {
36  QDPIO::cerr << "Error reading XML: " << e << std::endl;
37  QDP_abort(1);
38  }
39  }
40 
41 
42  void read(XMLReader& xml, const std::string& path, AnisoSymGaugeActParams& p)
43  {
44  AnisoSymGaugeActParams tmp(xml, path);
45  p=tmp;
46  }
47 
48  void write(XMLWriter& xml, const std::string& path, const AnisoSymGaugeActParams& param)
49  {
50  push(xml, path);
51 
52  write(xml, "beta", param.beta);
53  write(xml, "u_s", param.u_s);
54  write(xml, "u_t", param.u_t);
55  if( param.use_subtraction ) {
56  write(xml, "ZeroEnergy", param.sub_zero);
57  }
58  write(xml, "AnisoParam", param.aniso);
59 
60  pop(xml);
61  }
62 
64  {
65  XMLReader paramtop(xml_in, path);
66 
67  try
68  {
69  read(paramtop, "beta", beta);
70  read(paramtop, "u_s", u_s);
71  if( paramtop.count("ZeroEnergy") == 1 ) {
72  read(paramtop, "ZeroEnergy", sub_zero);
73  use_subtraction = true;
74  }
75  else {
76  sub_zero = Real(0);
77  use_subtraction = false;
78  }
79  read(paramtop, "AnisoParam", aniso);
80  }
81  catch( const std::string& e ) {
82  QDPIO::cerr << "Error reading XML: " << e << std::endl;
83  QDP_abort(1);
84  }
85  }
86 
87 
88  void read(XMLReader& xml, const std::string& path, AnisoSymSpatialGaugeActParams& p)
89  {
91  p=tmp;
92  }
93 
94  void write(XMLWriter& xml, const std::string& path, const AnisoSymSpatialGaugeActParams& param)
95  {
96  push(xml, path);
97 
98  write(xml, "beta", param.beta);
99  write(xml, "u_s", param.u_s);
100  if( param.use_subtraction ) {
101  write(xml, "ZeroEnergy", param.sub_zero);
102  }
103  write(xml, "AnisoParam", param.aniso);
104 
105  pop(xml);
106  }
107 
108 }
109 
Params for Anisotropic Symanzik Gauge Action.
Primary include file for CHROMA library code.
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.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
push(xml_out,"Condensates")
pop(xml_out)
::std::string string
Definition: gtest.h:1979
bool use_subtraction
Whether to use subtraction trick.
Real sub_zero
Arbitrary constant (zero point energy)
Real u_t
Temporal Tadpole coupling.
Real u_s
Spatial Tadpole coupling.
Real sub_zero
Arbitrary constant (zero point energy)
AnisoParam_t aniso
The anisotropy parameters.
bool use_subtraction
Whether to use subtraction trick.