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