CHROMA
expm12.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief 12-th order exponentiation of a lattice color matrix
3  */
4 
5 #include "chromabase.h"
6 #include "util/gauge/expm12.h"
7 
8 namespace Chroma {
9 
10 //! 12-th order exponentiation of a lattice color matrix
11 /*!
12  * \ingroup gauge
13  *
14  * In place a_ = 1 + a_ + (1/2)*a_^2 + ...+ (1/n!)*(a_)^n n = power
15  *
16  * Arguments:
17  *
18  * \param a LatticeColorMatrix (Modify)
19  */
20 
21 void expm12(LatticeColorMatrix& a)
22 {
23  START_CODE();
24 
25  // aux1 = aux2 = a; a = ONE + a
26  LatticeColorMatrix aux1 = a;
27  LatticeColorMatrix aux2 = a;
28  LatticeColorMatrix aux3;
29  a += 1;
30 
31  // Do a 12th order exponentiation
32  for(int i= 2; i <= 12; ++i)
33  {
34  Real dummy = Real(1)/Real(i);
35 
36  aux3 = aux2 * aux1;
37  aux2 = aux3 * dummy;
38  a += aux2;
39  }
40 
41  END_CODE();
42 }
43 
44 } // end namespace Chroma
Primary include file for CHROMA library code.
12-th order exponentiation of a lattice color matrix
void expm12(LatticeColorMatrix &a)
12-th order exponentiation of a lattice color matrix
Definition: expm12.cc:21
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int i
Definition: pbg5p_w.cc:55
Complex a
Definition: invbicg.cc:95
START_CODE()
Real dummy
Definition: qtopcor.cc:36