Bridge++  Ver. 2.0.2
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 get_parameters(Parameters&) const = 0;
54 
55  virtual void force_udiv(Field_G&, const Field_G&, const Field_G&) {}
56 
57  protected:
59 
60 
61 #ifdef USE_FACTORY
62  public:
63  typedef ForceSmear *(*ProductCreator)(Projection *);
64  typedef ForceSmear *(*ProductCreator_params)(Projection *, const Parameters& params);
65 
68 
69  static ForceSmear *New(const IdentifierType& subtype, Projection *proj)
70  {
71  ProductCreator p = Factory::Find(subtype);
72  return p ? (*p)(proj) : 0;
73  }
74 
75  static ForceSmear *New(const IdentifierType& subtype, Projection *proj, const Parameters& params)
76  {
77  ProductCreator_params p = Factory_params::Find(subtype);
78  return p ? (*p)(proj, params) : 0;
79  }
80 
81 #ifdef USE_FACTORY_AUTOREGISTER
82 #else
83  static bool init_factory();
84 #endif
85 #endif
86 };
87 #endif
bridgeIO.h
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
factory.h
Parameters
Class for parameters.
Definition: parameters.h:46
ForceSmear::get_parameters
virtual void get_parameters(Parameters &) const =0
ForceSmear::set_parameters
virtual void set_parameters(const Parameters &)=0
projection.h
ParameterCheck::vl
Bridge::VerboseLevel vl
Definition: parameterCheck.cpp:18
ForceSmear::ForceSmear
ForceSmear()
Definition: forceSmear.h:38
FactoryTemplate
Definition: factory.h:42
ForceSmear::operator=
ForceSmear & operator=(const ForceSmear &)
ForceSmear::~ForceSmear
virtual ~ForceSmear()
Definition: forceSmear.h:41
ForceSmear::m_vl
Bridge::VerboseLevel m_vl
Definition: forceSmear.h:58
Projection
base class for projection operator into gauge group.
Definition: projection.h:30
ForceSmear::force_udiv
virtual void force_udiv(Field_G &, const Field_G &, const Field_G &)
Definition: forceSmear.h:55
ForceSmear::set_parameter_verboselevel
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: forceSmear.h:51
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
ForceSmear
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
IdentifierType
std::string IdentifierType
Definition: factory.h:39