Bridge++  Ver. 2.0.2
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 
53  double m_cSW_s, m_cSW_t;
54  std::vector<int> m_boundary;
55  std::string m_repr;
56  std::string m_mode;
59 
61  int m_Nvol;
62 
63  const Field_G *m_U;
64 
69  // Bx = -iF(1,2), By = -iF(2,0), Bz = -iF(0,1)
70  // Ex = -iF(3,0), Ey = -iF(3,1), Ez = -iF(3,2)
71 
72  std::vector<GammaMatrix> m_SG;
74 
75  public:
78  : m_vl(CommonParameters::Vlevel())
79  {
80  init("Dirac");
81  }
82 
84  Fopr_CloverTerm_General(const std::string repr)
85  : m_vl(CommonParameters::Vlevel())
86  {
87  init(repr);
88  }
89 
91  : m_vl(CommonParameters::Vlevel())
92  {
93  std::string repr = params.get_string("gamma_matrix_type");
94  init(repr);
95  set_parameters(params);
96  }
97 
99  {
100  tidyup();
101  }
102 
103  void set_parameters(const Parameters& params);
104  void set_parameters(const double kappa_s, const double kappa_t,
105  const double cSW_s, const double cSW_t,
106  const std::vector<int> bc);
107 
108  void get_parameters(Parameters& params) const;
109 
110  void set_config(Field *U);
111 
112  void set_mode(const 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  // csw kappa sigma_{mu nu} F_{mu nu}
125  if ((m_mode == "D") || (m_mode == "F")) {
126  mult_sigmaF(v, f);
127 // } else if(m_mode=="H"){
128 // H(v,f);
129  } else {
130  vout.crucial("Error at %s: undefined mode = %s\n", class_name.c_str(), m_mode.c_str());
131  exit(EXIT_FAILURE);
132  }
133  }
134 
135  void mult_dag(Field& v, const Field& f)
136  {
137  mult(v, f);
138  }
139 
140  void mult_sigmaF(Field&, const Field&);
141 
142  void mult_gm5(Field& v, const Field& w);
143 
144  void mult_isigma(Field_F&, const Field_F&,
145  const int mu, const int nu);
146 
147  int field_nvol() { return m_Nvol; }
148  int field_nin() { return 2 * m_Nc * m_Nd; }
149  int field_nex() { return 1; }
150 
152  double flop_count();
153 
154  private:
155  void init(std::string repr);
156  void tidyup();
157 
158  void set_csw();
159  void set_fieldstrength(Field_G&, const int, const int);
160 
161  void gm5_dirac(Field&, const Field&);
162  void gm5_chiral(Field&, const Field&);
163 
164  // multiplies csw kappa sigma_{mu nu} F_{mu nu}
165  // NOTE: this is NOT 1 - csw kappa sigma_{mu nu} F_{mu nu}
166  void mult_csw(Field&, const Field&);
167  void mult_csw_dirac(Field&, const Field&);
168  void mult_csw_chiral(Field&, const Field&);
169 
170  void mult_csw_dirac(Field_F&, const Field_F&);
171  void mult_csw_chiral(Field_F&, const Field_F&);
172 
173  int sg_index(const int mu, const int nu) { return mu * m_Ndim + nu; }
174  };
175 }
176 #endif /* FOPR_CLOVERTERM_GENERAL_IMPL_ORG_INCLUDED */
Org::Fopr_CloverTerm_General::gm5_chiral
void gm5_chiral(Field &, const Field &)
Org::Fopr_CloverTerm_General::field_nin
int field_nin()
returns the on-site degree of freedom of the fermion field.
Definition: fopr_CloverTerm_General_impl.h:148
Org::Fopr_CloverTerm_General::m_Nc
int m_Nc
Definition: fopr_CloverTerm_General_impl.h:60
Org::Fopr_CloverTerm_General::Fopr_CloverTerm_General
DEPRECATED Fopr_CloverTerm_General()
Definition: fopr_CloverTerm_General_impl.h:77
bridgeIO.h
Org::Fopr_CloverTerm_General::m_staple
Staple_lex m_staple
Definition: fopr_CloverTerm_General_impl.h:66
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
AFopr< Field >
Org::Fopr_CloverTerm_General::m_U
const Field_G * m_U
pointer to gauge configuration.
Definition: fopr_CloverTerm_General_impl.h:63
Org::Fopr_CloverTerm_General::mult_isigma
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Definition: fopr_CloverTerm_General_impl.cpp:167
Parameters
Class for parameters.
Definition: parameters.h:46
Org::Fopr_CloverTerm_General::Fopr_CloverTerm_General
Fopr_CloverTerm_General(const Parameters &params)
Definition: fopr_CloverTerm_General_impl.h:90
GammaMatrix
Gamma Matrix class.
Definition: gammaMatrix.h:44
Org::Fopr_CloverTerm_General::m_Bz
Field_G m_Bz
Definition: fopr_CloverTerm_General_impl.h:68
Org::Fopr_CloverTerm_General::mult_csw
void mult_csw(Field &, const Field &)
Definition: fopr_CloverTerm_General_impl.cpp:183
Org::Fopr_CloverTerm_General::m_v1
Field_G m_v1
Definition: fopr_CloverTerm_General_impl.h:67
Org::Fopr_CloverTerm_General::mult_gm5
void mult_gm5(Field &v, const Field &w)
multiplies gamma_5 matrix.
Definition: fopr_CloverTerm_General_impl.cpp:153
Org::Fopr_CloverTerm_General::field_nex
int field_nex()
returns the external degree of freedom of the fermion field.
Definition: fopr_CloverTerm_General_impl.h:149
Org::Fopr_CloverTerm_General::tidyup
void tidyup()
Definition: fopr_CloverTerm_General_impl.cpp:146
Org::Fopr_CloverTerm_General::m_repr
std::string m_repr
Definition: fopr_CloverTerm_General_impl.h:55
Org::Fopr_CloverTerm_General::m_Cdn
Field_G m_Cdn
Definition: fopr_CloverTerm_General_impl.h:67
Org::Fopr_CloverTerm_General::mult
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field.
Definition: fopr_CloverTerm_General_impl.h:122
Org::Fopr_CloverTerm_General::Fopr_CloverTerm_General
DEPRECATED Fopr_CloverTerm_General(const std::string repr)
Definition: fopr_CloverTerm_General_impl.h:84
Org::Fopr_CloverTerm_General::m_cSW_t
double m_cSW_t
Definition: fopr_CloverTerm_General_impl.h:53
Org::Fopr_CloverTerm_General::m_GM5
GammaMatrix m_GM5
Definition: fopr_CloverTerm_General_impl.h:73
Org::Fopr_CloverTerm_General::m_csw
void(Fopr_CloverTerm_General::* m_csw)(Field &, const Field &)
Definition: fopr_CloverTerm_General_impl.h:57
Org::Fopr_CloverTerm_General::mult_dag
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult.
Definition: fopr_CloverTerm_General_impl.h:135
Org::Fopr_CloverTerm_General::m_cSW_s
double m_cSW_s
Definition: fopr_CloverTerm_General_impl.h:53
Org::Fopr_CloverTerm_General
Definition: fopr_CloverTerm_General_impl.h:44
Org::Fopr_CloverTerm_General::m_Ex
Field_G m_Ex
Definition: fopr_CloverTerm_General_impl.h:68
Org::Fopr_CloverTerm_General::class_name
static const std::string class_name
Definition: fopr_CloverTerm_General_impl.h:47
Org::Fopr_CloverTerm_General::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_CloverTerm_General_impl.cpp:51
Org::Fopr_CloverTerm_General::mult_csw_dirac
void mult_csw_dirac(Field &, const Field &)
Org::Fopr_CloverTerm_General::mult_csw_chiral
void mult_csw_chiral(Field &, const Field &)
fopr_Wilson.h
Org::Fopr_CloverTerm_General::m_vl
Bridge::VerboseLevel m_vl
Definition: fopr_CloverTerm_General_impl.h:50
staple_lex.h
Org::Fopr_CloverTerm_General::m_Nd
int m_Nd
Definition: fopr_CloverTerm_General_impl.h:60
Org::Fopr_CloverTerm_General::get_mode
std::string get_mode() const
Definition: fopr_CloverTerm_General_impl.h:117
Org::Fopr_CloverTerm_General::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_CloverTerm_General_impl.cpp:22
Org::Fopr_CloverTerm_General::m_By
Field_G m_By
Definition: fopr_CloverTerm_General_impl.h:68
Org
Clover term operator.
Definition: fopr_CloverTerm_eo_impl.cpp:23
Org::Fopr_CloverTerm_General::m_gm5
void(Fopr_CloverTerm_General::* m_gm5)(Field &, const Field &)
Definition: fopr_CloverTerm_General_impl.h:58
Org::Fopr_CloverTerm_General::m_Ey
Field_G m_Ey
Definition: fopr_CloverTerm_General_impl.h:68
Org::Fopr_CloverTerm_General::m_SG
std::vector< GammaMatrix > m_SG
Definition: fopr_CloverTerm_General_impl.h:72
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
Org::Fopr_CloverTerm_General::set_csw
void set_csw()
Definition: fopr_CloverTerm_General_impl.cpp:222
Org::Fopr_CloverTerm_General::m_Ndim
int m_Ndim
Definition: fopr_CloverTerm_General_impl.h:60
Org::Fopr_CloverTerm_General::~Fopr_CloverTerm_General
~Fopr_CloverTerm_General()
Definition: fopr_CloverTerm_General_impl.h:98
Org::Fopr_CloverTerm_General::m_v2
Field_G m_v2
for calculation of field strength.
Definition: fopr_CloverTerm_General_impl.h:67
Org::Fopr_CloverTerm_General::set_config
void set_config(Field *U)
sets the gauge configuration.
Definition: fopr_CloverTerm_General_impl.cpp:94
Org::Fopr_CloverTerm_General::gm5_dirac
void gm5_dirac(Field &, const Field &)
Staple_lex
Staple construction.
Definition: staple_lex.h:39
Org::Fopr_CloverTerm_General::m_shift
ShiftField_lex m_shift
Definition: fopr_CloverTerm_General_impl.h:65
Org::Fopr_CloverTerm_General::flop_count
double flop_count()
this returns the number of floating point operations.
Definition: fopr_CloverTerm_General_impl.cpp:269
Org::Fopr_CloverTerm_General::m_NinF
int m_NinF
Definition: fopr_CloverTerm_General_impl.h:60
Org::Fopr_CloverTerm_General::m_Cup
Field_G m_Cup
Definition: fopr_CloverTerm_General_impl.h:67
Org::Fopr_CloverTerm_General::field_nvol
int field_nvol()
returns the volume of the fermion field.
Definition: fopr_CloverTerm_General_impl.h:147
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Org::Fopr_CloverTerm_General::m_kappa_s
double m_kappa_s
Definition: fopr_CloverTerm_General_impl.h:52
Parameters::get_string
string get_string(const string &key) const
Definition: parameters.cpp:221
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
Org::Fopr_CloverTerm_General::m_boundary
std::vector< int > m_boundary
Definition: fopr_CloverTerm_General_impl.h:54
Org::Fopr_CloverTerm_General::m_Ez
Field_G m_Ez
field strength.
Definition: fopr_CloverTerm_General_impl.h:68
Org::Fopr_CloverTerm_General::set_fieldstrength
void set_fieldstrength(Field_G &, const int, const int)
Definition: fopr_CloverTerm_General_impl.cpp:234
Field
Container of Field-type object.
Definition: field.h:46
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Org::Fopr_CloverTerm_General::m_Nvol
int m_Nvol
Definition: fopr_CloverTerm_General_impl.h:61
Org::Fopr_CloverTerm_General::m_Bx
Field_G m_Bx
Definition: fopr_CloverTerm_General_impl.h:68
Org::Fopr_CloverTerm_General::mult_sigmaF
void mult_sigmaF(Field &, const Field &)
Definition: fopr_CloverTerm_General_impl.cpp:176
Org::Fopr_CloverTerm_General::init
void init(std::string repr)
Definition: fopr_CloverTerm_General_impl.cpp:102
Org::Fopr_CloverTerm_General::m_kappa_t
double m_kappa_t
Definition: fopr_CloverTerm_General_impl.h:52
Org::Fopr_CloverTerm_General::set_mode
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: fopr_CloverTerm_General_impl.h:112
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Org::Fopr_CloverTerm_General::m_mode
std::string m_mode
Definition: fopr_CloverTerm_General_impl.h:56
Org::Fopr_CloverTerm_General::sg_index
int sg_index(const int mu, const int nu)
Definition: fopr_CloverTerm_General_impl.h:173
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512