CHROMA
constgauge.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Constant diagonal gauge field
3  */
4 
5 #include "chromabase.h"
6 #include "util/gauge/taproj.h"
7 #include "util/gauge/expm12.h"
8 #include "util/gauge/reunit.h"
9 
10 namespace Chroma
11 {
12 
13  //! Const diagonal gauge field
14  /*!
15  * \ingroup gauge
16  *
17  * Arguments:
18  *
19  * \param u Gauge field (Modify)
20  * \param theta Angles (Read)
21  */
22 
23  void constgauge(multi1d<LatticeColorMatrix>& u, const multi2d<Real> theta)
24  {
25  START_CODE();
26 
27  u.resize(Nd);
28 
29  for(int mu = 0; mu < Nd; mu++) // Loop over the directions
30  {
31  multi1d<Complex> phase(Nc); // the phases
32  Complex tmp_u;
33 
34  tmp_u =
35  cmplx(Real(0.0),Real(0.0)); // Set the matrix to zero
36 
37  u[mu] = tmp_u;
38 
39  phase[0] = cmplx(cos(theta(0, mu)), sin(theta(0,mu)));
40  phase[1] = cmplx(cos(theta(1, mu)), sin(theta(1,mu)));
41  phase[2] = cmplx(cos(theta(0, mu) + theta(1, mu)),
42  -sin(theta(0,mu) + theta(1,mu)));
43 
44  // We now insert these elements into the appropriate places
45  for(int i = 0; i < Nc; i++)
46  pokeColor(u[mu], phase[i], i, i);
47 
48  }
49 
50  END_CODE();
51  }
52 }
53 
54 
55 
56 
57 
58 
Primary include file for CHROMA library code.
int mu
Definition: cool.cc:24
12-th order exponentiation of a lattice color matrix
void constgauge(multi1d< LatticeColorMatrix > &u, const multi2d< Real > theta)
Const diagonal gauge field.
Definition: constgauge.cc:23
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
int i
Definition: pbg5p_w.cc:55
START_CODE()
Reunitarize in place a color matrix to SU(N)
Take the traceless antihermitian projection of a color matrix.