Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
generatorSet_Mat_SU_N.cpp
Go to the documentation of this file.
1 
14 #include "generatorSet_Mat_SU_N.h"
15 
16 const std::string GeneratorSet_Mat_SU_N::class_name = "GeneratorSet_Mat_SU_N";
17 
18 //====================================================================
20 {
21  vout.detailed(m_vl, "%s: SU_N generators setup.\n", class_name.c_str());
22 
23  m_Nc = Nc;
24  m_NcA = m_Nc * m_Nc - 1;
25 
26  m_Ta.resize(m_NcA);
27  for (int ica = 0; ica < m_NcA; ++ica) {
28  m_Ta[ica] = new Mat_SU_N(m_Nc, 0.0);
29  }
30 
31  int k = 0;
32  // here setup of each generator:
33  for (int i = 0; i < m_Nc; ++i) {
34  for (int j = i + 1; j < m_Nc; ++j) {
35  m_Ta[k]->set(i, j, 1.0, 0.0);
36  m_Ta[k]->set(j, i, 1.0, 0.0);
37 
38  m_Ta[k + 1]->set(i, j, 0.0, -1.0);
39  m_Ta[k + 1]->set(j, i, 0.0, 1.0);
40 
41  k += 2;
42  }
43  }
44 
45  for (int i = 1; i < m_Nc; ++i) {
46  double elem = sqrt(2.0 / double(i + i * i));
47  for (int j = 0; j < i; ++j) {
48  m_Ta[k]->set(j, j, elem, 0.0);
49  }
50  double elem_i = -double(i) * elem;
51  m_Ta[k]->set(i, i, elem_i, 0.0);
52 
53  ++k;
54  }
55  assert(k == m_NcA);
56 
57  // overall normalization: tr[Ta,Tb] = (1/2) delta_{ab}
58  for (int k = 0; k < m_NcA; ++k) {
59  *m_Ta[k] *= 0.5;
60  }
61 
62  // print();
63 }
64 
65 
66 //====================================================================
68 {
69  for (int k = 0; k < m_NcA; ++k) {
70  vout.general(m_vl, " generator %d:\n", k);
71 
72  for (int i = 0; i < m_Nc; ++i) {
73  for (int j = 0; j < m_Nc; ++j) {
74  vout.general(m_vl, " (%7.4f,%7.4f)", m_Ta[k]->r(i, j),
75  m_Ta[k]->i(i, j));
76  }
77  vout.general(m_vl, "\n");
78  }
79  }
80 
81  vout.general(m_vl, " normalization:\n");
82  vout.general(m_vl, " a b tr[T_a T_b]\n");
83  Mat_SU_N utmp(m_Nc);
84  for (int i = 0; i < m_Nc; ++i) {
85  for (int j = 0; j < m_Nc; ++j) {
86  utmp.mult_nn(*m_Ta[i], *m_Ta[j]);
87  double tr = ReTr(utmp);
88  vout.general(m_vl, " %d %d %f\n", i, j, tr);
89  }
90  }
91 }
92 
93 
94 //====================================================================
96 {
97  for (int ica = 0; ica < m_NcA; ++ica) {
98  delete m_Ta[ica];
99  }
100 
101  // vout.paranoiac(m_vl, "good-bye from GeneratorSet_Mat_SU_N.\n");
102 }
103 
104 
105 //====================================================================
106 //============================================================END=====
BridgeIO vout
Definition: bridgeIO.cpp:503
void detailed(const char *format,...)
Definition: bridgeIO.cpp:216
Bridge::VerboseLevel m_vl
void general(const char *format,...)
Definition: bridgeIO.cpp:197
std::vector< Mat_SU_N * > m_Ta
static const std::string class_name
void mult_nn(const Mat_SU_N &u1, const Mat_SU_N &u2)
Definition: mat_SU_N.h:163
double ReTr(const Mat_SU_N &m)
Definition: mat_SU_N.h:488