Bridge++  Version 1.4.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_CloverTerm_General.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_CLOVERTERM_GENERAL_IMP_BGQ_INCLUDED
15 #define FOPR_CLOVERTERM_GENERAL_IMP_BGQ_INCLUDED
16 
17 #include "Fopr/fopr_Wilson.h"
18 
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
33 namespace Imp_BGQ {
35  {
36  public:
37  static const std::string class_name;
38 
39  private:
41  double m_cSW_s, m_cSW_t;
42  std::vector<int> m_boundary;
43  std::string m_repr;
44  std::string m_mode;
47 
49  int m_Nvol;
50 
51  const Field_G *m_U;
52 
57  // Bx = -iF(1,2), By = -iF(2,0), Bz = -iF(0,1)
58  // Ex = -iF(3,0), Ey = -iF(3,1), Ez = -iF(3,2)
59 
60  std::vector<GammaMatrix> m_SG;
62 
63  public:
65  : Fopr()
66  {
67  init("Dirac");
68  }
69 
70  Fopr_CloverTerm_General(std::string repr)
71  : Fopr()
72  {
73  init(repr);
74  }
75 
77  {
78  tidyup();
79  }
80 
81  void set_parameters(const Parameters& params);
82  void set_parameters(double kappa_s, double kappa_t,
83  double cSW_s, double cSW_t,
84  std::vector<int> bc);
85 
86  void set_config(Field *U);
87 
89  {
90  set_config(U.get());
91  }
92 
93  void set_mode(std::string mode)
94  {
95  m_mode = mode;
96  }
97 
98  std::string get_mode() const
99  {
100  return m_mode;
101  }
102 
103  void mult(Field& v, const Field& f)
104  {
105  if (m_mode == "D") {
106  mult_sigmaF(v, f);
107 // } else if(m_mode=="H"){
108 // H(v,f);
109  } else {
110  vout.crucial("Error at %s: undefined mode = %s\n", class_name.c_str(), m_mode.c_str());
111  exit(EXIT_FAILURE);
112  }
113  }
114 
115  void mult_dag(Field& v, const Field& f)
116  {
117  mult(v, f);
118  }
119 
120  void mult_sigmaF(Field&, const Field&);
121 
122  void mult_gm5(Field& v, const Field& w);
123 
124  void mult_isigma(Field_F&, const Field_F&,
125  const int mu, const int nu);
126 
127  int field_nvol() { return m_Nvol; }
128  int field_nin() { return 2 * m_Nc * m_Nd; }
129  int field_nex() { return 1; }
130 
132  double flop_count();
133 
134  private:
135  void init(std::string repr);
136  void tidyup();
137 
138  void set_csw();
139  void set_fieldstrength(Field_G&, const int, const int);
140 
141  void gm5_dirac(Field&, const Field&);
142  void gm5_chiral(Field&, const Field&);
143 
144  void mult_csw(Field&, const Field&);
145  void mult_csw_dirac(Field&, const Field&);
146  void mult_csw_chiral(Field&, const Field&);
147 
148  void mult_csw_dirac(Field_F&, const Field_F&);
149  void mult_csw_chiral(Field_F&, const Field_F&);
150 
151  int sg_index(int mu, int nu) { return mu * m_Ndim + nu; }
152  };
153 }
154 #endif
void mult_sigmaF(Field &, const Field &)
double flop_count()
this returns the number of floating point operations.
BridgeIO vout
Definition: bridgeIO.cpp:495
void set_config(Field *U)
setting pointer to the gauge configuration.
void set_fieldstrength(Field_G &, const int, const int)
Container of Field-type object.
Definition: field.h:39
Class for parameters.
Definition: parameters.h:46
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Wilson-type fermion field.
Definition: field_F.h:37
void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
int field_nvol()
returns the volume for which the fermion operator is defined.
Gamma Matrix class.
Definition: gammaMatrix.h:44
Staple construction.
Definition: staple_lex.h:39
SU(N) gauge field.
Definition: field_G.h:38
void gm5_dirac(Field &, const Field &)
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
const Field_G * m_U
pointer to gauge configuration.
void gm5_chiral(Field &, const Field &)
void set_config(unique_ptr< Field_G > &U)
pointer get() const
void(Fopr_CloverTerm_General::* m_gm5)(Field &, const Field &)
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult(Field&, const Field&).
void set_parameters(const Parameters &params)
void mult_csw_chiral(Field &, const Field &)
void crucial(const char *format,...)
Definition: bridgeIO.cpp:178
void mult_csw(Field &, const Field &)
void mult_gm5(Field &v, const Field &w)
gamma_5 multiplication. [31 Mar 2017 H.Matsufuru]
std::string get_mode() const
only for Fopr_Overlap
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
void mult_csw_dirac(Field &, const Field &)
Methods to shift a field in the lexical site index.
Base class of fermion operator family.
Definition: fopr.h:47
void(Fopr_CloverTerm_General::* m_csw)(Field &, const Field &)
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field (2nd argument)
Field_G m_v2
for calculation of field strength.