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