Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr.h
Go to the documentation of this file.
1 
15 #ifndef FOPR_INCLUDED
16 #define FOPR_INCLUDED
17 
18 #include "parameters.h"
19 #include "commonParameters.h"
20 #include "communicator.h"
21 #include "field.h"
22 
23 #include "bridgeIO.h"
24 using Bridge::vout;
25 
27 
39 class Fopr
40 {
41  public:
42 
43  Fopr()
44  : m_vl(CommonParameters::Vlevel()) {}
45 
46  virtual ~Fopr() {}
47 
48  virtual void set_parameters(const Parameters&) = 0;
49 
51 
53  virtual void set_config(Field *) = 0;
54 
57  virtual const Field mult(const Field&) = 0;
58 
60  virtual const Field mult_dag(const Field&) { return Field(); }
61 
63  // and set the resultant field to the 1st argument.
64  virtual void mult(Field&, const Field&) {}
65 
67  virtual void mult_dag(Field&, const Field&) {}
68 
70  virtual void mult_up(int mu, Field&, const Field&) {}
71  virtual void mult_dn(int mu, Field&, const Field&) {}
72 
75  virtual void set_mode(std::string mode)
76  {
77  vout.general(m_vl, "Fopr: set_mode not implemented.\n");
78  }
79 
80  virtual std::string get_mode() const
81  {
82  vout.general(m_vl, "Fopr: get_mode not implemented.\n");
83  return std::string();
84  }
85 
87  virtual int field_nvol() = 0;
88 
90  virtual int field_nin() = 0;
91 
93  virtual int field_nex() = 0;
94 
96  virtual double flop_count() { return 0.0; }
97 
98  protected:
100 };
101 #endif
BridgeIO vout
Definition: bridgeIO.cpp:207
virtual const Field mult_dag(const Field &)
hermitian conjugate of mult(const Field&).
Definition: fopr.h:60
virtual const Field mult(const Field &)=0
multiplies fermion operator to a given field and returns the resultant field.
void general(const char *format,...)
Definition: bridgeIO.cpp:38
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Container of Field-type object.
Definition: field.h:37
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: fopr.h:50
Class for parameters.
Definition: parameters.h:40
virtual void mult_dn(int mu, Field &, const Field &)
Definition: fopr.h:71
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.h:64
Fopr()
Definition: fopr.h:43
Bridge::VerboseLevel m_vl
Definition: fopr.h:99
virtual double flop_count()
returns the flops per site.
Definition: fopr.h:96
virtual std::string get_mode() const
Definition: fopr.h:80
virtual int field_nex()=0
returns the external d.o.f. for which the fermion operator is defined.
Common parameter class: provides parameters as singleton.
virtual void set_parameters(const Parameters &)=0
virtual void mult_up(int mu, Field &, const Field &)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
Definition: fopr.h:70
virtual ~Fopr()
Definition: fopr.h:46
Bridge::VerboseLevel vl
Definition: checker.cpp:18
VerboseLevel
Definition: bridgeIO.h:25
virtual void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: fopr.h:75
virtual void mult_dag(Field &, const Field &)
hermitian conjugate of mult(Field&, const Field&).
Definition: fopr.h:67
Base class of fermion operator family.
Definition: fopr.h:39
virtual int field_nvol()=0
returns the volume for which the fermion operator is defined.