Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  protected:
38 
39  public:
41  : m_vl(CommonParameters::Vlevel()) {}
42 
43  virtual ~Smear() {}
44 
45  private:
46  Smear(const Smear&);
47  Smear& operator=(const Smear&);
48 
49  public:
50  virtual void smear(Field_G&, const Field_G&) = 0;
51 
52  virtual void set_parameters(const Parameters&) = 0;
53 
55 
56 #ifdef USE_FACTORY
57  public:
58  typedef Smear *(*ProductCreator)(Projection *);
60 
61  static Smear *New(const IdentifierType& subtype, Projection *proj)
62  {
63  ProductCreator p = Factory::Find(subtype);
64 
65  return p ? (*p)(proj) : 0;
66  }
67 
68  static Smear *New(const IdentifierType& subtype, unique_ptr<Projection>& proj)
69  {
70  ProductCreator p = Factory::Find(subtype);
71 
72  return p ? (*p)(proj.get()) : 0;
73  }
74 
75 #ifdef USE_FACTORY_AUTOREGISTER
76 #else
77  static bool init_factory();
78 #endif
79 #endif
80 };
81 #endif
Smear & operator=(const Smear &)
virtual void set_parameters(const Parameters &)=0
Class for parameters.
Definition: parameters.h:46
Smear()
Definition: smear.h:40
SU(N) gauge field.
Definition: field_G.h:38
pointer get() const
Common parameter class: provides parameters as singleton.
virtual void smear(Field_G &, const Field_G &)=0
base class for projection operator into gauge group.
Definition: projection.h:30
virtual ~Smear()
Definition: smear.h:43
Bridge::VerboseLevel vl
VerboseLevel
Definition: bridgeIO.h:42
base class for smearing of link variables.
Definition: smear.h:34
std::string IdentifierType
Factory template class.
Definition: factory.h:39
Bridge::VerboseLevel m_vl
Definition: smear.h:37
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: smear.h:54