CHROMA
mesfield.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Calculates the antihermitian field strength tensor iF(mu,nu)
3  */
4 
5 #include "chromabase.h"
6 #include "meas/glue/mesfield.h"
7 
8 namespace Chroma
9 {
10 
11  //! Calculates the antihermitian field strength tensor iF(mu,nu)
12  /*
13  * \ingroup glue
14  *
15  * F(mu,nu) = (1/4) sum_p (1/2) [ U_p(x) - U^dag_p(x) ]
16  *
17  * where
18  * U_1 = u(x,mu)*u(x+mu,nu)*u_dag(x+nu,mu)*u_dag(x,nu)
19  * U_2 = u(x,nu)*u_dag(x-mu+nu,mu)*u_dag(x-mu,nu)*u(x-mu,mu)
20  * U_3 = u_dag(x-mu,mu)*u_dag(x-mu-nu,nu)*u(x-mu-nu,mu)*u(x-nu,nu)
21  * U_4 = u_dag(x-nu,nu)*u(x-nu,mu)*u(x-nu+mu,nu)*u_dag(x,mu)
22 
23  * NOTE: I am using i*F of the usual F defined by UKQCD, Heatlie et.al.
24 
25  * Arguments:
26 
27  * \param f field strength tensor f(mu,nu) (Write)
28  * \param u gauge field (Read)
29  */
30  template<typename U>
31  void mesFieldT(multi1d<U>& f,
32  const multi1d<U>& u)
33  {
34  START_CODE();
35 
36  f.resize(Nd*(Nd-1)/2);
37 
38  U tmp_0;
39  U tmp_1;
40  U tmp_2;
41  U tmp_3;
42  U tmp_4;
43 
44  Real fact = 0.125;
45 
46  int offset = 0;
47 
48  for(int mu=0; mu < Nd-1; ++mu)
49  {
50  for(int nu=mu+1; nu < Nd; ++nu)
51  {
52  tmp_3 = shift(u[nu], FORWARD, mu);
53  tmp_4 = shift(u[mu], FORWARD, nu);
54  tmp_0 = u[nu] * tmp_4;
55  tmp_1 = u[mu] * tmp_3;
56 
57  f[offset] = tmp_1 * adj(tmp_0);
58 
59  tmp_2 = adj(tmp_0) * tmp_1;
60  tmp_1 = shift(tmp_2, BACKWARD, nu);
61  f[offset] += shift(tmp_1, BACKWARD, mu);
62  tmp_1 = tmp_4 * adj(tmp_3);
63  tmp_0 = adj(u[nu]) * u[mu];
64 
65  f[offset] += shift(tmp_0*adj(tmp_1), BACKWARD, nu);
66  f[offset] += shift(adj(tmp_1)*tmp_0, BACKWARD, mu);
67 
68  tmp_0 = adj(f[offset]);
69  f[offset] -= tmp_0;
70  f[offset] *= fact;
71 
72  ++offset;
73  }
74  }
75 
76 
77  END_CODE();
78  }
79 
80  void mesField(multi1d<LatticeColorMatrixF>& f,
81  const multi1d<LatticeColorMatrixF>& u)
82  {
83  mesFieldT(f,u);
84  }
85 
86  void mesField(multi1d<LatticeColorMatrixD>& f,
87  const multi1d<LatticeColorMatrixD>& u)
88  {
89  mesFieldT(f,u);
90  }
91 
92 
93 } // namespace Chroma
Primary include file for CHROMA library code.
int mu
Definition: cool.cc:24
int nu
Definition: cool.cc:25
Calculates the antihermitian field strength tensor iF(mu,nu)
LatticeColorMatrix tmp_2
Definition: meslate.cc:51
LatticeColorMatrix tmp_3
Definition: meslate.cc:52
LatticeColorMatrix tmp_1
Definition: meslate.cc:50
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
void mesField(multi1d< LatticeColorMatrixF > &f, const multi1d< LatticeColorMatrixF > &u)
Calculates the antihermitian field strength tensor iF(mu,nu)
Definition: mesfield.cc:80
START_CODE()
void mesFieldT(multi1d< U > &f, const multi1d< U > &u)
Calculates the antihermitian field strength tensor iF(mu,nu)
Definition: mesfield.cc:31
#define FORWARD
Definition: primitives.h:82
#define BACKWARD
Definition: primitives.h:83
multi1d< LatticeColorMatrix > U