CHROMA
wall_qprop_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Construct a wall-sink propagator
3  */
4 
5 #include "chromabase.h"
6 #include "util/ft/sftmom.h"
8 
9 namespace Chroma {
10 
11 //! Construct a wall-sink propagator:
12 /*!
13  * \ingroup hadron
14  *
15  * This routine is specific to Wilson fermions!
16  *
17  * Each time slice will have one non-zero entry,
18  * with the propagator summed over the entire time slice.
19  *
20  * \param wall_quark_prop wall-sink quark propagator ( Write )
21  * \param quark_propagator quark propagator ( Read )
22  * \param phases object holds list of momenta and Fourier phases ( Read )
23  */
24 
25 void wall_qprop(LatticePropagator& wall_quark_prop,
26  const LatticePropagator& quark_propagator,
27  const SftMom& phases)
28 {
29  START_CODE();
30 
31  // Length of lattice in decay direction
32  int length = phases.numSubsets();
33  int j_decay = phases.getDir();
34 
35  // Project propagator onto zero momentum: Do a slice-wise sum.
36  multi1d<DPropagator> dprop_slice = sumMulti(quark_propagator, phases.getSet());
37 
38  // Now create the mask for 1 site per time slice
39  LatticeBoolean lbmask = true;
40  for(int mu = 0; mu < Nd; ++mu)
41  if( mu != j_decay )
42  lbmask &= (Layout::latticeCoordinate(mu) == 0);
43 
44  // Now copy onto the lattice
45  LatticeInteger my_coord = Layout::latticeCoordinate(j_decay);
46 
47  wall_quark_prop = zero;
48  for(int t = 0; t < length; ++t)
49  copymask(wall_quark_prop,
50  LatticeBoolean(lbmask & (my_coord == t)),
51  LatticePropagator(dprop_slice[t]));
52 
53  END_CODE();
54 }
55 
56 } // end namespace Chroma
57 
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
void wall_qprop(LatticePropagator &wall_quark_prop, const LatticePropagator &quark_propagator, const SftMom &phases)
Construct a wall-sink propagator:
Definition: wall_qprop_w.cc:25
int j_decay
Definition: meslate.cc:22
int t
Definition: meslate.cc:37
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
START_CODE()
Double zero
Definition: invbicg.cc:106
copymask(lcoord, lbit, ltmp_1, REPLACE)
Fourier transform phase factor support.
Construct a wall-sink propagator.