Bridge++  Ver. 2.0.2
projection.h
Go to the documentation of this file.
1 
14 #ifndef PROJECTION_INCLUDED
15 #define PROJECTION_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 {
32  public:
34  virtual ~Projection() {}
35 
36  private:
37  // non-copyable
38  Projection(const Projection&);
40 
41  public:
43  virtual void project(Field_G& v,
44  const double alpha,
45  const Field_G& C, const Field_G& U) = 0;
46 
48  virtual void force_recursive(Field_G& Xi, Field_G& iTheta,
49  const double alpha, const Field_G& Sigmap,
50  const Field_G& C, const Field_G& U) = 0;
51 
52  virtual void set_parameters(const Parameters& param) = 0;
53 
54  virtual void get_parameters(Parameters& param) const = 0;
55 
56 
57 #ifdef USE_FACTORY
58  public:
59  typedef Projection *(*ProductCreator)();
60  typedef Projection *(*ProductCreator_params)(const Parameters&);
61 
64 
65  static Projection *New(const IdentifierType& subtype)
66  {
67  ProductCreator p = Factory::Find(subtype);
68  return p ? (*p)() : 0;
69  }
70 
71  static Projection *New(const IdentifierType& subtype, const Parameters& params)
72  {
73  ProductCreator_params p = Factory_params::Find(subtype);
74  return p ? (*p)(params) : 0;
75  }
76 
77 #ifdef USE_FACTORY_AUTOREGISTER
78 #else
79  static bool init_factory();
80 #endif
81 #endif
82 };
83 #endif
field_G.h
Projection::operator=
Projection & operator=(const Projection &)
factory.h
Parameters
Class for parameters.
Definition: parameters.h:46
Projection::~Projection
virtual ~Projection()
Definition: projection.h:34
Projection::get_parameters
virtual void get_parameters(Parameters &param) const =0
Projection::set_parameters
virtual void set_parameters(const Parameters &param)=0
parameters.h
FactoryTemplate
Definition: factory.h:42
Projection::force_recursive
virtual void force_recursive(Field_G &Xi, Field_G &iTheta, const double alpha, const Field_G &Sigmap, const Field_G &C, const Field_G &U)=0
determination of fields for force calculation
Projection::Projection
Projection()
Definition: projection.h:33
Projection
base class for projection operator into gauge group.
Definition: projection.h:30
Field_G
SU(N) gauge field.
Definition: field_G.h:38
IdentifierType
std::string IdentifierType
Definition: factory.h:39
Projection::project
virtual void project(Field_G &v, const double alpha, const Field_G &C, const Field_G &U)=0
projection V = P[alpha, C, U]