Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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:
49 
50  public:
52  Fopr_Smeared_eo(Fopr_eo *fopr_eo, Director_Smear *dr_smear) : Fopr_eo()
53  {
54  m_fopr_eo = fopr_eo;
55  m_dr_smear = dr_smear;
56  }
57 
59  {
60  m_fopr_eo = fopr_eo.get();
61  m_dr_smear = dr_smear.get();
62  }
63 
64  void set_parameters(const Parameters&);
65 
66  void preProp(Field& Be, Field& bo, const Field& b)
67  {
68  m_fopr_eo->preProp(Be, bo, b);
69  }
70 
71  void postProp(Field& x, const Field& xe, const Field& bo)
72  {
73  m_fopr_eo->postProp(x, xe, bo);
74  }
75 
77  void set_config(Field *U);
78 
80  {
81  set_config(U.get());
82  }
83 
85  void mult(Field& v, const Field& f)
86  {
87  m_fopr_eo->mult(v, f);
88  }
89 
91  void mult_dag(Field& v, const Field& f)
92  {
93  m_fopr_eo->mult_dag(v, f);
94  }
95 
97  void set_mode(const std::string mode)
98  {
99  m_fopr_eo->set_mode(mode);
100  }
101 
102  std::string get_mode() const
103  {
104  return m_fopr_eo->get_mode();
105  }
106 
107  void mult_up(const int mu, Field& v, const Field& w)
108  {
109  m_fopr_eo->mult_up(mu, v, w);
110  }
111 
112  void mult_dn(const int mu, Field& v, const Field& w)
113  {
114  m_fopr_eo->mult_dn(mu, v, w);
115  }
116 
117  int field_nvol() { return m_fopr_eo->field_nvol(); }
118  int field_nin() { return m_fopr_eo->field_nin(); }
119  int field_nex() { return m_fopr_eo->field_nex(); }
120 
121 #ifdef USE_FACTORY
122  private:
123  static Fopr *create_object(Fopr *fopr, Director *director)
124  {
125  return new Fopr_Smeared_eo(dynamic_cast<Fopr_eo *>(fopr), dynamic_cast<Director_Smear *>(director));
126  }
127 
128  public:
129  static bool register_factory()
130  {
131  return Fopr::Factory_fopr_director::Register("Smeared_eo", create_object);
132  }
133 #endif
134 };
135 #endif
BridgeIO vout
Definition: bridgeIO.cpp:503
void mult(Field &v, const Field &f)
multiply smeared fermion operator
virtual int field_nvol()=0
returns the volume for which the fermion operator is defined.
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
void mult_dn(const int mu, Field &v, const Field &w)
void set_parameters(const Parameters &)
virtual void postProp(Field &, const Field &, const Field &)=0
Container of Field-type object.
Definition: field.h:45
std::string get_mode() const
only for Fopr_Overlap
Definition: fopr_eo.h:61
void mult_up(const int mu, Field &v, const Field &w)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
Director_Smear * m_dr_smear
Class for parameters.
Definition: parameters.h:46
smeared fermion operator with even-odd preconditioning.
Fopr_Smeared_eo(unique_ptr< Fopr_eo > &fopr_eo, unique_ptr< Director_Smear > &dr_smear)
Fopr_eo * m_fopr_eo
Manager of commonly used data object in HMC.
Definition: director.h:37
pointer get() const
Base class of fermion operator family.
Definition: fopr_eo.h:34
void postProp(Field &x, const Field &xe, const Field &bo)
void set_config(Field *U)
set pointer to original thin link variable
virtual void mult_dn(const int mu, Field &, const Field &)
Definition: fopr.h:90
virtual void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: fopr_eo.h:56
virtual void mult_up(const int mu, Field &, const Field &)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
Definition: fopr.h:89
Fopr_Smeared_eo(Fopr_eo *fopr_eo, Director_Smear *dr_smear)
constructor requires Fopr and Director_Smear objects
virtual int field_nex()=0
returns the external d.o.f. for which the fermion operator is defined.
Manager of smeared configurations.
void mult_dag(Field &v, const Field &f)
multiply smeared fermion operator
void preProp(Field &Be, Field &bo, const Field &b)
int field_nvol()
returns the volume for which the fermion operator is defined.
virtual void preProp(Field &, Field &, const Field &)=0
virtual int field_nin()=0
returns the on-site d.o.f. for which the fermion operator is defined.
virtual void mult(Field &, const Field &)
multiplies fermion operator to a given field (2nd argument)
Definition: fopr_eo.h:49
virtual void mult_dag(Field &, const Field &)
hermitian conjugate of mult(Field&, const Field&).
Definition: fopr_eo.h:52
std::string get_mode() const
only for Fopr_Overlap
Base class of fermion operator family.
Definition: fopr.h:46
void set_config(unique_ptr< Field_G > &U)
void set_mode(const std::string mode)
set the mode of fermion operator
static const std::string class_name