CHROMA
eesu2.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Exactly exponentiate a SU(2) lie algebra element
3  */
4 
5 #include "chromabase.h"
6 #include "util/gauge/eesu2.h"
8 #include "util/gauge/sunfill.h"
9 
10 namespace Chroma
11 {
12  //! Exactly exponentiate a SU(2) lie algebra element
13  /*!
14  * \ingroup gauge
15  *
16  * \param m LatticeColorMatrix (Modify)
17  */
18  void eesu2(LatticeColorMatrix& m)
19  {
20  START_CODE();
21 
22  if ( Nc != 2 )
23  {
24  QDPIO::cerr << __func__ << ": can only handle SU(2)" << std::endl;
25  QDP_abort(1);
26  }
27 
28  /* Extract components r_k proportional to SU(2) submatrix su2_index */
29  /* from the "SU(Nc)" matrix V. The SU(2) matrix is parametrized in the */
30  /* sigma matrix basis. */
31  /* NOTE: r_0 should be 0 */
32  multi1d<LatticeReal> r(4);
33  su2Extract(r, m, 0, all);
34 
35  r[0]=Real(0.5)*r[0];
36  r[1]=Real(0.5)*r[1];
37  r[2]=Real(0.5)*r[2];
38  r[3]=Real(0.5)*r[3];
39 
40  LatticeReal r_l = sqrt(r[1]*r[1] + r[2]*r[2] + r[3]*r[3]);
41 
42  // Normalize
43  LatticeBoolean lbtmp = r_l > fuzz;
44  LatticeReal lftmp = sin(r_l) / where(lbtmp, r_l, LatticeReal(1));
45 
46  /* Euler expand SU(2) lie algebra element to SU(2) lie group element */
47  /* Be careful to check for elements below fuzz, then set to identity */
48 
49  // Fill (r[0]/r_l, -r[1]/r_l, -r[2]/r_l, -r[3]/r_l) for r_l > fuzz
50  // and (1,0,0,0) for sites with r_l < fuzz
51  multi1d<LatticeReal> a(4);
52  a[0] = where(lbtmp, cos(r_l), LatticeReal(1));
53  a[1] = where(lbtmp, r[1] * lftmp, LatticeReal(0));
54  a[2] = where(lbtmp, r[2] * lftmp, LatticeReal(0));
55  a[3] = where(lbtmp, r[3] * lftmp, LatticeReal(0));
56 
57  /*
58  * Now fill an SU(3) matrix V with the SU(2) submatrix su2_index
59  * paramtrized by a_k in the sigma matrix basis.
60  */
61  sunFill(m, a, 0, all);
62 
63  END_CODE();
64  }
65 
66 } // end namespace Chroma
Primary include file for CHROMA library code.
Exactly exponentiate a SU(2) lie algebra element.
void eesu2(LatticeColorMatrix &m)
Exactly exponentiate a SU(2) lie algebra element.
Definition: eesu2.cc:18
void sunFill(LatticeColorMatrix &dest, const multi1d< LatticeReal > &r, int su2_index, const Subset &s)
Fill a dest(su2_index) <- r_0,r_1,r_2,r_3 under a subset.
Definition: sunfill.cc:33
void su2Extract(multi1d< LatticeReal > &r, const LatticeColorMatrix &source, int su2_index, const Subset &s)
Su2_extract: r_0,r_1,r_2,r_3 <- source(su2_index) [SU(N) field] under a subset.
Definition: su2extract.cc:86
static int m[4]
Definition: make_seeds.cc:16
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
Complex a
Definition: invbicg.cc:95
START_CODE()
Extract an unnormalized SU(2) matrix from a GL(3,C) matrix.
Fill an SU(Nc) matrix with an SU(2) submatrix.