Bridge++  Ver. 2.0.2
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  public:
36  Staple() {}
37  virtual ~Staple() {}
38 
39  private:
40  // non-copyable
41  Staple(const Staple&);
42  Staple& operator=(const Staple&);
43 
44  public:
46  virtual void set_parameters(const Parameters& params) = 0;
47 
49  virtual void get_parameters(Parameters& params) const = 0;
50 
52  virtual void upper(Field_G&, const Field_G&, const int mu, const int nu) = 0;
53 
55  virtual void lower(Field_G&, const Field_G&, const int mu, const int nu) = 0;
56 
58  virtual void staple(Field_G&, const Field_G&, const int mu) = 0;
59 
61  virtual double plaquette(const Field_G&) = 0;
62 
64  virtual double plaq_s(const Field_G&) = 0;
65 
67  virtual double plaq_t(const Field_G&) = 0;
68 
69 #ifdef USE_FACTORY
70  public:
71  typedef Staple *(*ProductCreator)();
73 
74  static Staple *New(const IdentifierType& subtype)
75  {
76  ProductCreator p = Factory::Find(subtype);
77 
78  return p ? (*p)() : 0;
79  }
80 
81 #ifdef USE_FACTORY_AUTOREGISTER
82 #else
83  static bool init_factory();
84 #endif
85 #endif
86 };
87 #endif
bridgeIO.h
field_G.h
factory.h
Parameters
Class for parameters.
Definition: parameters.h:46
Staple::lower
virtual void lower(Field_G &, const Field_G &, const int mu, const int nu)=0
constructs lower staple in mu-nu plane.
Staple::get_parameters
virtual void get_parameters(Parameters &params) const =0
getting parameters.
Staple::set_parameters
virtual void set_parameters(const Parameters &params)=0
setting parameters.
Staple::plaq_t
virtual double plaq_t(const Field_G &)=0
calculates temporal plaquette value.
Staple::upper
virtual void upper(Field_G &, const Field_G &, const int mu, const int nu)=0
constructs upper staple in mu-nu plane.
parameters.h
Staple::plaq_s
virtual double plaq_s(const Field_G &)=0
calculates spatial plaquette value.
Staple::staple
virtual void staple(Field_G &, const Field_G &, const int mu)=0
constructs staple in mu-direction (summing up nu-direction).
FactoryTemplate
Definition: factory.h:42
Staple::~Staple
virtual ~Staple()
Definition: staple.h:37
Staple::Staple
Staple()
Definition: staple.h:36
Staple::plaquette
virtual double plaquette(const Field_G &)=0
calculates plaquette value.
Staple::operator=
Staple & operator=(const Staple &)
Staple
Base class for Staple construction.
Definition: staple.h:33
Field_G
SU(N) gauge field.
Definition: field_G.h:38
IdentifierType
std::string IdentifierType
Definition: factory.h:39