Bridge++  Ver. 2.0.2
fopr_Smeared_eo.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_SMEARED_EO_INCLUDED
15 #define FOPR_SMEARED_EO_INCLUDED
16 
17 #include "fopr_eo.h"
18 #include "Smear/director_Smear.h"
19 
20 #include "IO/bridgeIO.h"
21 using Bridge::vout;
22 
24 
41 class Fopr_Smeared_eo : public Fopr_eo
42 {
43  public:
44  static const std::string class_name;
45 
46  private:
48 
51 
52  public:
54  Fopr_Smeared_eo(Fopr_eo *fopr_eo, Director_Smear *dr_smear)
55  : m_vl(CommonParameters::Vlevel())
56  {
57  m_fopr_eo = fopr_eo;
58  m_dr_smear = dr_smear;
59  }
60 
61  Fopr_Smeared_eo(Fopr_eo *fopr_eo, Director_Smear *dr_smear, const Parameters& params)
62  : m_vl(CommonParameters::Vlevel())
63  {
64  m_fopr_eo = fopr_eo;
65  m_dr_smear = dr_smear;
66 
67  set_parameters(params);
68  }
69 
70  void set_parameters(const Parameters&);
71 
72  void get_parameters(Parameters&) const;
73 
74  void preProp(Field& Be, Field& bo, const Field& b)
75  {
76  m_fopr_eo->preProp(Be, bo, b);
77  }
78 
79  void postProp(Field& x, const Field& xe, const Field& bo)
80  {
81  m_fopr_eo->postProp(x, xe, bo);
82  }
83 
85  void set_config(Field *U);
86 
88  void mult(Field& v, const Field& f)
89  {
90  m_fopr_eo->mult(v, f);
91  }
92 
94  void mult_dag(Field& v, const Field& f)
95  {
96  m_fopr_eo->mult_dag(v, f);
97  }
98 
100  void set_mode(const std::string mode)
101  {
102  m_fopr_eo->set_mode(mode);
103  }
104 
105  std::string get_mode() const
106  {
107  return m_fopr_eo->get_mode();
108  }
109 
110  void mult_up(const int mu, Field& v, const Field& w)
111  {
112  m_fopr_eo->mult_up(mu, v, w);
113  }
114 
115  void mult_dn(const int mu, Field& v, const Field& w)
116  {
117  m_fopr_eo->mult_dn(mu, v, w);
118  }
119 
120  int field_nvol() { return m_fopr_eo->field_nvol(); }
121  int field_nin() { return m_fopr_eo->field_nin(); }
122  int field_nex() { return m_fopr_eo->field_nex(); }
123 
125  double flop_count();
126 
127 #ifdef USE_FACTORY
128  private:
129  static Fopr *create_object(Fopr *fopr, Director *director)
130  {
131  return new Fopr_Smeared_eo(dynamic_cast<Fopr_eo *>(fopr), dynamic_cast<Director_Smear *>(director));
132  }
133 
134  static Fopr *create_object_with_params(Fopr *fopr, Director *director, const Parameters& params)
135  {
136  return new Fopr_Smeared_eo(dynamic_cast<Fopr_eo *>(fopr), dynamic_cast<Director_Smear *>(director), params);
137  }
138 
139  public:
140  static bool register_factory()
141  {
142  bool init = true;
143  init &= Fopr::Factory_fopr_director::Register("Smeared_eo", create_object);
144 // init &= Fopr::Factory_fopr_director_params::Register("Smeared_eo", create_object_with_params);
145  return init;
146  }
147 #endif
148 };
149 #endif
Fopr_Smeared_eo::mult_dn
void mult_dn(const int mu, Field &v, const Field &w)
downward nearest neighbor hopping term.
Definition: fopr_Smeared_eo.h:115
director_Smear.h
Fopr_Smeared_eo::mult
void mult(Field &v, const Field &f)
multiply smeared fermion operator
Definition: fopr_Smeared_eo.h:88
bridgeIO.h
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
AFopr< Field >
Parameters
Class for parameters.
Definition: parameters.h:46
Fopr_Smeared_eo::field_nin
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
Definition: fopr_Smeared_eo.h:121
AFopr_eo< Field >
Fopr_Smeared_eo
smeared fermion operator with even-odd preconditioning.
Definition: fopr_Smeared_eo.h:41
Fopr_Smeared_eo::m_fopr_eo
Fopr_eo * m_fopr_eo
Definition: fopr_Smeared_eo.h:49
Fopr_Smeared_eo::mult_up
void mult_up(const int mu, Field &v, const Field &w)
upward nearest neighbor hopping term.
Definition: fopr_Smeared_eo.h:110
Fopr_Smeared_eo::get_parameters
void get_parameters(Parameters &) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Smeared_eo.cpp:35
Fopr_Smeared_eo::field_nex
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
Definition: fopr_Smeared_eo.h:122
Fopr_Smeared_eo::flop_count
double flop_count()
this returns the number of floating point operations.
Definition: fopr_Smeared_eo.cpp:57
AFopr_eo::mult_dag
virtual void mult_dag(AFIELD &, const AFIELD &)
hermitian conjugate of mult(Field&, const Field&).
Definition: afopr_eo.h:55
Fopr_Smeared_eo::m_dr_smear
Director_Smear * m_dr_smear
Definition: fopr_Smeared_eo.h:50
AFopr_eo::set_mode
virtual void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: afopr_eo.h:63
fopr_eo.h
Fopr_Smeared_eo::postProp
void postProp(Field &x, const Field &xe, const Field &bo)
Definition: fopr_Smeared_eo.h:79
AFopr_eo::preProp
virtual void preProp(AFIELD &, AFIELD &, const AFIELD &)=0
AFopr_eo::field_nin
virtual int field_nin()=0
returns the on-site d.o.f. for which the fermion operator is defined.
Fopr_Smeared_eo::mult_dag
void mult_dag(Field &v, const Field &f)
multiply smeared fermion operator
Definition: fopr_Smeared_eo.h:94
Fopr_Smeared_eo::Fopr_Smeared_eo
Fopr_Smeared_eo(Fopr_eo *fopr_eo, Director_Smear *dr_smear)
constructor requires Fopr and Director_Smear objects
Definition: fopr_Smeared_eo.h:54
Director_Smear
Manager of smeared configurations.
Definition: director_Smear.h:39
Fopr_Smeared_eo::m_vl
Bridge::VerboseLevel m_vl
Definition: fopr_Smeared_eo.h:47
AFopr_eo::get_mode
std::string get_mode() const
returns the current mult mode.
Definition: afopr_eo.h:68
Fopr_Smeared_eo::set_config
void set_config(Field *U)
set pointer to original thin link variable
Definition: fopr_Smeared_eo.cpp:42
Fopr_Smeared_eo::preProp
void preProp(Field &Be, Field &bo, const Field &b)
Definition: fopr_Smeared_eo.h:74
Fopr_Smeared_eo::get_mode
std::string get_mode() const
Definition: fopr_Smeared_eo.h:105
AFopr_eo::field_nvol
virtual int field_nvol()=0
returns the volume for which the fermion operator is defined.
AFopr_eo::postProp
virtual void postProp(AFIELD &, const AFIELD &, const AFIELD &)=0
AFopr::mult_dn
virtual void mult_dn(int mu, AFIELD &, const AFIELD &)
downward nearest neighbor hopping term.
Definition: afopr.h:137
Fopr_Smeared_eo::class_name
static const std::string class_name
Definition: fopr_Smeared_eo.h:44
Fopr_Smeared_eo::Fopr_Smeared_eo
Fopr_Smeared_eo(Fopr_eo *fopr_eo, Director_Smear *dr_smear, const Parameters &params)
Definition: fopr_Smeared_eo.h:61
Fopr_Smeared_eo::field_nvol
int field_nvol()
returns the volume for which the fermion operator is defined.
Definition: fopr_Smeared_eo.h:120
Director
Manager of commonly used data object in HMC.
Definition: director.h:37
Fopr_Smeared_eo::set_mode
void set_mode(const std::string mode)
set the mode of fermion operator
Definition: fopr_Smeared_eo.h:100
Field
Container of Field-type object.
Definition: field.h:46
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
AFopr_eo::mult
virtual void mult(AFIELD &, const AFIELD &)
multiplies fermion operator to a given field (2nd argument)
Definition: afopr_eo.h:52
Fopr_Smeared_eo::set_parameters
void set_parameters(const Parameters &)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Smeared_eo.cpp:25
AFopr_eo::field_nex
virtual int field_nex()=0
returns the external d.o.f. for which the fermion operator is defined.
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
AFopr::mult_up
virtual void mult_up(int mu, AFIELD &, const AFIELD &)
upward nearest neighbor hopping term.
Definition: afopr.h:130