CHROMA
displace.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Parallel transport a lattice field
4  *
5  * Description:
6  *
7  * Suppose q(x) is a quark field.
8  * Displacement operator D_j^{(p)} moves quark field
9  * for p lattice sites to the direction j in covariant
10  * fashion.
11  *
12  * Namely,
13  * D_j^{(p)} q(x) = U_j(x) U_j(x+j) U_j(x+2j)...U_j(x+(p-1)j) q(x+pj),
14  * where U is the gauge-link.
15  *
16  * dir: x(0), y(1), z(2)
17  *
18  */
19 
20 #ifndef __displace_h__
21 #define __displace_h__
22 
23 #include "chromabase.h"
24 
25 namespace Chroma
26 {
27 
28  //! Apply a displacement path to a lattice field
29  /*!
30  * \ingroup smear
31  *
32  * Arguments:
33  *
34  * \param u gauge field ( Read )
35  * \param chi color std::vector field ( Read )
36  * \param length displacement length - must be greater than zero ( Read )
37  * \param path array of direction of displacement paths - pos/neg, or zero ( Read )
38  *
39  * \return displaced field
40  */
41  LatticeColorVector displace(const multi1d<LatticeColorMatrix>& u,
42  const LatticeColorVector& chi,
43  int length, const multi1d<int>& path);
44 
45 
46  //! Apply a displacement path to a lattice field
47  /*! \ingroup smear */
48  LatticeColorMatrix displace(const multi1d<LatticeColorMatrix>& u,
49  const LatticeColorMatrix& chi,
50  int length, const multi1d<int>& path,
51  const Subset& sub);
52 
53 
54  //! Apply a displacement path to a lattice field
55  /*! \ingroup smear */
56  LatticeColorMatrix displace(const multi1d<LatticeColorMatrix>& u,
57  const LatticeColorMatrix& chi,
58  int length, const multi1d<int>& path);
59 
60 
61  //! Apply a displacement path to a lattice field
62  /*! \ingroup smear */
63  LatticeColorVector displace(const multi1d<LatticeColorMatrix>& u,
64  const LatticeColorVector& chi,
65  int length, const multi1d<int>& path,
66  const Subset& sub);
67 
68 
69  //! Apply a displacement path to a lattice field
70  /*! \ingroup smear */
71  LatticeFermion displace(const multi1d<LatticeColorMatrix>& u,
72  const LatticeFermion& chi,
73  int length, const multi1d<int>& path);
74 
75 
76  //! Apply a displacement path to a lattice field
77  /*! \ingroup smear */
78  LatticeFermion displace(const multi1d<LatticeColorMatrix>& u,
79  const LatticeFermion& chi,
80  int length, const multi1d<int>& path,
81  const Subset& sub);
82 
83 
84  // Apply a displacement path to a lattice field
85  LatticePropagator displace(const multi1d<LatticeColorMatrix>& u,
86  const LatticePropagator& p,
87  int length, const multi1d<int>& path) ;
88 
89  // Apply a displacement path to a lattice field
90  LatticePropagator displace(const multi1d<LatticeColorMatrix>& u,
91  const LatticePropagator& p,
92  int length, const multi1d<int>& path,
93  const Subset& sub ) ;
94 
95  //! Apply a displacement operator to a lattice field
96  /*!
97  * \ingroup smear
98  *
99  * Arguments:
100  *
101  * \param u gauge field ( Read )
102  * \param chi color std::vector field ( Read )
103  * \param length length of displacement - can be negative ( Read )
104  * \param dir direction of displacement ( Read )
105  *
106  * \return displaced field
107  */
108  LatticeColorVector displace(const multi1d<LatticeColorMatrix>& u,
109  const LatticeColorVector& chi,
110  int length, int dir);
111 
112  LatticeColorVector displace(const multi1d<LatticeColorMatrix>& u,
113  const LatticeColorVector& chi,
114  int length, int dir,
115  const Subset& sub);
116 
117  //! Apply a displacement operator to a lattice field
118  /*! \ingroup smear */
119  LatticeFermion displace(const multi1d<LatticeColorMatrix>& u,
120  const LatticeFermion& chi,
121  int length, int dir);
122 
123 #ifndef QDP_IS_QDPJIT_NO_NVPTX
124  // Apply a displacement operator to a lattice field
125  LatticeColorVectorSpinMatrix displace(const multi1d<LatticeColorMatrix>& u,
126  const LatticeColorVectorSpinMatrix& chi,
127  int length, int dir);
128 #endif
129  //! Apply a displacement operator to a lattice field
130  /*! \ingroup smear */
131  LatticeStaggeredFermion displace(const multi1d<LatticeColorMatrix>& u,
132  const LatticeStaggeredFermion& chi,
133  int length, int dir);
134 
135 
136  //! Apply a displacement operator to a lattice field
137  /*! \ingroup smear */
138  LatticeStaggeredPropagator displace(const multi1d<LatticeColorMatrix>& u,
139  const LatticeStaggeredPropagator& chi,
140  int length, int dir);
141 
142  //! Apply a displacement operator to a lattice field
143  /*! \ingroup smear */
144  LatticeColorMatrix displace(const multi1d<LatticeColorMatrix>& u,
145  const LatticeColorMatrix& chi,
146  int length, int dir);
147 
148  //! Apply a displacement operator to a lattice field
149  /*! \ingroup smear */
150  LatticePropagator displacement(const multi1d<LatticeColorMatrix>& u,
151  const LatticePropagator& chi,
152  int length, int dir);
153 
154 
155  //----------------------------------------------------------------------------------
156  //! Apply a right nabla path to a lattice field
157  /*!
158  * \ingroup smear
159  *
160  * Arguments:
161  *
162  * \param u gauge field ( Read )
163  * \param chi color std::vector field ( Read )
164  * \param length displacement length - must be greater than zero ( Read )
165  * \param path array of direction of derivative paths - pos or zero ( Read )
166  *
167  * \return deriv field
168  */
169  LatticeColorVector rightNabla(const multi1d<LatticeColorMatrix>& u,
170  const LatticeColorVector& chi,
171  int length, const multi1d<int>& path);
172 
173 
174  //! Apply a right nabla path to a lattice field
175  /*! \ingroup smear */
176  LatticeColorMatrix rightNabla(const multi1d<LatticeColorMatrix>& u,
177  const LatticeColorMatrix& chi,
178  int length, const multi1d<int>& path);
179  //! Apply first deriv to the right onto source
180  LatticeFermion rightNabla(const multi1d<LatticeColorMatrix>& u,
181  const LatticeFermion& chi,
182  int length, const multi1d<int>& path);
183 
184  //! Apply first deriv to the right onto source
185  LatticePropagator rightNabla(const multi1d<LatticeColorMatrix>& u,
186  const LatticePropagator& chi,
187  int length, const multi1d<int>& path);
188 
189  //! Apply first deriv to the right onto source
190  /*!
191  * \ingroup smear
192  *
193  * \f$\nabla_\mu f(x) = U_\mu(x)f(x+\mu) - U_{-\mu}(x)f(x-\mu)\f$
194  *
195  * \return $\f \nabla_\mu F(x)\f$
196  */
197  LatticeColorVector rightNabla(const LatticeColorVector& F,
198  const multi1d<LatticeColorMatrix>& u,
199  int mu, int length);
200 
201  //! Apply first deriv to the right onto source
202  LatticeFermion rightNabla(const LatticeFermion& F,
203  const multi1d<LatticeColorMatrix>& u,
204  int mu, int length);
205 
206  //! Apply first deriv to the right onto source
207  LatticePropagator rightNabla(const LatticePropagator& F,
208  const multi1d<LatticeColorMatrix>& u,
209  int mu, int length);
210 
211  //----------------------------------------------------------------------------------
212  //! Apply left-right deriv to the right onto source
213  /*!
214  * \ingroup sources
215  *
216  * \f$\right\nabla_\mu f(x) = U_\mu(x)f(x+\mu) - U_{-\mu}(x)f(x-\mu)\f$
217  * \f$\left\nabla_\mu f(x) = f(x+\mu)U_{-\mu}(x) - f(x-\mu)U_\mu(x-\mu)\f$
218  *
219  * \return $\f (\left\nabla_\mu - \right\nabla_\mu) F(x)\f$
220  */
221  LatticeColorVector leftRightNabla(const LatticeColorVector& F,
222  const multi1d<LatticeColorMatrix>& u,
223  int mu, int length,
224  int mom);
225 
226  //! Apply left-right deriv to the right onto source
227  LatticeFermion leftRightNabla(const LatticeFermion& F,
228  const multi1d<LatticeColorMatrix>& u,
229  int mu, int length,
230  int mom);
231 
232  //! Apply left-right deriv to the right onto source
233  LatticePropagator leftRightNabla(const LatticePropagator& F,
234  const multi1d<LatticeColorMatrix>& u,
235  int mu, int length,
236  int mom);
237 #ifndef QDP_IS_QDPJIT_NO_NVPTX
238  //! Apply first deriv to the right onto source
239  LatticeColorVectorSpinMatrix leftRightNabla(const LatticeColorVectorSpinMatrix& F,
240  const multi1d<LatticeColorMatrix>& u,
241  int mu, int length,
242  int mom);
243 
244 #endif
245 
246  //! Apply left-right deriv to the right onto source
247  LatticeColorVector leftRightNabla(const multi1d<LatticeColorMatrix>& u,
248  const LatticeColorVector& chi,
249  int length,
250  const multi1d<int>& path,
251  const multi1d<int>& mom);
252 
253  //! Apply left-right deriv to the right onto source
254  LatticeColorMatrix leftRightNabla(const multi1d<LatticeColorMatrix>& u,
255  const LatticeColorMatrix& chi,
256  int length,
257  const multi1d<int>& path,
258  const multi1d<int>& mom);
259 
260 
261  //----------------------------------------------------------------------------------
262  //! Apply "D_i" operator to the right onto source
263  /*!
264  * \ingroup smear
265  *
266  * \f$D_i = s_{ijk}\nabla_j\nabla_k\f$
267  *
268  * where \f$s_{ijk} = +1 \quad\forall i\ne j, j\ne k, i \ne k\f$
269  *
270  * \return $\f D_\mu F(z,0)\f$
271  */
272  LatticePropagator rightD(const LatticePropagator& F,
273  const multi1d<LatticeColorMatrix>& u,
274  int mu, int length);
275 
276 
277  //! Apply "B_i" operator to the right onto source
278  /*!
279  * \ingroup smear
280  *
281  * \f$B_i = \epsilon_{ijk}\nabla_j\nabla_k\f$
282  *
283  * \return $\f B_\mu F(z,0) \f$
284  */
285  LatticePropagator rightB(const LatticePropagator& F,
286  const multi1d<LatticeColorMatrix>& u,
287  int mu, int length);
288 
289 
290  //! Apply "E_i" operator to the right onto source
291  /*!
292  * \ingroup smear
293  *
294  * \f$E_0 = (1/sqrt{2})*\nabla_x\nabla_x - \nabla_y\nabla_y\f$
295  * \f$E_1 = -(1/sqrt{6})*\nabla_x\nabla_x + \nabla_y\nabla_y - 2*\nabla_z\nabla_z\f$
296  *
297  * \return $\f E_\alpha F(z,0) \f$
298  */
299  LatticePropagator rightE(const LatticePropagator& F,
300  const multi1d<LatticeColorMatrix>& u,
301  int mu, int length);
302 
303 
304  //! Apply "Laplacian" operator to the right onto source
305  /*!
306  * \ingroup smear
307  *
308  * \f$Laplacian = \sum_{i=1}^3\nabla_i\nabla_i\f$
309  *
310  * \return $\f \nabla^2 F(z,0) \f$
311  */
312  LatticePropagator rightLap(const LatticePropagator& F,
313  const multi1d<LatticeColorMatrix>& u,
314  int length);
315 
316 } // end namespace Chroma
317 
318 #endif
Primary include file for CHROMA library code.
int mu
Definition: cool.cc:24
LatticeColorVector rightNabla(const multi1d< LatticeColorMatrix > &u, const LatticeColorVector &chi, int length, const multi1d< int > &path)
Apply a right nabla path to a lattice field.
LatticePropagator rightLap(const LatticePropagator &F, const multi1d< LatticeColorMatrix > &u, int length)
Apply "E_i" operator to the right onto source.
Definition: displace.cc:614
LatticePropagator displacement(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &chi, int length, int dir)
Apply a displacement operator to a lattice field.
T displace(const multi1d< LatticeColorMatrix > &u, const T &psi, int length, int dir, const Subset &sub)
Apply a displacement operator to a lattice field.
Definition: displace.cc:41
LatticeColorVector leftRightNabla(const LatticeColorVector &F, const multi1d< LatticeColorMatrix > &u, int mu, int length, int mom)
Apply first deriv to the right onto source.
Definition: displace.cc:415
LatticePropagator rightB(const LatticePropagator &F, const multi1d< LatticeColorMatrix > &u, int mu, int length)
Apply "D_i" operator to the right onto source.
Definition: displace.cc:549
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
multi1d< LatticeFermion > chi(Ncb)
static INTERNAL_PRECISION F