Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  : m_vl(CommonParameters::Vlevel()) {}
41 
42  virtual ~GaugeFixing() {}
43 
44  private:
45  // non-copyable
46  GaugeFixing(const GaugeFixing&);
48 
49  public:
50  virtual void set_parameters(const Parameters& params) = 0;
51 
53 
54  virtual void fix(Field_G& Ufix, const Field_G& Uorg) = 0;
55 
56  protected:
58 
59 
60 #ifdef USE_FACTORY
61  public:
62  typedef GaugeFixing *(*ProductCreator)();
64 
65  static GaugeFixing *New(const IdentifierType& subtype)
66  {
67  ProductCreator p = Factory::Find(subtype);
68 
69  return p ? (*p)() : 0;
70  }
71 
72 #ifdef USE_FACTORY_AUTOREGISTER
73 #else
74  static bool init_factory();
75 #endif
76 #endif
77 };
78 #endif
virtual ~GaugeFixing()
Definition: gaugeFixing.h:42
Class for parameters.
Definition: parameters.h:46
SU(N) gauge field.
Definition: field_G.h:38
Common parameter class: provides parameters as singleton.
Bridge::VerboseLevel m_vl
Definition: gaugeFixing.h:57
Bridge::VerboseLevel vl
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: gaugeFixing.h:52
VerboseLevel
Definition: bridgeIO.h:42
std::string IdentifierType
Factory template class.
Definition: factory.h:39
GaugeFixing & operator=(const GaugeFixing &)
gauge fixing.
Definition: gaugeFixing.h:36
virtual void fix(Field_G &Ufix, const Field_G &Uorg)=0
virtual void set_parameters(const Parameters &params)=0