CHROMA
scalar_local_s.cc
Go to the documentation of this file.
3 
4 namespace Chroma {
5 
6  class TimeSliceFunc : public SetFunc {
7  public:
8  TimeSliceFunc(int dir) : dir_decay(dir) {}
9  int operator() (const multi1d<int>& coordinate) const { return coordinate[dir_decay]; }
10  int numSubsets() const { return Layout::lattSize()[dir_decay]; }
11 
12  int dir_decay;
13 
14  private:
16  };
17 
18  using namespace StagPhases;
19 
20  void staggered_local_scalar::compute(LatticeStaggeredPropagator& quark_prop_A,
21  LatticeStaggeredPropagator& quark_prop_B, int j_decay)
22  {
23  if (Nd != 4 ) {
24  QDPIO::cerr << "The number of dimensions should be 4 (for now) - it is " << Nd << "\n";
25  QDP_abort(1);
26  }
27 
28  switch(j_decay) {
29  case 3:
30  break;
31 
32  default:
33  QDPIO::cerr << "scalar_s: j_decay must be 3 for now, it is " << j_decay << "\n";
34  QDP_abort(1);
35  }
36 
37  const multi1d<int>& latt_size = Layout::lattSize();
38 
39  LatticeComplex latt_corr_fn;
40 
41  Set timeslice;
42  timeslice.make(TimeSliceFunc(Nd-1));
43 
44  int idx = 0;
45  int i, mu, nu, rho;
46 
47 
48  latt_corr_fn = - alpha(1)*beta(0)*trace(adj(quark_prop_A)*quark_prop_B);
49 
50  corr_fn[idx] = sumMulti(latt_corr_fn, timeslice);
51  tag_names[idx] = "one_CROSS_one";
52 
53  idx++;
54 
55  if ( idx != no_pions ) {
56  QDPIO::cerr << "Panic! Something has gone horribly wrong!\n";
57  QDP_abort(1);
58  }
59  }
60 
61 
62 
63 } //end namespace
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
void compute(LatticeStaggeredPropagator &quark_prop_A, LatticeStaggeredPropagator &quark_prop_B, int j_decay)
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
static const LatticeInteger & alpha(const int dim)
Definition: stag_phases_s.h:43
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int i
Definition: pbg5p_w.cc:55