CHROMA
pseudoscalar_stoch_conn_s.cc
Go to the documentation of this file.
1 #include "chromabase.h"
5 
6 namespace Chroma {
7 
8 // Standard Time Slicery
9 class TimeSliceFunc : public SetFunc
10 {
11 public:
12  TimeSliceFunc(int dir): dir_decay(dir) {}
13 
14  int operator() (const multi1d<int>& coordinate) const {return coordinate[dir_decay];}
15  int numSubsets() const {return Layout::lattSize()[dir_decay];}
16 
17  int dir_decay;
18 
19 private:
20  TimeSliceFunc() {} // hide default constructor
21 };
22 
23 
24  /* README:
25  * this code hopefully does the measurements necessary to compute
26  * connected correlators (for 4-link taste singlet pseudoscalar mesons.
27  * it does not compute the correlator itself. Two quantities are
28  * written out for each pair of noise source vectors; call them C1 and C2.
29  * the connected correlator should be <<C1(x)*C2(y)>>, where <<>> is an
30  * average over noise sources, This is in contrast to the disconnected
31  * correlator, which should be assembled as <<D1(x)*>><<D1(y)>>. Of course
32  * and average over configurations is assumed.
33  */
34 
35 
36 
38  LatticeStaggeredFermion & q_source1,
39  LatticeStaggeredFermion & q_source2,
40  LatticeStaggeredFermion & psi1,
41  LatticeStaggeredFermion & psi2,
42  int isample){
43  // Array to describe shifts in cube
44  multi1d<int> delta(Nd);
45 
46  Set timeslice;
47  timeslice.make(TimeSliceFunc(Nd-1));
48 
49  LatticeStaggeredFermion psi_eta4_1 ;
50  LatticeStaggeredFermion psi_eta4_2 ;
51 
52  delta = 0;
53  delta[0] = delta[1] = delta[2] = delta[3] = 1;
54 
55  psi_eta4_1 = shift_deltaProp(delta, psi1);
56  psi_eta4_2 = shift_deltaProp(delta, psi2);
57 
58  LatticeComplex TrG_eta4 ;
59 
60  using namespace StagPhases;
61 
62  TrG_eta4 =
63  -alpha(0)*alpha(1)*alpha(2)*alpha(3)*localInnerProduct(q_source1,
64  psi_eta4_2);
65 
66  corr_fn1[isample] = sumMulti(TrG_eta4, timeslice);
67  corr1 += corr_fn1[isample] ;
68 
69  TrG_eta4 =
70  -alpha(0)*alpha(1)*alpha(2)*alpha(3)*localInnerProduct(q_source2,
71  psi_eta4_1);
72  corr_fn2[isample] = sumMulti(TrG_eta4, timeslice);
73  corr2 += corr_fn2[isample] ;
74 }
75 
77  LatticeStaggeredFermion & q_source1,
78  LatticeStaggeredFermion & q_source2,
79  LatticeStaggeredFermion & psi1,
80  LatticeStaggeredFermion & psi2,
81  // bool fuzz_src, bool fuzz_sink,
82  const multi1d<LatticeColorMatrix> & u_smr,
83  int fuzz_width,
84  int j_decay,
85  int isample){
86 
87  // Array to describe shifts in cube
88  multi1d<int> delta(Nd);
89 
90 
91  Set timeslice;
92  timeslice.make(TimeSliceFunc(Nd-1));
93 
94  LatticeStaggeredFermion psi_eta4_1 ;
95  LatticeStaggeredFermion psi_eta4_2 ;
96 
97  LatticeStaggeredFermion fuzz_q_source1;
98  LatticeStaggeredFermion fuzz_q_source2;
99  LatticeStaggeredFermion fuzz_psi_1;
100 
101  delta = 0;
102  delta[0] = delta[1] = delta[2] = delta[3] = 1;
103 
104 
105  if(Fsink){
106  fuzz_smear(u_smr, psi1, fuzz_psi_1, fuzz_width, j_decay) ;
107  psi_eta4_1 = shift_deltaProp(delta, fuzz_psi_1);
108 
109  }else{
110  psi_eta4_1 = shift_deltaProp(delta, psi1);
111  }
112 
113 
114  psi_eta4_2 = shift_deltaProp(delta, psi2);
115 
116  LatticeComplex TrG_eta4 ;
117 
118  using namespace StagPhases;
119 
120  if(Fsrc){
121  fuzz_smear(u_smr, q_source1, fuzz_q_source1, fuzz_width, j_decay) ;
122 
123  TrG_eta4 =
124  -alpha(0)*alpha(1)*alpha(2)*alpha(3)*localInnerProduct(fuzz_q_source1,
125  psi_eta4_2);
126  }else{
127  TrG_eta4 =
128  -alpha(0)*alpha(1)*alpha(2)*alpha(3)*localInnerProduct(q_source1,
129  psi_eta4_2);
130  }
131 
132 
133 
134  corr_fn1[isample] = sumMulti(TrG_eta4, timeslice);
135  corr1 += corr_fn1[isample] ;
136 
137 
138  TrG_eta4 =
139  -alpha(0)*alpha(1)*alpha(2)*alpha(3)*localInnerProduct(q_source2,
140  psi_eta4_1);
141  corr_fn2[isample] = sumMulti(TrG_eta4, timeslice);
142  corr2 += corr_fn2[isample] ;
143 }
144 
145 
146 } // 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 operator()(const multi1d< int > &coordinate) const
Definition: barQll_w.h:99
LatticeStaggeredFermion shift_deltaProp(multi1d< int > &delta, const LatticeStaggeredFermion &src)
Definition: stoch_conn_s.h:146
multi1d< DComplex > corr2
Definition: stoch_conn_s.h:186
multi2d< DComplex > corr_fn2
Definition: stoch_conn_s.h:184
multi1d< DComplex > corr1
Definition: stoch_conn_s.h:185
multi2d< DComplex > corr_fn1
Definition: stoch_conn_s.h:183
Function object used for constructing the time-slice set.
Fuzzed sources.
void fuzz_smear(const multi1d< LatticeColorMatrix > &ufuzz, const T &psi, T &psifuzz, int length, int j_decay)
apply a fuzz_smear operator to a lattice field
Definition: fuzz_smear.cc:75
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
QDPSubTypeTrait< typename BinaryReturn< C1, C2, FnLocalInnerProduct >::Type_t >::Type_t localInnerProduct(const QDPSubType< T1, C1 > &l, const QDPType< T2, C2 > &r)
static const LatticeInteger & alpha(const int dim)
Definition: stag_phases_s.h:43
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10