46 if (dir < 0 || dir >=
Nd)
48 QDPIO::cerr << __func__ <<
": invalid direction: dir=" << dir << std::endl;
58 for(
int n = 0;
n < length; ++
n)
66 for(
int n = 0;
n > length; --
n)
77 LatticeColorVector
displace(
const multi1d<LatticeColorMatrix>&
u,
78 const LatticeColorVector&
chi,
81 return displace<LatticeColorVector>(
u,
chi, length, dir, QDP::all);
85 LatticeColorVector
displace(
const multi1d<LatticeColorMatrix>&
u,
86 const LatticeColorVector&
chi,
87 int length,
int dir,
const Subset& sub)
89 return displace<LatticeColorVector>(
u,
chi, length, dir, sub);
94 LatticeColorMatrix
displace(
const multi1d<LatticeColorMatrix>&
u,
95 const LatticeColorMatrix&
chi,
98 return displace<LatticeColorMatrix>(
u,
chi, length, dir, QDP::all);
102 LatticeColorMatrix
displace(
const multi1d<LatticeColorMatrix>&
u,
103 const LatticeColorMatrix&
chi,
104 int length,
int dir,
const Subset& sub)
106 return displace<LatticeColorMatrix>(
u,
chi, length, dir, sub);
111 LatticeFermion
displace(
const multi1d<LatticeColorMatrix>&
u,
112 const LatticeFermion&
chi,
115 return displace<LatticeFermion>(
u,
chi, length, dir, QDP::all);
119 LatticePropagator
displace(
const multi1d<LatticeColorMatrix>&
u,
120 const LatticePropagator&
chi,
123 return displace<LatticePropagator>(
u,
chi, length, dir, QDP::all);
127 #ifndef QDP_IS_QDPJIT_NO_NVPTX
129 LatticeColorVectorSpinMatrix
displace(
const multi1d<LatticeColorMatrix>&
u,
130 const LatticeColorVectorSpinMatrix&
chi,
133 return displace<LatticeColorVectorSpinMatrix>(
u,
chi, length, dir, QDP::all);
138 LatticeStaggeredFermion
displace(
const multi1d<LatticeColorMatrix>&
u,
139 const LatticeStaggeredFermion&
chi,
142 return displace<LatticeStaggeredFermion>(
u,
chi, length, dir, QDP::all);
147 LatticeStaggeredPropagator
displace(
const multi1d<LatticeColorMatrix>&
u,
148 const LatticeStaggeredPropagator&
chi,
151 return displace<LatticeStaggeredPropagator>(
u,
chi, length, dir, QDP::all);
173 int displacement_length,
174 const multi1d<int>& path,
177 if (displacement_length < 0)
179 QDPIO::cerr << __func__ <<
": invalid length=" << displacement_length << std::endl;
186 for(
int i=0;
i < path.size(); ++
i)
190 int disp_dir = path[
i] - 1;
191 int disp_len = displacement_length;
192 chi[sub] = displace<T>(
u,
chi, disp_len, disp_dir, sub);
194 else if (path[
i] < 0)
196 int disp_dir = -path[
i] - 1;
197 int disp_len = -displacement_length;
198 chi[sub] = displace<T>(
u,
chi, disp_len, disp_dir, sub);
207 LatticeColorVector
displace(
const multi1d<LatticeColorMatrix>&
u,
208 const LatticeColorVector&
chi,
209 int length,
const multi1d<int>& path)
211 return displace<LatticeColorVector>(
u,
chi, length, path, QDP::all);
215 LatticeColorVector
displace(
const multi1d<LatticeColorMatrix>&
u,
216 const LatticeColorVector&
chi,
217 int length,
const multi1d<int>& path,
220 return displace<LatticeColorVector>(
u,
chi, length, path, sub);
225 LatticeColorMatrix
displace(
const multi1d<LatticeColorMatrix>&
u,
226 const LatticeColorMatrix&
chi,
227 int length,
const multi1d<int>& path)
229 return displace<LatticeColorMatrix>(
u,
chi, length, path, QDP::all);
233 LatticeColorMatrix
displace(
const multi1d<LatticeColorMatrix>&
u,
234 const LatticeColorMatrix&
chi,
235 int length,
const multi1d<int>& path,
238 return displace<LatticeColorMatrix>(
u,
chi, length, path, sub);
243 LatticeFermion
displace(
const multi1d<LatticeColorMatrix>&
u,
244 const LatticeFermion&
chi,
245 int length,
const multi1d<int>& path)
247 return displace<LatticeFermion>(
u,
chi, length, path, QDP::all);
251 LatticeFermion
displace(
const multi1d<LatticeColorMatrix>&
u,
252 const LatticeFermion&
chi,
253 int length,
const multi1d<int>& path,
256 return displace<LatticeFermion>(
u,
chi, length, path, sub);
260 LatticePropagator
displace(
const multi1d<LatticeColorMatrix>&
u,
261 const LatticePropagator&
p,
262 int length,
const multi1d<int>& path)
264 return displace<LatticePropagator>(
u,
p, length, path, QDP::all);
268 LatticePropagator
displace(
const multi1d<LatticeColorMatrix>&
u,
269 const LatticePropagator&
p,
270 int length,
const multi1d<int>& path,
273 return displace<LatticePropagator>(
u,
p, length, path, sub);
281 const multi1d<LatticeColorMatrix>&
u,
284 return displace<T>(
u,
F, length,
mu, QDP::all) - displace<T>(
u,
F, -length,
mu, QDP::all);
296 LatticeColorVector
rightNabla(
const LatticeColorVector&
F,
297 const multi1d<LatticeColorMatrix>&
u,
300 return rightNablaT<LatticeColorVector>(
F,
u,
mu, length);
305 const multi1d<LatticeColorMatrix>&
u,
308 return rightNablaT<LatticeFermion>(
F,
u,
mu, length);
312 LatticePropagator
rightNabla(
const LatticePropagator&
F,
313 const multi1d<LatticeColorMatrix>&
u,
316 return rightNablaT<LatticePropagator>(
F,
u,
mu, length);
325 int displacement_length,
326 const multi1d<int>& path)
328 if (displacement_length < 0)
330 QDPIO::cerr << __func__ <<
": invalid length=" << displacement_length << std::endl;
337 for(
int i=0;
i < path.size(); ++
i)
341 int disp_dir = path[
i] - 1;
342 int disp_len = displacement_length;
343 chi = rightNablaT<T>(
chi,
u, disp_dir, disp_len);
345 else if (path[
i] <= 0)
347 QDPIO::cerr << __func__ <<
": invalid path dir=" << path[
i] << std::endl;
357 LatticeColorVector
rightNabla(
const multi1d<LatticeColorMatrix>&
u,
358 const LatticeColorVector&
chi,
359 int length,
const multi1d<int>& path)
361 return rightNablaT<LatticeColorVector>(
u,
chi, length, path);
365 LatticeColorMatrix
rightNabla(
const multi1d<LatticeColorMatrix>&
u,
366 const LatticeColorMatrix&
chi,
367 int length,
const multi1d<int>& path)
369 return rightNablaT<LatticeColorMatrix>(
u,
chi, length, path);
374 LatticeFermion
rightNabla(
const multi1d<LatticeColorMatrix>&
u,
375 const LatticeFermion&
chi,
376 int length,
const multi1d<int>& path)
378 return rightNablaT<LatticeFermion>(
u,
chi, length, path);
382 LatticePropagator
rightNabla(
const multi1d<LatticeColorMatrix>&
u,
383 const LatticePropagator&
chi,
384 int length,
const multi1d<int>& path)
386 return rightNablaT<LatticePropagator>(
u,
chi, length, path);
395 const multi1d<LatticeColorMatrix>&
u,
399 Real angle =
twopi*mom / Real(Layout::lattSize()[
mu]);
400 Complex phase = cmplx(cos(angle),sin(angle));
402 return (Real(1) + conj(phase))*displace<T>(
u,
F, -length,
mu, QDP::all) - (Real(1) + phase)*displace<T>(
u,
F, length,
mu, QDP::all);
416 const multi1d<LatticeColorMatrix>&
u,
420 return leftRightNablaT<LatticeColorVector>(
F,
u,
mu, length, mom);
425 const multi1d<LatticeColorMatrix>&
u,
429 return leftRightNablaT<LatticeFermion>(
F,
u,
mu, length, mom);
434 const multi1d<LatticeColorMatrix>&
u,
438 return leftRightNablaT<LatticePropagator>(
F,
u,
mu, length, mom);
441 #ifndef QDP_IS_QDPJIT_NO_NVPTX
444 const multi1d<LatticeColorMatrix>&
u,
448 return leftRightNablaT<LatticeColorVectorSpinMatrix>(
F,
u,
mu, length, mom);
458 int displacement_length,
459 const multi1d<int>& path,
460 const multi1d<int>& mom)
462 if (displacement_length < 0)
464 QDPIO::cerr << __func__ <<
": invalid length=" << displacement_length << std::endl;
471 for(
int i=0;
i < path.size(); ++
i)
475 int disp_dir = path[
i] - 1;
476 int disp_len = displacement_length;
477 chi = leftRightNablaT<T>(
chi,
u, disp_dir, disp_len, mom[disp_dir]);
479 else if (path[
i] <= 0)
481 QDPIO::cerr << __func__ <<
": invalid path dir=" << path[
i] << std::endl;
492 const LatticeColorVector&
chi,
494 const multi1d<int>& path,
495 const multi1d<int>& mom)
497 return leftRightNablaT<LatticeColorVector>(
u,
chi, length, path, mom);
502 const LatticeColorMatrix&
chi,
504 const multi1d<int>& path,
505 const multi1d<int>& mom)
507 return leftRightNablaT<LatticeColorMatrix>(
u,
chi, length, path, mom);
523 LatticePropagator rightD(
const LatticePropagator&
F,
524 const multi1d<LatticeColorMatrix>&
u,
530 for(
int j=0;
j < 3; ++
j)
531 for(
int k=0;
k < 3; ++
k)
549 LatticePropagator
rightB(
const LatticePropagator&
F,
550 const multi1d<LatticeColorMatrix>&
u,
556 for(
int j=0;
j < 3; ++
j)
557 for(
int k=0;
k < 3; ++
k)
576 LatticePropagator rightE(
const LatticePropagator&
F,
577 const multi1d<LatticeColorMatrix>&
u,
580 LatticePropagator
tmp;
587 tmp *= Real(1)/Real(sqrt(Real(2)));
594 tmp *= Real(-1)/Real(sqrt(Real(6)));
598 QDPIO::cerr << __func__ <<
": invalid direction for E: mu=" <<
mu << std::endl;
615 const multi1d<LatticeColorMatrix>&
u,
620 for(
int i=0;
i < 3; ++
i)
Compute anti-symmetric tensors.
Parallel transport a lattice field.
Tensor used for E representations.
int symTensor3d(int i, int j, int k)
Return 3d symmetric tensor.
int antiSymTensor3d(int i, int j, int k)
Return 3d symmetric tensor.
LatticeColorVector rightNabla(const multi1d< LatticeColorMatrix > &u, const LatticeColorVector &chi, int length, const multi1d< int > &path)
Apply a right nabla path to a lattice field.
T rightNablaT(const T &F, const multi1d< LatticeColorMatrix > &u, int mu, int length)
Apply a right derivative 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.
T leftRightNablaT(const multi1d< LatticeColorMatrix > &u, const T &psi, int displacement_length, const multi1d< int > &path, const multi1d< int > &mom)
Apply a right derivative path 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.
LatticeColorVector leftRightNabla(const LatticeColorVector &F, const multi1d< LatticeColorMatrix > &u, int mu, int length, int mom)
Apply first deriv to the right onto source.
LatticePropagator rightB(const LatticePropagator &F, const multi1d< LatticeColorMatrix > &u, int mu, int length)
Apply "D_i" operator to the right onto source.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
Compute symmetric tensors.
static INTERNAL_PRECISION F