CHROMA
pion_sing_s.cc
Go to the documentation of this file.
1 /*! File: pion_sing_s.cc
2  *
3  * The routines in this file computes the four-link flavor-singlet pion
4  * (This routine has not yet been CHECKED !!!!!)
5  *
6  * BEWARE: These routines ASSUME that the quark propagators have been
7  * calculated in the Coulomb (or other spatially fixed) gauge.
8  * It is not gauge invariant. It could be made to be so by adding some
9  * parallel transport, however folklore claims that increases noise
10  *
11  * YOU HAVE BEEN WARNED.
12  */
13 
14 #include "chromabase.h"
15 #include "pion_sing_s.h"
17 
18 namespace Chroma {
19 
20  // I cant forward declare this for some reason
21  // Standard Time Slicery
22  class TimeSliceFunc : public SetFunc
23  {
24  public:
25  TimeSliceFunc(int dir): dir_decay(dir) {}
26 
27  int operator() (const multi1d<int>& coordinate) const {return coordinate[dir_decay];}
28  int numSubsets() const {return Layout::lattSize()[dir_decay];}
29 
30  int dir_decay;
31 
32  private:
33  TimeSliceFunc() {} // hide default constructor
34  };
35 
36  /*! pion_singlet
37  *
38  * This routine computes 1 staggered four-link flavor-singlet pion.
39  *
40  * Caveats: i) It assumes that the propagators you give
41  * have been computed in some spatially fixed gauge
42  * eg the Coulomb Gauge.
43  *
44  * ii) This means that there is only
45  * 1 propagators corresponding to
46  * prop_index = 0, hypercube_coord (1,1,1,1)
47  *
48  * iii) The assumption is that you are working in 4d
49  *
50  * Parameters:
51  *
52  * quark_props -- The array of input propagators (Read)
53  *
54  * j_decay -- The time direction (has to be Nd-1 for now)
55  * (Read)
56  */
57 
58 
59  // THis brings the staggered phases alpha and beta into the namespace
60  using namespace StagPhases;
61 
62  void
64  LatticeStaggeredPropagator local_quark_prop,
65  LatticeStaggeredPropagator four_shift_quark_prop,
66  int j_decay)
67  {
68 
69  //non-fuzzed version
70 
71  // Paranoid Checks
72 
73  if( Nd != 4 ) {
74  QDPIO::cerr << "The no of dimensions should be 4 for now. It is: "
75  << Nd << std::endl;
76  QDP_abort(1);
77  }
78 
79 
80  // Also for now we want j_decay to be 3.
81  switch( j_decay ) {
82  case 3:
83  break;
84 
85  default:
86  QDPIO::cerr << "pion_sing_s: j_decay must be 3 for just now. It is " << j_decay << std::endl;
87  QDP_abort(1);
88  };
89 
90  // Get the lattice size.
91  const multi1d<int>& latt_size = Layout::lattSize();
92 
93  // resize output array appropriately
94  corr_fn.resize(no_pion_sings, latt_size[Nd-1]);
95 
96  // Correlation functions before spatial sum
97  LatticeComplex corr_fn_s;
98 
99  // Machinery to do timeslice sums with
100  Set timeslice;
101  timeslice.make(TimeSliceFunc(Nd-1));
102 
103  // Phases
104  // Counters/Indices
105  int pion_index = 0;
106  int i;
107  int mu, nu, rho;
108 
109  //
110  // Array to describe shifts in cube
111  multi1d<int> delta(Nd);
112 
113 
114  //---------------------------------------
115  // four-link taste singlet pion
116 
117  tag_names[pion_index] = "gamma5_CROSS_one" ;
118 
119  delta = 0;
120  delta[0] = delta[1] = delta[2] = delta[3] = 1;
121  corr_fn_s = beta(0)* beta(1) * beta(2) * beta(3)
122  *trace(adj(shift_deltaProp(delta, local_quark_prop ))
123  *four_shift_quark_prop);
124 
125  corr_fn[ pion_index ] = sumMulti(corr_fn_s, timeslice);
126  pion_index++;
127 
128  if( pion_index != no_pion_sings ) {
129  QDPIO::cerr << "Panic! Panic! Something has gone horribly wrong" << std::endl;
130  QDP_abort(1);
131  }
132 
133 
134 
135  }// end non-fuzzed sink version
136 
137  /**********************************************************************/
138 
139 } // end namespace Chroma
Primary include file for CHROMA library code.
Function object used for constructing the time-slice set.
Definition: barQll_w.h:95
int numSubsets() const
Definition: pion_sing_s.cc:28
int operator()(const multi1d< int > &coordinate) const
Definition: barQll_w.h:99
void compute(LatticeStaggeredPropagator local_quark_prop, LatticeStaggeredPropagator four_shift_quark_prop, int j_decay)
Definition: pion_sing_s.cc:63
Function object used for constructing the time-slice set.
int mu
Definition: cool.cc:24
int nu
Definition: cool.cc:25
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
static const LatticeInteger & beta(const int dim)
Definition: stag_phases_s.h:47
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int i
Definition: pbg5p_w.cc:55