Bridge++  Ver. 1.3.x
fopr_Clover_General.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_CLOVER_GENERAL_INCLUDED
15 #define FOPR_CLOVER_GENERAL_INCLUDED
16 
17 #include "fopr_Wilson_General.h"
19 
20 #ifdef USE_PARAMETERS_FACTORY
21 #include "parameters_factory.h"
22 #endif
23 
24 #include "bridgeIO.h"
25 using Bridge::vout;
26 
28 
41 //- parameters class
43 {
44  public:
46 };
47 //- end
48 
49 class Fopr_Clover_General : public Fopr
50 {
51  public:
52  static const std::string class_name;
53 
54  private:
55  double m_kappa_s;
56  double m_kappa_t;
57  double m_nu_s;
58  double m_r_s;
59  double m_cSW_s;
60  double m_cSW_t;
61  std::vector<int> m_boundary;
62  std::string m_repr;
63  std::string m_mode;
64 
66 
69  const Field_G *m_U;
70 
71  // Fopr_Clover_imp* m_imp; //!< pimple prescription
73 
74  public:
76  : Fopr()
77  {
78  init("Dirac");
79  }
80 
81  Fopr_Clover_General(std::string repr)
82  : Fopr()
83  {
84  init(repr);
85  }
86 
88  {
89  tidyup();
90  }
91 
92  void set_parameters(const Parameters& params);
93  void set_parameters(double kappa_s, double kappa_t,
94  double nu_s, double r_s,
95  double cSW_s, double cSW_t,
96  std::vector<int> bc);
97 
98  void set_config(Field *U)
99  {
100  m_U = (Field_G *)U;
101  m_fopr_w->set_config(U);
102  m_fopr_csw->set_config(U);
103  }
104 
106  {
107  m_U = U.get();
108  m_fopr_w->set_config(U.get());
109  m_fopr_csw->set_config(U.get());
110  }
111 
112  void set_mode(std::string mode)
113  {
114  m_mode = mode;
115  }
116 
117  std::string get_mode() const
118  {
119  return m_mode;
120  }
121 
122  void mult(Field& v, const Field& f)
123  {
124  if (m_mode == "D") {
125  D(v, f);
126  } else if (m_mode == "Ddag") {
127  Ddag(v, f);
128  } else if (m_mode == "DdagD") {
129  DdagD(v, f);
130  } else if (m_mode == "DDdag") {
131  DDdag(v, f);
132  } else if (m_mode == "H") {
133  H(v, f);
134  } else {
135  vout.crucial(m_vl, "%s: undefined mode = %s.\n", class_name.c_str(), m_mode.c_str());
136  exit(EXIT_FAILURE);
137  }
138  }
139 
140  void mult_dag(Field& v, const Field& f)
141  {
142  if (m_mode == "D") {
143  Ddag(v, f);
144  } else if (m_mode == "DdagD") {
145  DdagD(v, f);
146  } else if (m_mode == "Ddag") {
147  D(v, f);
148  } else if (m_mode == "H") {
149  H(v, f);
150  } else {
151  vout.crucial(m_vl, "%s: undefined mode = %s.\n", class_name.c_str(), m_mode.c_str());
152  exit(EXIT_FAILURE);
153  }
154  }
155 
156  void D(Field&, const Field&);
157  void Ddag(Field&, const Field&);
158  void DdagD(Field&, const Field&);
159  void DDdag(Field&, const Field&);
160  void H(Field&, const Field&);
161 
162  void mult_gm5(Field& v, const Field& w)
163  {
164  m_fopr_w->mult_gm5(v, w);
165  }
166 
167  void mult_up(int mu, Field& v, const Field& w)
168  {
169  m_fopr_w->mult_up(mu, v, w);
170  }
171 
172  void mult_dn(int mu, Field& v, const Field& w)
173  {
174  m_fopr_w->mult_dn(mu, v, w);
175  }
176 
177  void mult_isigma(Field_F&, const Field_F&,
178  const int mu, const int nu);
179 
180  int field_nvol() { return m_Nvol; }
181  int field_nin() { return 2 * m_Nc * m_Nd; }
182  int field_nex() { return 1; }
183 
185  double flop_count();
186 
187  private:
188 
189  void init(std::string repr);
190  void tidyup();
191 };
192 #endif
void DDdag(Field &, const Field &)
double flop_count()
this returns the number of floating point operations.
void H(Field &, const Field &)
Fopr_CloverTerm_General * m_fopr_csw
Clover term operator.
BridgeIO vout
Definition: bridgeIO.cpp:278
int m_NinF
internal parameters
static const std::string class_name
double m_cSW_s
spatial clover coefficient
Clover general fermion operator.
void set_config(Field *U)
setting pointer to the gauge configuration.
Container of Field-type object.
Definition: field.h:39
void set_config(unique_ptr< Field_G > &U)
int field_nvol()
returns the volume for which the fermion operator is defined.
void mult_up(int mu, Field &v, const Field &w)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
double m_kappa_s
spatial hopping parameter
void D(Field &, const Field &)
void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult(Field&, const Field&).
double m_nu_s
spatial anisotopy parameter
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field (2nd argument)
Class for parameters.
Definition: parameters.h:38
std::string m_repr
gamma matrix representation
void mult_gm5(Field &v, const Field &w)
std::string m_mode
mode of multiplication
Wilson-type fermion field.
Definition: field_F.h:37
double m_cSW_t
temporal clover coefficient
void set_parameters(const Parameters &params)
Fopr_Wilson_General * m_fopr_w
Wilson fermion kernel.
SU(N) gauge field.
Definition: field_G.h:38
void mult_dn(int mu, Field &w, const Field &v)
const Field_G * m_U
gauge configuration (pointer)
Bridge::VerboseLevel m_vl
Definition: fopr.h:113
void mult_dn(int mu, Field &v, const Field &w)
void mult_up(int mu, Field &w, const Field &v)
adding the hopping to nearest neighbor site in mu-th direction.
void set_config(Field *U)
setting pointer to the gauge configuration.
pointer get() const
double m_kappa_t
temporal hopping parameter
void mult_gm5(Field &w, const Field &v)
void crucial(const char *format,...)
Definition: bridgeIO.cpp:48
void set_config(Field *U)
setting pointer to the gauge configuration.
Fopr_Clover_General(std::string repr)
void DdagD(Field &, const Field &)
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
double m_r_s
spatial Wilson parameter
void init(std::string repr)
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
Base class of fermion operator family.
Definition: fopr.h:49
std::vector< int > m_boundary
boundary conditions
std::string get_mode() const
only for Fopr_Overlap
Field m_v2
working field.
void Ddag(Field &, const Field &)