CHROMA
fuzz_smear.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Fuzzed sources
3  */
4 
5 #include "chromabase.h"
8 
9 namespace Chroma
10 {
11 
12  // mcneile: this routine is still being checked **
13  // mcneile: I have now checked that it is gauge invariant
14 
15  //! apply a fuzz_smear operator to a lattice field
16  /*!
17  * \ingroup smear
18  *
19  * Arguments:
20  *
21  * \param ufuzz fuzzed gauge field ( Read )
22  * \param psi color std::vector field ( Read )
23  * \param psifuzz color std::vector field ( Modify )
24  * \param length length of fuzz_smear ( Read )
25  * \param j_decay direction of time ( Read )
26  *
27  *
28  * Discription:
29  *
30  *
31  * The sink fuzzed propagator is calculated by extending the path of the input
32  * propagator and is sum of the two contributions as follows:
33  * In the positive mu direction
34  * ___3
35  * fuzz \ + + +
36  * psi (x) = ) U (x-mu) U (x-2mu)... U (x-length mu) psi(x-length mu)
37  * / mu mu mu
38  * ---
39  * mu = 1
40  * In the negative mu direction
41  * ___3
42  * fuzz \
43  * psi (x) = ) U (x) U (x+mu) U (x+2mu)... U (x+(length-1)mu) psi(x+length mu)
44  * / mu mu mu mu
45  * ---
46  * mu = 1
47  *
48  *
49  *
50  * fuzz
51  * Where U defined in the the above equations is U
52  * mu mu
53  * length is an input parameter that describes the size of the
54  * smearing.
55  *
56  * This code assumes that the gauge field has been fuzzed
57  * externally.
58  *
59  * (Documentation from Peter Boyle's Fortran code).
60  *
61  * For smearing at the source the input is a local source.
62  *
63  *
64  *
65  * Reference:
66  *
67  * EFFICIENT HADRONIC OPERATORS IN LATTICE GAUGE THEORY.
68  * By UKQCD Collaboration (P. Lacock et al.).
69  * Published in Phys.Rev.D51:6403-6410,1995, hep-lat/9412079
70  *
71  */
72 
73 
74  template<typename T>
75  void fuzz_smear(const multi1d<LatticeColorMatrix>& ufuzz,
76  const T& psi, T& psifuzz,
77  int length, int j_decay)
78  {
79  // Initial ferm field
80  T psi_dir ;
81 
82 
83  // if staggered then direction must be even
84  // or else an error
85  if( Ns == 1 && length % 2 == 1)
86  {
87  std::cout << "fuzz_smear::Error fuzzing length = " << length << std::endl ;
88  std::cout << "Fuzzing length must be even for staggered fermions" << std::endl ;
89  QDP_abort(1);
90  }
91 
92 
93 
94  //
95  // loop over directions x,y,z
96  //
97  bool is_initial = true ;
98 
99  for(int mu = 0 ; mu < Nd ; ++mu)
100  {
101  if( mu != j_decay )
102  {
103 
104  // positive direction
105  psi_dir = psi ;
106  displacement(ufuzz,psi_dir,length,mu);
107  if( is_initial )
108  {
109  psifuzz = psi_dir ;
110  is_initial = false ;
111  }
112  else
113  {
114  psifuzz += psi_dir ;
115  }
116 
117 
118  // negative direction
119  psi_dir = psi ;
120  int neg_length = -length ;
121  displacement(ufuzz,psi_dir,neg_length,mu);
122  psifuzz += psi_dir ;
123 
124  } // end of x,y,z direction
125 
126  } // loop over directions
127 
128 
129  }
130 
131 
132 
133 
134  void fuzz_smear(const multi1d<LatticeColorMatrix>& ufuzz,
135  const LatticeColorVector & psi,
136  LatticeColorVector & psifuzz,
137  int length, int j_decay)
138  {
139  fuzz_smear<LatticeColorVector>(ufuzz, psi, psifuzz,
140  length,j_decay) ;
141  }
142 
143 
144 
145  void fuzz_smear(const multi1d<LatticeColorMatrix>& ufuzz,
146  const LatticePropagator & psi,
147  LatticePropagator& psifuzz,
148  int length, int j_decay)
149  {
150  fuzz_smear<LatticePropagator>(ufuzz, psi, psifuzz,
151  length,j_decay) ;
152  }
153 
154 
155 
156  void fuzz_smear(const multi1d<LatticeColorMatrix>& ufuzz,
157  const LatticeFermion & psi,
158  LatticeFermion& psifuzz,
159  int length, int j_decay)
160  {
161  fuzz_smear<LatticeFermion>(ufuzz, psi, psifuzz,
162  length,j_decay) ;
163  }
164 
165 
166  void fuzz_smear(const multi1d<LatticeColorMatrix>& ufuzz,
167  const LatticeStaggeredFermion & psi,
168  LatticeStaggeredFermion& psifuzz,
169  int length, int j_decay)
170  {
171  fuzz_smear<LatticeStaggeredFermion>(ufuzz, psi, psifuzz,
172  length,j_decay) ;
173  }
174 
175 } // end namespace Chroma
176 
Primary include file for CHROMA library code.
int mu
Definition: cool.cc:24
Parallel transport a lattice field.
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
LatticePropagator displacement(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &chi, int length, int dir)
Apply a displacement operator to a lattice field.
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
LinOpSysSolverMGProtoClover::T T
LatticeFermion psi
Definition: mespbg5p_w.cc:35