Bridge++  Ver. 2.0.2
smear.h
Go to the documentation of this file.
1 
14 #ifndef SMEAR_INCLUDED
15 #define SMEAR_INCLUDED
16 
17 #include "projection.h"
18 
19 #include "IO/bridgeIO.h"
20 
21 #ifdef USE_FACTORY
22 #include "Tools/factory.h"
23 #endif
24 
25 
27 
34 class Smear
35 {
36  public:
37  Smear() {}
38  virtual ~Smear() {}
39 
40  private:
41  Smear(const Smear&);
42  Smear& operator=(const Smear&);
43 
44  public:
45  virtual void smear(Field_G&, const Field_G&) = 0;
46 
47  virtual void set_parameters(const Parameters&) = 0;
48 
49  virtual void get_parameters(Parameters&) const = 0;
50 
51 #ifdef USE_FACTORY
52  public:
53  typedef Smear *(*ProductCreator)(Projection *);
54  typedef Smear *(*ProductCreator_params)(Projection *, const Parameters&);
55 
57  typedef FactoryTemplate<Smear, ProductCreator_params> Factory_params;
58 
59  static Smear *New(const IdentifierType& subtype, Projection *proj)
60  {
61  ProductCreator p = Factory::Find(subtype);
62  return p ? (*p)(proj) : 0;
63  }
64 
65  static Smear *New(const IdentifierType& subtype, Projection *proj, const Parameters& params)
66  {
67  ProductCreator_params p = Factory_params::Find(subtype);
68  return p ? (*p)(proj, params) : 0;
69  }
70 
71 #ifdef USE_FACTORY_AUTOREGISTER
72 #else
73  static bool init_factory();
74 #endif
75 #endif
76 };
77 #endif
bridgeIO.h
factory.h
Parameters
Class for parameters.
Definition: parameters.h:46
Smear
base class for smearing of link variables.
Definition: smear.h:34
Smear::operator=
Smear & operator=(const Smear &)
Smear::Smear
Smear()
Definition: smear.h:37
projection.h
Smear::smear
virtual void smear(Field_G &, const Field_G &)=0
Smear::set_parameters
virtual void set_parameters(const Parameters &)=0
Smear::get_parameters
virtual void get_parameters(Parameters &) const =0
Smear::~Smear
virtual ~Smear()
Definition: smear.h:38
FactoryTemplate
Definition: factory.h:42
Projection
base class for projection operator into gauge group.
Definition: projection.h:30
Field_G
SU(N) gauge field.
Definition: field_G.h:38
IdentifierType
std::string IdentifierType
Definition: factory.h:39