CHROMA
naik_term_s.cc
Go to the documentation of this file.
1 /* $Id: naik_term_s.cc,v 3.1 2008-03-27 10:19:46 mcneile Exp $ */
2 
3 /* NAIK_LINKS */
4 
5 /* Construct the "triple" links */
6 /* used in the staggered "asqtad" action */
7 
8 /* NOTE: the staggered phase factors are assumed to be included */
9 /* in the gauge fields u */
10 
11 /* Arguments: */
12 
13 /* u -- gauge field (Read) */
14 /* ut -- "triple-link" gauge field (Write) */
15 
16 //
17 // recoded by mcneile
18 //
19 // rewritten by steve to calculate u_triple.
20 //
21 
23 
24 
25 namespace Chroma
26 {
27 
28 //
29 // u(Nd), probably should check
30 // ut(Nd),
31 //
32 
33 void Triple_Links(multi1d<LatticeColorMatrix> & u,
34  multi1d<LatticeColorMatrix> & ut,
35  Real u0)
36 {
37  START_CODE();
38 
39  LatticeColorMatrix tmp_0;
40  LatticeColorMatrix tmp_1;
41  Real c_3;
42 
43  int mu;
44 
45  // SZIN parameters from macros/primitives.mh
46  // probably should be checked
47  //
48  // enum SZINdir { BACKWARD= 0 , FORWARD = 1 } ;
49 
50 
51  if (Nd == 4)
52  {
53  c_3 = (Real)(-1) / (u0*u0*(Real)(24));
54 
55 
56  for(mu=0; mu < Nd; ++mu)
57  {
58  tmp_0 = u[mu]*shift(u[mu], FORWARD, mu);
59  tmp_1 = u[mu]*shift(tmp_0, FORWARD, mu);
60  ut[mu] = tmp_1 * c_3;
61  }
62  }
63 
64  END_CODE();
65 }
66 
67 
68 void Triple_Links(multi1d<LatticeColorMatrix> & u,
69  multi1d<LatticeColorMatrix> & ut,
70  Real u0, Real c_3)
71 {
72  START_CODE();
73 
74  LatticeColorMatrix tmp_0;
75  LatticeColorMatrix tmp_1;
76 
77  int mu;
78 
79  // SZIN parameters from macros/primitives.mh
80  // probably should be checked
81  //
82  // enum SZINdir { BACKWARD= 0 , FORWARD = 1 } ;
83 
84 
85  if (Nd == 4)
86  {
87  // c_3 = (Real)(-1) / (u0*u0*(Real)(24));
88  c_3 /= u0*u0 ;
89 
90  for(mu=0; mu < Nd; ++mu)
91  {
92  tmp_0 = u[mu]*shift(u[mu], FORWARD, mu);
93  tmp_1 = u[mu]*shift(tmp_0, FORWARD, mu);
94  ut[mu] = tmp_1 * c_3;
95  }
96  }
97 
98  END_CODE();
99 }
100 
101 
102 
103 } // End Namespace Chroma
104 
Real u0
int mu
Definition: cool.cc:24
void Triple_Links(multi1d< LatticeColorMatrix > &u, multi1d< LatticeColorMatrix > &u_triple, Real u0)
Definition: naik_term_s.cc:33
Support for Asqtad.
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
START_CODE()
#define FORWARD
Definition: primitives.h:82