CHROMA
rgauge.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Do a random gauge transformation on the u fields
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 
11 namespace Chroma
12 {
13 
14  //! Do a random gauge transformation on the u fields
15  /*!
16  * \ingroup gauge
17  *
18  * Arguments:
19  *
20  * \param u Gauge field (Modify)
21  * \param g Gauge transformation matrices (Write)
22  */
23 
24  void rgauge(multi1d<LatticeColorMatrix>& u, LatticeColorMatrix& g)
25  {
26  START_CODE();
27 
28  // g = exp(A), where A = random traceless antihermitian matrix.
29 
30  // NOTE!!!!: we are using a hack. The twelth_order exponentiation followed
31  // by a reunitarization should be replace by an exact exponentiation.
32  // So, the gauge field distriubution is NOT from Haar measure, but
33  // if someone can think of a really good reason why it should be Haar
34  // measure, then something can be done about it.
35 
36  gaussian(g);
37 
38  taproj(g);
39  expm12(g);
40  reunit(g);
41 
42  for(int mu = 0; mu < Nd; ++mu)
43  {
44  LatticeColorMatrix u_tmp = g * u[mu];
45  u[mu] = u_tmp * shift(adj(g), FORWARD, mu);
46  }
47 
48  END_CODE();
49  }
50 
51 
52  //! Do a random gauge transformation on the u fields
53  /*!
54  * \ingroup gauge
55  *
56  * Convenience function: does not return gauge transformation matrices
57  *
58  * Arguments:
59  *
60  * \param u Gauge field (Modify)
61  */
62 
63  void rgauge(multi1d<LatticeColorMatrix>& u)
64  {
65  START_CODE();
66 
67  LatticeColorMatrix g;
68  rgauge(u, g);
69 
70  END_CODE();
71  }
72 
73 
74 }
Primary include file for CHROMA library code.
int mu
Definition: cool.cc:24
12-th order exponentiation of a lattice color matrix
void taproj(LatticeColorMatrix &a)
Take the traceless antihermitian projection of a color matrix.
Definition: taproj.cc:31
void expm12(LatticeColorMatrix &a)
12-th order exponentiation of a lattice color matrix
Definition: expm12.cc:21
void rgauge(multi1d< LatticeColorMatrix > &u, LatticeColorMatrix &g)
Do a random gauge transformation on the u fields.
Definition: rgauge.cc:24
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
gaussian(aux)
static multi1d< LatticeColorMatrix > u
void reunit(LatticeColorMatrixF3 &xa)
Definition: reunit.cc:467
START_CODE()
#define FORWARD
Definition: primitives.h:82
Reunitarize in place a color matrix to SU(N)
Take the traceless antihermitian projection of a color matrix.