Bridge++  Ver. 2.0.2
gammaMatrixSet.h
Go to the documentation of this file.
1 
14 #ifndef GAMMAMATRIXSET_INCLUDED
15 #define GAMMAMATRIXSET_INCLUDED
16 
17 #include <cassert>
18 
20 #include "gammaMatrix.h"
21 
22 #ifdef USE_FACTORY
23 #include "factory.h"
24 #endif
25 
27 
38 {
39  protected:
41  std::vector<GammaMatrix> m_gm;
42 
44 
45  public:
46  enum GMspecies
47  {
54  };
55 
57  : m_vl(CommonParameters::Vlevel())
58  {
59  int Nd = CommonParameters::Nd();
60 
61  assert(Nd == 4);
62  m_Nspecies = Nd * (Nd + 1) + 1; // must be 21.
63  m_gm.resize(m_Nspecies);
64  }
65 
66  virtual ~GammaMatrixSet() {}
67 
68  private:
69  // non-copyable
72 
73  public:
74  virtual void init_GM() = 0;
75 
77  {
78  assert(spec < m_Nspecies);
79  return m_gm[spec];
80  }
81 
82  virtual void print() = 0;
83 
84 #ifdef USE_FACTORY
85  public:
86  typedef GammaMatrixSet *(*ProductCreator)();
88 
89  static GammaMatrixSet *New(const IdentifierType& subtype)
90  {
91  ProductCreator p = Factory::Find(subtype);
92 
93  return p ? (*p)() : 0;
94  }
95 
96 #ifdef USE_FACTORY_AUTOREGISTER
97 #else
98  static bool init_factory();
99 #endif
100 #endif
101 };
102 #endif
GammaMatrixSet
Set of Gamma Matrices: basis class.
Definition: gammaMatrixSet.h:37
GammaMatrixSet::GAMMA51
@ GAMMA51
Definition: gammaMatrixSet.h:49
GammaMatrixSet::GAMMA5
@ GAMMA5
Definition: gammaMatrixSet.h:48
GammaMatrixSet::m_Nspecies
int m_Nspecies
Definition: gammaMatrixSet.h:40
GammaMatrixSet::CHARGECONJG
@ CHARGECONJG
Definition: gammaMatrixSet.h:53
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
GammaMatrixSet::GAMMA1
@ GAMMA1
Definition: gammaMatrixSet.h:48
factory.h
gammaMatrix.h
GammaMatrix
Gamma Matrix class.
Definition: gammaMatrix.h:44
GammaMatrixSet::UNITY
@ UNITY
Definition: gammaMatrixSet.h:48
GammaMatrixSet::GMspecies
GMspecies
Definition: gammaMatrixSet.h:46
GammaMatrixSet::GAMMA15
@ GAMMA15
Definition: gammaMatrixSet.h:50
GammaMatrixSet::GAMMA3
@ GAMMA3
Definition: gammaMatrixSet.h:48
GammaMatrixSet::GAMMA53
@ GAMMA53
Definition: gammaMatrixSet.h:49
GammaMatrixSet::GAMMA54
@ GAMMA54
Definition: gammaMatrixSet.h:49
GammaMatrixSet::GammaMatrixSet
GammaMatrixSet()
Definition: gammaMatrixSet.h:56
GammaMatrixSet::GAMMA4
@ GAMMA4
Definition: gammaMatrixSet.h:48
GammaMatrixSet::GAMMA25
@ GAMMA25
Definition: gammaMatrixSet.h:50
GammaMatrixSet::SIGMA41
@ SIGMA41
Definition: gammaMatrixSet.h:52
GammaMatrixSet::~GammaMatrixSet
virtual ~GammaMatrixSet()
Definition: gammaMatrixSet.h:66
GammaMatrixSet::GAMMA45
@ GAMMA45
Definition: gammaMatrixSet.h:50
GammaMatrixSet::GAMMA35
@ GAMMA35
Definition: gammaMatrixSet.h:50
GammaMatrixSet::SIGMA42
@ SIGMA42
Definition: gammaMatrixSet.h:52
GammaMatrixSet::print
virtual void print()=0
FactoryTemplate
Definition: factory.h:42
CommonParameters::Nd
static int Nd()
Definition: commonParameters.h:116
GammaMatrixSet::GAMMA52
@ GAMMA52
Definition: gammaMatrixSet.h:49
GammaMatrixSet::init_GM
virtual void init_GM()=0
GammaMatrixSet::operator=
GammaMatrixSet & operator=(const GammaMatrixSet &)
GammaMatrixSet::SIGMA23
@ SIGMA23
Definition: gammaMatrixSet.h:51
GammaMatrixSet::SIGMA12
@ SIGMA12
Definition: gammaMatrixSet.h:51
GammaMatrixSet::m_vl
Bridge::VerboseLevel m_vl
Definition: gammaMatrixSet.h:43
commonParameters.h
GammaMatrixSet::get_GM
GammaMatrix get_GM(GMspecies spec)
Definition: gammaMatrixSet.h:76
GammaMatrixSet::GAMMA2
@ GAMMA2
Definition: gammaMatrixSet.h:48
GammaMatrixSet::SIGMA31
@ SIGMA31
Definition: gammaMatrixSet.h:51
GammaMatrixSet::SIGMA43
@ SIGMA43
Definition: gammaMatrixSet.h:52
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
GammaMatrixSet::m_gm
std::vector< GammaMatrix > m_gm
Definition: gammaMatrixSet.h:41
IdentifierType
std::string IdentifierType
Definition: factory.h:39