CHROMA
mesphas_follana_s.cc
Go to the documentation of this file.
1 
2 
3 /* This routine is specific to staggered fermions! */
4 
5 /* This routine will calculate the Kogus-Sussking Phases (alpha)
6  * and the other phases (beta) needed to compute spectroscopy.
7  * -- GLASGOW/UKQCD Phase Conventions:
8  *
9  * alpha(x,0) = 1
10  * alpha(x,mu) = (-1)^{ x_0 + x_1 + ... x_{mu-1} }
11  *
12  * beta(x,mu) = (-1)^{ x_{mu+1} + ... + x_{Nd-1} }
13  * beta(x,Nd-1) = 1;
14  *
15  */
16 
17 /* alpha -- KS phases (Write) */
18 /* beta -- the beta phase factors ( Write ) */
19 
20 
21 #include "chromabase.h"
22 #include "mesphas_follana_s.h"
23 
24 namespace Chroma {
25 
26  void mesPhasFollana(multi1d<LatticeInteger>& alpha,
27  multi1d<LatticeInteger>& beta)
28  {
29  multi1d<LatticeInteger> x(Nd);
30  int mu;
31 
32  alpha.resize(Nd);
33  beta.resize(Nd);
34 
35 
36  /* Start off by getting the coordinates of x(0), x(1), ..., x(Nd-3) */
37  for( mu = 0; mu < Nd; mu++) {
38  x[ mu ] = Layout::latticeCoordinate(mu);
39  }
40 
41 
42  /* NOTE: in the comments below I mean x0 is the true *non*-checkerboard */
43  /* x coordinate. */
44  switch(Nd)
45  {
46  case 4:
47 
48  alpha[0] = LatticeInteger(1);
49  alpha[1] = where((x[0] % 2) == 0, LatticeInteger(1), LatticeInteger(-1));
50  alpha[2] = where( ((x[0]+x[1])%2) == 0, LatticeInteger(1), LatticeInteger(-1));
51  alpha[3] = where( ((x[0]+x[1]+x[2])%2) == 0, LatticeInteger(1), LatticeInteger(-1));
52 
53  beta[0] = where( ((x[1]+x[2]+x[3])%2) == 0, LatticeInteger(1), LatticeInteger(-1));
54  beta[1] = where( ((x[2] + x[3])%2) == 0, LatticeInteger(1), LatticeInteger(-1));
55  beta[2] = where( (x[3] % 2) == 0, LatticeInteger(1), LatticeInteger(-1) );
56 
57  beta[3] = LatticeInteger(1);
58 
59  break;
60 
61  default:
62  QDP_error_exit("Can only handle d=4 dimensions for now", Nd);
63  }
64 
65 
66  }
67 
68 } // end namespace Chroma
Primary include file for CHROMA library code.
int mu
Definition: cool.cc:24
int x
Definition: meslate.cc:34
Nd
Definition: meslate.cc:74
static const LatticeInteger & beta(const int dim)
Definition: stag_phases_s.h:47
static const LatticeInteger & alpha(const int dim)
Definition: stag_phases_s.h:43
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)
void mesPhasFollana(multi1d< LatticeInteger > &alpha, multi1d< LatticeInteger > &beta)