CHROMA
eesu3.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Exactly exponentiate a SU(3) lie algebra element
4  */
5 
6 #include "chromabase.h"
7 #include "util/gauge/eesu3.h"
8 
9 namespace Chroma
10 {
11 
12  //! Exact exponentiation of SU(3) matrix.
13  /*!
14  * Input: 3x3 anti-Hermitian, traceless matrix iQ
15  * Output: exp(iQ)
16  *
17  * Formula for exp(iQ) = f0 + f1*Q + f2*Q*Q is found
18  * in section III of hep-lat/0311018.
19  */
20  void eesu3(LatticeColorMatrix & iQ)
21  {
22  START_CODE( );
23 
24  LatticeColorMatrix Q = timesMinusI(iQ);
25 
26  LatticeComplex f0, f1, f2;
27 
28  LatticeColorMatrix QQ = Q*Q;
29 
30  LatticeReal c0 = real((1.0/3.0) * trace(Q*QQ));
31  LatticeReal c1 = real((1.0/2.0) * trace(QQ));
32  LatticeReal c0abs = fabs(c0);
33  LatticeReal c0max = 2 * pow((c1 / 3.0), 1.5);
34  LatticeReal theta = acos(c0abs/c0max);
35  LatticeReal u = sqrt(c1 / 3.0) * cos(theta / 3.0);
36  LatticeReal w = sqrt(c1) * sin(theta / 3.0);
37  LatticeReal uu = u*u;
38  LatticeReal ww = w*w;
39  LatticeReal cosu = cos(u);
40  LatticeReal cosw = cos(w);
41  LatticeReal sinu = sin(u);
42  LatticeReal sinw = sin(w);
43 
44  // exp(2iu) and exp(-iu)
45  LatticeComplex exp2iu = cmplx((2*cosu*cosu - 1), 2*cosu*sinu);
46  LatticeComplex expmiu = cmplx(cosu, -sinu);
47 
48  LatticeBoolean latboo_c0 = (c0 < 0);
49  LatticeBoolean latboo_c1 = (c1 > 1.0e-4);
50  LatticeBoolean latboo_w = (fabs(w) > 0.05);
51 
52  LatticeReal denom = where(latboo_c1,
53  9 * uu - ww,
54  Real(1.0));
55 
56  // xi0 = xi0(w). Expand xi0 if w is small.
57  LatticeReal xi0 = where(latboo_w,
58  sinw/w,
59  1 - (1.0/6.0)*ww*(1-(1.0/20.0)*ww*(1-(1.0/42.0)*ww)));
60 
61  // f_i = f_i(c0, c1). Expand f_i by c1, if c1 is small.
62  f0 = where(latboo_c1,
63  ((uu - ww) * exp2iu + expmiu
64  * cmplx(8*uu*cosw, 2*u*(3*uu+ww)*xi0))/denom,
65  cmplx(1-c0*c0/720, -c0/6*(1-c1/20*(1-c1/42))));
66 
67  f1 = where(latboo_c1,
68  (2*u*exp2iu - expmiu * cmplx(2*u*cosw, (ww-3*uu)*xi0))/denom,
69  cmplx(c0/24*(1.0-c1/15*(1-3*c1/112)),
70  1-c1/6*(1-c1/20*(1-c1/42))-c0*c0/5040));
71 
72  f2 = where(latboo_c1,
73  (exp2iu - expmiu * cmplx(cosw, 3*u*xi0))/denom,
74  0.5*cmplx(-1+c1/12*(1-c1/30*(1-c1/56))
75  +c0*c0/20160, c0/60*(1-c1/21*(1-c1/48))));
76 
77  // f_j(-c0, c1) = (-1)^j f*_j(c0, c1)
78  f0 = where(latboo_c0 && latboo_c1,
79  adj(f0),
80  f0);
81 
82  f1 = where(latboo_c0 && latboo_c1,
83  -1.0*adj(f1),
84  f1);
85 
86  f2 = where(latboo_c0 && latboo_c1,
87  adj(f2),
88  f2);
89 
90  // evaluate f0 + f1 Q + f2 QQ (= exp(iQ)) back into iQ
91  iQ = f0 + f1 * Q + f2 * QQ;
92 
93  // Relpace Q by exp(iQ)
94  // Q = expiQ;
95 
96 
97  END_CODE( );
98  }
99 
100 } // end namespace Chroma
101 
102 
103 
Primary include file for CHROMA library code.
Exactly exponentiate a SU(3) lie algebra element.
void eesu3(LatticeColorMatrix &iQ)
Exact exponentiation of SU(3) matrix.
Definition: eesu3.cc:20
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::Q Q
START_CODE()
const T1 const T2 & f2
Definition: gtest.h:1321
const T1 & f1
Definition: gtest.h:1316