Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
staple.h
Go to the documentation of this file.
1 
14 #ifndef STAPLE_INCLUDED
15 #define STAPLE_INCLUDED
16 
17 #include "Parameters/parameters.h"
18 #include "Field/field_G.h"
19 
20 #include "IO/bridgeIO.h"
21 
22 #ifdef USE_FACTORY
23 #include "Tools/factory.h"
24 #endif
25 
27 
33 class Staple
34 {
35  protected:
37 
38  public:
40  : m_vl(CommonParameters::Vlevel()) {}
41 
42  virtual ~Staple() {}
43 
44  private:
45  // non-copyable
46  Staple(const Staple&);
47  Staple& operator=(const Staple&);
48 
49  public:
51  virtual void set_parameters(const Parameters& params) = 0;
52 
54 
56  virtual void upper(Field_G&, const Field_G&, const int mu, const int nu) = 0;
57 
59  virtual void lower(Field_G&, const Field_G&, const int mu, const int nu) = 0;
60 
62  virtual void staple(Field_G&, const Field_G&, const int mu) = 0;
63 
65  virtual double plaquette(const Field_G&) = 0;
66 
68  virtual double plaq_s(const Field_G&) = 0;
69 
71  virtual double plaq_t(const Field_G&) = 0;
72 
73 #ifdef USE_FACTORY
74  public:
75  typedef Staple *(*ProductCreator)();
77 
78  static Staple *New(const IdentifierType& subtype)
79  {
80  ProductCreator p = Factory::Find(subtype);
81 
82  return p ? (*p)() : 0;
83  }
84 
85 #ifdef USE_FACTORY_AUTOREGISTER
86 #else
87  static bool init_factory();
88 #endif
89 #endif
90 };
91 #endif
Staple & operator=(const Staple &)
virtual void upper(Field_G &, const Field_G &, const int mu, const int nu)=0
constructs upper staple in mu-nu plane.
virtual void lower(Field_G &, const Field_G &, const int mu, const int nu)=0
constructs lower staple in mu-nu plane.
virtual void staple(Field_G &, const Field_G &, const int mu)=0
constructs staple in mu-direction (summing up nu-direction).
Staple()
Definition: staple.h:39
virtual double plaquette(const Field_G &)=0
calculates plaquette value.
Class for parameters.
Definition: parameters.h:46
SU(N) gauge field.
Definition: field_G.h:38
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: staple.h:53
Bridge::VerboseLevel m_vl
Definition: staple.h:36
Common parameter class: provides parameters as singleton.
Bridge::VerboseLevel vl
VerboseLevel
Definition: bridgeIO.h:42
virtual double plaq_t(const Field_G &)=0
calculates temporal plaquette value.
virtual double plaq_s(const Field_G &)=0
calculates spatial plaquette value.
std::string IdentifierType
Factory template class.
Definition: factory.h:39
Base class for Staple construction.
Definition: staple.h:33
virtual void set_parameters(const Parameters &params)=0
setting parameters.
virtual ~Staple()
Definition: staple.h:42