Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
force_G.h
Go to the documentation of this file.
1 
14 #ifndef FORCE_G_INCLUDED
15 #define FORCE_G_INCLUDED
16 
17 #include "Field/field_G.h"
18 #include "Parameters/parameters.h"
19 
20 #ifdef USE_FACTORY
21 #include "Tools/factory.h"
22 #endif
23 
25 
31 class Force_G
32 {
33  protected:
36 
37  public:
39  : m_U(0),
40  m_vl(CommonParameters::Vlevel()) {}
41 
42  virtual ~Force_G() {}
43 
44  private:
45  // non-copyable
46  Force_G(const Force_G&);
47  Force_G& operator=(const Force_G&);
48 
49  public:
50  virtual void set_parameters(const Parameters&) = 0;
51 
53  {
54  m_vl = vl;
55  }
56 
57  void set_config(Field *U)
58  {
59  m_U = (Field_G *)U;
60  }
61 
63  {
64  m_U = U;
65  }
66 
67  virtual void force_core(Field&) = 0;
68 
69  virtual void force_core(Field& v, Field *U)
70  {
71  set_config(U);
72  force_core(v);
73  }
74 
75  virtual void force_core(Field& v, Field_G *U)
76  {
77  set_config(U);
78  force_core(v);
79  }
80 
81 #ifdef USE_FACTORY
82  public:
83  typedef Force_G *(*ProductCreator)();
85 
86  static Force_G *New(const IdentifierType& subtype)
87  {
88  ProductCreator p = Factory::Find(subtype);
89 
90  return p ? (*p)() : 0;
91  }
92 
93 #ifdef USE_FACTORY_AUTOREGISTER
94 #else
95  static bool init_factory();
96 #endif
97 #endif
98 };
99 #endif
virtual void force_core(Field &v, Field_G *U)
Definition: force_G.h:75
Force_G()
Definition: force_G.h:38
Field_G * m_U
Definition: force_G.h:34
Container of Field-type object.
Definition: field.h:45
void set_config(Field_G *U)
Definition: force_G.h:62
Class for parameters.
Definition: parameters.h:46
virtual void force_core(Field &)=0
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: force_G.h:52
SU(N) gauge field.
Definition: field_G.h:38
Base class of gauge force calculation.
Definition: force_G.h:31
virtual ~Force_G()
Definition: force_G.h:42
Bridge::VerboseLevel m_vl
Definition: force_G.h:35
Common parameter class: provides parameters as singleton.
Bridge::VerboseLevel vl
VerboseLevel
Definition: bridgeIO.h:42
std::string IdentifierType
Factory template class.
Definition: factory.h:39
void set_config(Field *U)
Definition: force_G.h:57
virtual void force_core(Field &v, Field *U)
Definition: force_G.h:69
virtual void set_parameters(const Parameters &)=0
Force_G & operator=(const Force_G &)