CHROMA
gluecor.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Construct 0++, 2++ and 1+- glueball correlation functions from fuzzy links
3  */
4 
5 #include "chromabase.h"
6 #include "util/gauge/shift2.h"
7 #include "meas/glue/gluecor.h"
8 
9 namespace Chroma
10 {
11 
12  //! Construct 0++, 2++ and 1+- glueball correlation functions from fuzzy links
13  /*!
14  * \ingroup glue
15  *
16  * Construct 0++, 2++ and 1+- glueball correlation functions from
17  * fuzzy links at blocking level bl_level and Write them in
18  * XML format.
19  *
20  * Warning: this works only for Nd = 4 !
21  *
22  * \param xml_out xml file object ( Write )
23  * \param xml_group std::string used for writing xml data ( Read )
24  * \param u (blocked) gauge field ( Read )
25  * \param bl_level blocking level ( Read )
26  * \param phases object holds list of momenta and Fourier phases ( Read )
27  */
28 
29  void gluecor(XMLWriter& xml_out, const std::string& xml_group,
30  const multi1d<LatticeColorMatrix>& u,
31  const SftMom& phases,
32  int bl_level)
33  {
34  START_CODE();
35 
36  // Length of lattice in decay direction
37  int length = phases.numSubsets();
38  int j_decay = phases.getDir();
39 
40  int half_length = length/2 + 1;
41 
42  LatticeColorMatrix tmp_1;
43  LatticeColorMatrix tmp_2;
44  LatticeColorMatrix tmp_3;
45  LatticeComplex cplaq_tmp;
46 
47  multi1d<DComplex> cplaq(length);
48  multi1d<Double> glue0(half_length);
49  multi1d<Double> glue1(half_length);
50  multi1d<Double> glue2(half_length);
51  multi1d<Double> op0(length);
52  multi3d<Double> op1(length, 3, 2);
53  multi2d<Double> op2(length, 3);
54  Double vac0;
55  Double dummy;
56  multi1d< multi1d<DComplex> > plaq(3);
57  int mu;
58  int nu;
59  int plane;
60  int t;
61  int t0;
62  int t1;
63 
64  if( Nd != 4 )
65  QDP_error_exit("Nd for glueball construction has to be 4 but: ", Nd);
66 
67  for(int i=0; i < 3; ++i)
68  {
69  plaq[i].resize(length);
70  plaq[i] = 0;
71  }
72 
73  /* Initialize glueball operators to zero */
74  op0 = 0;
75  op1 = 0;
76  op2 = 0;
77 
78  plane = 0;
79 
80  /* Construct glueball operators */
81  /* Loop over first direction (!= j_decay) */
82  for(mu = 0; mu <= Nd-2; ++mu)
83  {
84  if( mu != j_decay )
85  {
86  /* Loop over second direction (!= j_decay) */
87  for(nu = mu+1; nu < Nd; ++nu)
88  {
89  if( nu != j_decay )
90  {
91  plane = plane + 1;
92 
93  /* Construct (block) plaquettes */
94  /* tmp_1(x) = u(x+mu*2^bl_level,nu) */
95  tmp_1 = shift2(u[nu], FORWARD, mu, bl_level);
96 
97  /* tmp_2(x) = u(x+nu*2^bl_level,mu) */
98  tmp_2 = shift2(u[mu], FORWARD, nu, bl_level);
99 
100  /* tmp_3 = tmp_1 * tmp_2_dagger */
101  tmp_3 = tmp_1 * adj(tmp_2);
102 
103  /* tmp_1 = tmp_3 * u_dagger(x,nu) */
104  tmp_1 = tmp_3 * adj(u[nu]);
105 
106  /* cplaq_tmp = Tr(u(x,mu) * tmp_1) */
107  cplaq_tmp = trace(u[mu] * tmp_1);
108 
109  /* cplaq = slice-wise sum of cplaq_tmp */
110  cplaq = sumMulti(cplaq_tmp, phases.getSet());
111 
112  /* Make the glueball operators from the (block) plaquettes */
113  switch(plane)
114  {
115  case 1:
116  for(t = 0;t < ( length); ++t )
117  {
118  op0[t] += real(cplaq[t]);
119  op1[0][0][t] += imag(cplaq[t]);
120  op1[1][1][t] += imag(cplaq[t]);
121  op2[0][t] += real(cplaq[t]);
122  op2[1][t] -= real(cplaq[t]);
123  }
124 
125  break;
126  case 2:
127  for(t = 0;t < ( length); ++t )
128  {
129  op0[t] += real(cplaq[t]);
130  op1[0][2][t] += imag(cplaq[t]);
131  op1[1][0][t] += imag(cplaq[t]);
132  op2[0][t] -= real(cplaq[t]);
133  op2[2][t] -= real(cplaq[t]);
134  }
135 
136  break;
137  case 3:
138  for(t = 0;t < ( length); ++t )
139  {
140  op0[t] += real(cplaq[t]);
141  op1[0][1][t] += imag(cplaq[t]);
142  op1[1][2][t] += imag(cplaq[t]);
143  op2[1][t] += real(cplaq[t]);
144  op2[2][t] += real(cplaq[t]);
145  }
146 
147  break;
148  default:
149  QDP_error_exit("Too many orthogonal planes: ", plane);
150  }
151 
152  for(t = 0;t < ( length); ++t )
153  {
154  plaq[plane-1][t] += cplaq[t];
155  }
156 
157  } /* end if( nu != j_decay ) */
158  } /* end loop over nu */
159  } /* end if( mu != j_decay ) */
160  } /* end loop over mu */
161 
162 
163 
164  /* Initialize glueball correlations to zero */
165  vac0 = 0;
166  glue0 = 0;
167  glue1 = 0;
168  glue2 = 0;
169 
170  /* 0++ vacuum expectation value */
171  for(t = 0; t < length; ++t)
172  vac0 += op0[t];
173 
174  /* And now the glueball correlation functions */
175  for(t0 = 0; t0 < length; ++t0)
176  for(t = 0; t < half_length; ++t)
177  {
178  t1 = (t + t0) % length;
179  glue0[t] += op0[t0] * op0[t1];
180 
181  for(nu = 0;nu <= ( 2); ++nu )
182  {
183  glue1[t] += op1[0][nu][t0] * op1[0][nu][t1];
184  glue1[t] += op1[1][nu][t0] * op1[1][nu][t1];
185  glue2[t] += op2[nu][t0] * op2[nu][t1];
186  }
187  }
188 
189  /* Normalize */
190  vac0 /= Double(QDP::Layout::vol());
191  dummy = Double(1) / Double(QDP::Layout::vol());
192  for(t = 0;t < ( half_length); ++t )
193  {
194  glue0[t] = glue0[t] * dummy;
195  glue1[t] = glue1[t] * dummy;
196  glue2[t] = glue2[t] * dummy;
197  }
198 
199  /* Finally Write glueball correlations in NAMELIST format */
200  push(xml_out, xml_group);
201 
202  push(xml_out,"Glueball_0pp");
203  write(xml_out, "j_decay", j_decay);
204  write(xml_out, "bl_level", bl_level);
205  write(xml_out, "vac0", vac0);
206  write(xml_out, "glue0", glue0);
207  pop(xml_out);
208 
209  push(xml_out,"Glueball_1pm");
210  write(xml_out, "j_decay", j_decay);
211  write(xml_out, "bl_level", bl_level);
212  write(xml_out, "glue1", glue1);
213  pop(xml_out);
214 
215  push(xml_out,"Glueball_2pp");
216  write(xml_out, "j_decay", j_decay);
217  write(xml_out, "bl_level", bl_level);
218  write(xml_out, "glue2", glue2);
219  pop(xml_out);
220 
221  push(xml_out,"Glueball_plaq");
222  write(xml_out, "j_decay", j_decay);
223  write(xml_out, "bl_level", bl_level);
224  push(xml_out, "Planes");
225  for(int i=0; i < plaq.size(); ++i)
226  {
227  push(xml_out, "elem");
228  write(xml_out, "plane", i);
229  write(xml_out, "plaq", plaq[i]);
230  pop(xml_out);
231  }
232  pop(xml_out);
233  pop(xml_out);
234 
235  pop(xml_out);
236 
237  END_CODE();
238  }
239 
240 }
Primary include file for CHROMA library code.
Fourier transform phase factor support.
Definition: sftmom.h:35
int numSubsets() const
Number of subsets - length in decay direction.
Definition: sftmom.h:63
int getDir() const
Decay direction.
Definition: sftmom.h:69
const Set & getSet() const
The set to be used in sumMulti.
Definition: sftmom.h:57
int mu
Definition: cool.cc:24
int nu
Definition: cool.cc:25
Construct 0++, 2++ and 1+- glueball correlation functions from fuzzy links.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
LatticeColorMatrix shift2(const LatticeColorMatrix &s1, int isign, int dir, int level)
A simple not-fancy power of 2 shift.
Definition: shift2.cc:13
void gluecor(XMLWriter &xml_out, const std::string &xml_group, const multi1d< LatticeColorMatrix > &u, const SftMom &phases, int bl_level)
Construct 0++, 2++ and 1+- glueball correlation functions from fuzzy links.
Definition: gluecor.cc:29
LatticeColorMatrix tmp_2
Definition: meslate.cc:51
int j_decay
Definition: meslate.cc:22
LatticeColorMatrix tmp_3
Definition: meslate.cc:52
Double plaq
Definition: meslate.cc:58
int t
Definition: meslate.cc:37
LatticeColorMatrix tmp_1
Definition: meslate.cc:50
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
int i
Definition: pbg5p_w.cc:55
pop(xml_out)
START_CODE()
FloatingPoint< double > Double
Definition: gtest.h:7351
::std::string string
Definition: gtest.h:1979
#define FORWARD
Definition: primitives.h:82
Real dummy
Definition: qtopcor.cc:36
Shift by a power of 2.