Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
forceSmear.h
Go to the documentation of this file.
1 
14 #ifndef FORCESMEAR_INCLUDED
15 #define FORCESMEAR_INCLUDED
16 
17 #include "Smear/projection.h"
18 
19 #include "IO/bridgeIO.h"
20 
21 #ifdef USE_FACTORY
22 #include "Tools/factory.h"
23 #endif
24 
25 
27 
35 {
36  public:
37 
39  : m_vl(CommonParameters::Vlevel()) {}
40 
41  virtual ~ForceSmear() {}
42 
43  private:
44  // non-copyable
45  ForceSmear(const ForceSmear&);
47 
48  public:
49  virtual void set_parameters(const Parameters&) = 0;
50 
52 
53  virtual void force_udiv(Field_G&, const Field_G&, const Field_G&) {}
54 
55  protected:
57 
58 
59 #ifdef USE_FACTORY
60  public:
61  typedef ForceSmear *(*ProductCreator)(Projection *);
63 
64  static ForceSmear *New(const IdentifierType& subtype, Projection *proj)
65  {
66  ProductCreator p = Factory::Find(subtype);
67 
68  return p ? (*p)(proj) : 0;
69  }
70 
71  static ForceSmear *New(const IdentifierType& subtype, unique_ptr<Projection>& proj)
72  {
73  ProductCreator p = Factory::Find(subtype);
74 
75  return p ? (*p)(proj.get()) : 0;
76  }
77 
78 #ifdef USE_FACTORY_AUTOREGISTER
79 #else
80  static bool init_factory();
81 #endif
82 #endif
83 };
84 #endif
Bridge::VerboseLevel m_vl
Definition: forceSmear.h:56
virtual ~ForceSmear()
Definition: forceSmear.h:41
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: forceSmear.h:51
Class for parameters.
Definition: parameters.h:46
ForceSmear & operator=(const ForceSmear &)
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
SU(N) gauge field.
Definition: field_G.h:38
virtual void force_udiv(Field_G &, const Field_G &, const Field_G &)
Definition: forceSmear.h:53
pointer get() const
Common parameter class: provides parameters as singleton.
base class for projection operator into gauge group.
Definition: projection.h:30
Bridge::VerboseLevel vl
VerboseLevel
Definition: bridgeIO.h:42
std::string IdentifierType
Factory template class.
Definition: factory.h:39
virtual void set_parameters(const Parameters &)=0