Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_Smeared.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_SMEARED_INCLUDED
15 #define FOPR_SMEARED_INCLUDED
16 
17 #include "fopr.h"
18 #include "Smear/director_Smear.h"
19 
20 #include "IO/bridgeIO.h"
21 using Bridge::vout;
22 
24 
41 class Fopr_Smeared : public Fopr
42 {
43  public:
44  static const std::string class_name;
45 
46  private:
49 
50  public:
52  Fopr_Smeared(Fopr *fopr, Director_Smear *dr_smear)
53  : Fopr(), m_fopr(fopr), m_dr_smear(dr_smear) {}
54 
56  : Fopr(), m_fopr(fopr.get()), m_dr_smear((Director_Smear *)dr_smear.get()) {}
57 
58 
59  void set_parameters(const Parameters&);
60 
62  void set_config(Field *U);
63 
65  {
66  set_config(U.get());
67  }
68 
70  void mult(Field& v, const Field& f)
71  {
72  m_fopr->mult(v, f);
73  }
74 
76  void mult_dag(Field& v, const Field& f)
77  {
78  m_fopr->mult_dag(v, f);
79  }
80 
82  void set_mode(const std::string mode)
83  {
84  m_fopr->set_mode(mode);
85  }
86 
87  std::string get_mode() const
88  {
89  return m_fopr->get_mode();
90  }
91 
92  void mult_up(const int mu, Field& v, const Field& w)
93  {
94  m_fopr->mult_up(mu, v, w);
95  }
96 
97  void mult_dn(const int mu, Field& v, const Field& w)
98  {
99  m_fopr->mult_dn(mu, v, w);
100  }
101 
102  int field_nvol() { return m_fopr->field_nvol(); }
103  int field_nin() { return m_fopr->field_nin(); }
104  int field_nex() { return m_fopr->field_nex(); }
105 
106 #ifdef USE_FACTORY
107  private:
108  static Fopr *create_object(Fopr *fopr, Director *director)
109  {
110  return new Fopr_Smeared(fopr, dynamic_cast<Director_Smear *>(director));
111  }
112 
113  public:
114  static bool register_factory()
115  {
116  return Fopr::Factory_fopr_director::Register("Smeared", create_object);
117  }
118 #endif
119 };
120 #endif
BridgeIO vout
Definition: bridgeIO.cpp:503
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
Definition: fopr_Smeared.h:104
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.h:94
Container of Field-type object.
Definition: field.h:45
void mult_dn(const int mu, Field &v, const Field &w)
Definition: fopr_Smeared.h:97
void set_mode(const std::string mode)
set the mode of fermion operator
Definition: fopr_Smeared.h:82
Class for parameters.
Definition: parameters.h:46
virtual int field_nin()=0
returns the on-site d.o.f. for which the fermion operator is defined.
smeared fermion operator.
Definition: fopr_Smeared.h:41
int field_nvol()
returns the volume for which the fermion operator is defined.
Definition: fopr_Smeared.h:102
Fopr * m_fopr
Definition: fopr_Smeared.h:47
Fopr_Smeared(unique_ptr< Fopr > &fopr, unique_ptr< Director > &dr_smear)
Definition: fopr_Smeared.h:55
void set_config(unique_ptr< Field_G > &U)
Definition: fopr_Smeared.h:64
Manager of commonly used data object in HMC.
Definition: director.h:37
virtual std::string get_mode() const
only for Fopr_Overlap
Definition: fopr.h:104
pointer get() const
virtual int field_nex()=0
returns the external d.o.f. for which the fermion operator is defined.
virtual void mult_dn(const int mu, Field &, const Field &)
Definition: fopr.h:90
Fopr_Smeared(Fopr *fopr, Director_Smear *dr_smear)
constructor requires Fopr and Director_Smear objects
Definition: fopr_Smeared.h:52
virtual void mult_up(const int mu, Field &, const Field &)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
Definition: fopr.h:89
void mult(Field &v, const Field &f)
multiply smeared fermion operator
Definition: fopr_Smeared.h:70
std::string get_mode() const
only for Fopr_Overlap
Definition: fopr_Smeared.h:87
Manager of smeared configurations.
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument)
void mult_up(const int mu, Field &v, const Field &w)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
Definition: fopr_Smeared.h:92
void set_parameters(const Parameters &)
virtual void mult_dag(Field &, const Field &)
hermitian conjugate of mult(Field&, const Field&).
Definition: fopr.h:73
Base class of fermion operator family.
Definition: fopr.h:46
void mult_dag(Field &v, const Field &f)
multiply smeared fermion operator
Definition: fopr_Smeared.h:76
virtual int field_nvol()=0
returns the volume for which the fermion operator is defined.
Director_Smear * m_dr_smear
Definition: fopr_Smeared.h:48
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
Definition: fopr_Smeared.h:103
void set_config(Field *U)
set pointer to original thin link variable
static const std::string class_name
Definition: fopr_Smeared.h:44