Bridge++  Ver. 1.3.x
gammaMatrixSet.h
Go to the documentation of this file.
1 
14 #ifndef GAMMAMATRIXSET_INCLUDED
15 #define GAMMAMATRIXSET_INCLUDED
16 
17 #include <cassert>
18 
19 #include "commonParameters.h"
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  {
52  };
53 
55  : m_vl(CommonParameters::Vlevel())
56  {
57  int Nd = CommonParameters::Nd();
58 
59  assert(Nd == 4);
60  m_Nspecies = Nd * Nd + 1; // must be 17.
61  m_gm.resize(m_Nspecies);
62  }
63 
64  virtual ~GammaMatrixSet() {}
65 
66  private:
67  // non-copyable
70 
71  public:
72  virtual void init_GM() = 0;
73 
75  {
76  assert(spec < m_Nspecies);
77  return m_gm[spec];
78  }
79 
80  virtual void print() = 0;
81 
82 #ifdef USE_FACTORY
83  public:
84  typedef GammaMatrixSet *(*ProductCreator)();
86 
87  static GammaMatrixSet *New(const IdentifierType& subtype)
88  {
89  ProductCreator p = Factory::Find(subtype);
90 
91  return p ? (*p)() : 0;
92  }
93 #endif
94 };
95 #endif
virtual ~GammaMatrixSet()
std::vector< GammaMatrix > m_gm
GammaMatrix get_GM(GMspecies spec)
GammaMatrixSet & operator=(const GammaMatrixSet &)
Gamma Matrix class.
Definition: gammaMatrix.h:44
virtual void print()=0
virtual void init_GM()=0
Set of Gamma Matrices: basis class.
Common parameter class: provides parameters as singleton.
VerboseLevel
Definition: bridgeIO.h:39
std::string IdentifierType
Factory template class.
Definition: factory.h:33
Bridge::VerboseLevel m_vl