Bridge++  Ver. 2.0.2
gaugeFixing.h
Go to the documentation of this file.
1 
14 #ifndef GAUGEFIXING_INCLUDED
15 #define GAUGEFIXING_INCLUDED
16 
17 #include "Field/field_G.h"
18 #include "Parameters/parameters.h"
19 #include "IO/bridgeIO.h"
20 
21 #ifdef USE_FACTORY
22 #include "Tools/factory.h"
23 #endif
24 
26 
27 /*
28  This class fixes a gauge of the configuration
29  [10 Oct 2012 Y.Namekawa]
30  unique_ptr is introduced to avoid memory leaks
31  [21 Mar 2015 Y.Namekawa]
32  Staple and RandomNumbers are moved into gaugeFixing
33  [30 Mar 2016 Y.Namekawa]
34  */
35 
37 {
38  public:
40 
41  virtual ~GaugeFixing() {}
42 
43  private:
44  // non-copyable
45  GaugeFixing(const GaugeFixing&);
47 
48  public:
49  virtual void set_parameters(const Parameters& params) = 0;
50  virtual void get_parameters(Parameters& params) const = 0;
51 
52  virtual void fix(Field_G& Ufix, const Field_G& Uorg) = 0;
53 
54 
55 #ifdef USE_FACTORY
56  public:
57  typedef GaugeFixing *(*ProductCreator)();
58  typedef GaugeFixing *(*ProductCreator_params)(const Parameters&);
59 
62 
63  static GaugeFixing *New(const IdentifierType& subtype)
64  {
65  ProductCreator p = Factory::Find(subtype);
66  return p ? (*p)() : 0;
67  }
68 
69  static GaugeFixing *New(const IdentifierType& subtype, const Parameters& params)
70  {
71  ProductCreator_params p = Factory_params::Find(subtype);
72  return p ? (*p)(params) : 0;
73  }
74 
75 #ifdef USE_FACTORY_AUTOREGISTER
76 #else
77  static bool init_factory();
78 #endif
79 #endif
80 };
81 #endif
bridgeIO.h
GaugeFixing::set_parameters
virtual void set_parameters(const Parameters &params)=0
field_G.h
factory.h
GaugeFixing::~GaugeFixing
virtual ~GaugeFixing()
Definition: gaugeFixing.h:41
Parameters
Class for parameters.
Definition: parameters.h:46
GaugeFixing
gauge fixing.
Definition: gaugeFixing.h:36
GaugeFixing::get_parameters
virtual void get_parameters(Parameters &params) const =0
GaugeFixing::GaugeFixing
GaugeFixing()
Definition: gaugeFixing.h:39
parameters.h
FactoryTemplate
Definition: factory.h:42
GaugeFixing::operator=
GaugeFixing & operator=(const GaugeFixing &)
Field_G
SU(N) gauge field.
Definition: field_G.h:38
GaugeFixing::fix
virtual void fix(Field_G &Ufix, const Field_G &Uorg)=0
IdentifierType
std::string IdentifierType
Definition: factory.h:39