Bridge++  Ver.2.1.3
aprojection.h
Go to the documentation of this file.
1 
10 #ifndef APROJECTION_INCLUDED
11 #define APROJECTION_INCLUDED
12 
13 #include "lib/Field/field_G.h"
15 
16 #ifdef USE_FACTORY
17 #include "lib/Tools/factory.h"
18 #endif
19 
21 
30 template<typename AFIELD>
32 {
33  public:
35  virtual ~AProjection() {}
36 
37  private:
38  // non-copyable
39  AProjection(const AProjection&);
41 
42  public:
44  virtual void project(Field_G& v,
45  const double alpha,
46  const Field_G& C, const Field_G& U) = 0;
47 
48  virtual void project(AFIELD& v,
49  const double alpha,
50  const AFIELD& C, const AFIELD& U)
51  { };
52 
54  virtual void force_recursive(Field_G& Xi, Field_G& iTheta,
55  const double alpha, const Field_G& Sigmap,
56  const Field_G& C, const Field_G& U) = 0;
57 
58  virtual void set_parameters(const Parameters& param) = 0;
59 
60  virtual void get_parameters(Parameters& param) const = 0;
61 
62 
63 #ifdef USE_FACTORY
64  public:
65  typedef AProjection *(*ProductCreator)();
66  typedef AProjection *(*ProductCreator_params)(const Parameters&);
67 
70 
71  static AProjection *New(const IdentifierType& subtype)
72  {
73  ProductCreator p = Factory::Find(subtype);
74  return p ? (*p)() : 0;
75  }
76 
77  static AProjection *New(const IdentifierType& subtype,
78  const Parameters& params)
79  {
80  ProductCreator_params p = Factory_params::Find(subtype);
81  return p ? (*p)(params) : 0;
82  }
83 
84 #ifdef USE_FACTORY_AUTOREGISTER
85 #else
86  static bool init_factory();
87 #endif
88 #endif
89 
90 };
91 #endif
field_G.h
factory.h
Parameters
Class for parameters.
Definition: parameters.h:46
AProjection::set_parameters
virtual void set_parameters(const Parameters &param)=0
AProjection::get_parameters
virtual void get_parameters(Parameters &param) const =0
AProjection::operator=
AProjection & operator=(const AProjection &)
AProjection::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
AProjection::project
virtual void project(AFIELD &v, const double alpha, const AFIELD &C, const AFIELD &U)
Definition: aprojection.h:48
AProjection::~AProjection
virtual ~AProjection()
Definition: aprojection.h:35
parameters.h
AProjection
Base template class for projection operator into gauge group.
Definition: aprojection.h:31
FactoryTemplate
Definition: factory.h:42
Field
Container of Field-type object.
Definition: field.h:46
Field_G
SU(N) gauge field.
Definition: field_G.h:38
AProjection::AProjection
AProjection()
Definition: aprojection.h:34
AProjection::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]
IdentifierType
std::string IdentifierType
Definition: factory.h:39