Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
projection.h
Go to the documentation of this file.
1 
15 #ifndef PROJECTION_INCLUDED
16 #define PROJECTION_INCLUDED
17 
18 #include "defs.h"
19 #include "parameters.h"
20 #include "commonParameters.h"
21 #include "field_G.h"
22 
23 #ifdef USE_FACTORY
24 #include "factory.h"
25 #endif
26 
28 
34 {
35  protected:
37 
38  public:
40  : m_vl(CommonParameters::Vlevel()) {}
41 
42  virtual ~Projection() {}
43 
45  virtual void project(Field_G& v,
46  double alpha,
47  const Field_G& C, const Field_G& U) = 0;
48 
50  virtual void force_recursive(Field_G& Xi, Field_G& iTheta,
51  double alpha, const Field_G& Sigmap,
52  const Field_G& C, const Field_G& U) = 0;
53 
54  virtual void set_parameters(const Parameters& param) = 0;
55 
57 
58 
59 #ifdef USE_FACTORY
60  public:
61  typedef Projection *(*ProductCreator)();
63 
64  static Projection *New(const IdentifierType& subtype)
65  {
66  ProductCreator p = Factory::Find(subtype);
67 
68  return p ? (*p)() : 0;
69  }
70 #endif
71 };
72 #endif