Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_Chebyshev.h
Go to the documentation of this file.
1 
15 #ifndef FOPR_CHEBYSHEV_INCLUDED
16 #define FOPR_CHEBYSHEV_INCLUDED
17 
18 #include "fopr.h"
19 #include "Field/field_F.h"
20 #include "Field/index_lex.h"
21 
22 #include "IO/bridgeIO.h"
23 using Bridge::vout;
24 
26 
42 class Fopr_Chebyshev : public Fopr
43 {
44  public:
45  static const std::string class_name;
46 
47  private:
48  int m_Npcb;
49  double m_Fcb1, m_Fcb2;
51 
52  public:
54  : Fopr(), m_fopr(fopr) {}
55 
57  : Fopr(), m_fopr(fopr.get()) {}
58 
59  void set_parameters(const Parameters& params);
60  void set_parameters(const int Np, const double v_thrs, const double v_max);
61 
62  void set_config(Field *U)
63  {
64  m_fopr->set_config(U);
65  }
66 
68  {
69  m_fopr->set_config(U.get());
70  }
71 
72  void mult(Field& v, const Field& f);
73 
74  void mult_dag(Field& v, const Field& f)
75  {
76  mult(v, f);
77  }
78 
80  double mult(const double);
81 
82  int field_nvol() { return m_fopr->field_nvol(); }
83  int field_nin() { return m_fopr->field_nin(); }
84  int field_nex() { return m_fopr->field_nex(); }
85 
86 #ifdef USE_FACTORY
87  private:
88  static Fopr *create_object(Fopr *fopr)
89  {
90  return new Fopr_Chebyshev(fopr);
91  }
92 
93  public:
94  static bool register_factory()
95  {
96  return Fopr::Factory_fopr::Register("Chevyshev", create_object);
97  }
98 #endif
99 };
100 #endif
BridgeIO vout
Definition: bridgeIO.cpp:503
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Container of Field-type object.
Definition: field.h:45
Fopr_Chebyshev(Fopr *fopr)
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult(Field&, const Field&).
Class for parameters.
Definition: parameters.h:46
int field_nvol()
returns the volume for which the fermion operator is defined.
virtual int field_nin()=0
returns the on-site d.o.f. for which the fermion operator is defined.
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field (2nd argument)
pointer get() const
virtual int field_nex()=0
returns the external d.o.f. for which the fermion operator is defined.
void set_config(Field *U)
setting pointer to the gauge configuration.
Chebyshev polynomial of fermion operator.
void set_config(unique_ptr< Field_G > &U)
void set_parameters(const Parameters &params)
static const std::string class_name
Fopr_Chebyshev(unique_ptr< Fopr > &fopr)
Base class of fermion operator family.
Definition: fopr.h:46
virtual int field_nvol()=0
returns the volume for which the fermion operator is defined.