Bridge++  Ver. 2.0.2
fopr_CloverTerm_impl.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_CLOVERTERM_IMPL_IMP_INCLUDED
15 #define FOPR_CLOVERTERM_IMPL_IMP_INCLUDED
16 
17 #include "Fopr/fopr_Wilson.h"
18 
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
54 namespace Imp {
55  class Fopr_CloverTerm : public Fopr
56  {
57  public:
58  static const std::string class_name;
59 
60  private:
62 
63  double m_kappa;
64  double m_cSW;
65  std::vector<int> m_boundary;
66  std::string m_repr;
67 
68  std::string m_mode;
69 
70  // void (Fopr_CloverTerm::*m_csw)(Field&, const Field&);
71  // void (Fopr_CloverTerm::*m_gm5)(Field&, const Field&);
72 
74  int m_Nvol;
75 
76  const Field_G *m_U;
77 
80 
82  // Bx = -iF(1,2), By = -iF(2,0), Bz = -iF(0,1)
83 
85  // Ex = -iF(3,0), Ey = -iF(3,1), Ez = -iF(3,2)
86 
88 
89  std::vector<GammaMatrix> m_SG;
91 
92  public:
93 
95  Fopr_CloverTerm() { init("Dirac"); }
96 
98  Fopr_CloverTerm(const std::string repr) { init(repr); }
99 
101  Fopr_CloverTerm(const Parameters& params) { init(params); }
102 
104 
105  void set_parameters(const Parameters& params);
106 
107  void set_parameters(const double kappa, const double cSW,
108  const std::vector<int> bc);
109 
110  void get_parameters(Parameters& params) const;
111 
112  void set_config(Field *U);
113 
114  void set_mode(const std::string mode);
115 
116  std::string get_mode() const { return m_mode; }
117 
118  void mult(Field& v, const Field& f);
119 
120  void mult_dag(Field& v, const Field& f);
121 
122  void mult_sigmaF(Field&, const Field&);
123 
124  void mult_gm5(Field& v, const Field& w);
125 
126  void mult_isigma(Field_F&, const Field_F&,
127  const int mu, const int nu);
128 
129  int field_nvol() { return m_Nvol; }
130  int field_nin() { return 2 * m_Nc * m_Nd; }
131  int field_nex() { return 1; }
132 
134  double flop_count();
135 
136  private:
137  void init(const std::string repr);
138 
139  void init(const Parameters& params);
140 
141  void setup_gamma_matrices();
142 
143  void tidyup();
144 
145  void set_config_omp(Field *U);
146 
147  void set_config_impl(Field *U);
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_IMPL_IMP_INCLUDED */
Imp::Fopr_CloverTerm::set_config_omp
void set_config_omp(Field *U)
Definition: fopr_CloverTerm_impl.cpp:236
Imp::Fopr_CloverTerm::mult_csw_dirac
void mult_csw_dirac(Field &, const Field &)
Definition: fopr_CloverTerm_impl.cpp:406
bridgeIO.h
Imp::Fopr_CloverTerm::m_v2
Field_G m_v2
working vectors
Definition: fopr_CloverTerm_impl.h:87
Imp::Fopr_CloverTerm::m_mode
std::string m_mode
Definition: fopr_CloverTerm_impl.h:68
AFopr< Field >
Imp::Fopr_CloverTerm::set_csw
void set_csw()
Definition: fopr_CloverTerm_impl.cpp:681
Imp::Fopr_CloverTerm::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_impl.cpp:261
Parameters
Class for parameters.
Definition: parameters.h:46
GammaMatrix
Gamma Matrix class.
Definition: gammaMatrix.h:44
Imp::Fopr_CloverTerm::mult_sigmaF
void mult_sigmaF(Field &, const Field &)
Definition: fopr_CloverTerm_impl.cpp:382
Imp::Fopr_CloverTerm::m_By
Field_G m_By
Definition: fopr_CloverTerm_impl.h:81
Imp::Fopr_CloverTerm::set_config
void set_config(Field *U)
sets the gauge configuration.
Definition: fopr_CloverTerm_impl.cpp:219
Imp::Fopr_CloverTerm::m_staple
Staple_lex m_staple
Definition: fopr_CloverTerm_impl.h:79
Imp::Fopr_CloverTerm::class_name
static const std::string class_name
Definition: fopr_CloverTerm_impl.h:58
Imp::Fopr_CloverTerm::mult_csw
void mult_csw(Field &, const Field &)
Definition: fopr_CloverTerm_impl.cpp:392
Imp::Fopr_CloverTerm::Fopr_CloverTerm
DEPRECATED Fopr_CloverTerm()
Definition: fopr_CloverTerm_impl.h:95
Imp::Fopr_CloverTerm::Fopr_CloverTerm
Fopr_CloverTerm(const Parameters &params)
standard constructor for ver.2.0 and later.
Definition: fopr_CloverTerm_impl.h:101
Imp::Fopr_CloverTerm::mult_isigma
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Definition: fopr_CloverTerm_impl.cpp:373
Imp::Fopr_CloverTerm::m_Cdn
Field_G m_Cdn
Definition: fopr_CloverTerm_impl.h:87
Imp::Fopr_CloverTerm::field_nex
int field_nex()
returns the external degree of freedom of the fermion field.
Definition: fopr_CloverTerm_impl.h:131
Imp::Fopr_CloverTerm::set_config_impl
void set_config_impl(Field *U)
Definition: fopr_CloverTerm_impl.cpp:246
Imp::Fopr_CloverTerm::m_shift
ShiftField_lex * m_shift
Definition: fopr_CloverTerm_impl.h:78
Imp::Fopr_CloverTerm::gm5_dirac
void gm5_dirac(Field &, const Field &)
Definition: fopr_CloverTerm_impl.cpp:303
Imp::Fopr_CloverTerm::flop_count
double flop_count()
this returns the number of floating point operations.
Definition: fopr_CloverTerm_impl.cpp:721
Imp::Fopr_CloverTerm::m_vl
Bridge::VerboseLevel m_vl
Definition: fopr_CloverTerm_impl.h:61
Imp::Fopr_CloverTerm::field_nin
int field_nin()
returns the on-site degree of freedom of the fermion field.
Definition: fopr_CloverTerm_impl.h:130
Imp::Fopr_CloverTerm::m_Ex
Field_G m_Ex
Definition: fopr_CloverTerm_impl.h:84
fopr_Wilson.h
Imp::Fopr_CloverTerm::m_Ndim
int m_Ndim
Definition: fopr_CloverTerm_impl.h:73
Imp::Fopr_CloverTerm::m_Nvol
int m_Nvol
Definition: fopr_CloverTerm_impl.h:74
Imp::Fopr_CloverTerm::sg_index
int sg_index(const int mu, const int nu)
Definition: fopr_CloverTerm_impl.h:164
Imp::Fopr_CloverTerm::~Fopr_CloverTerm
~Fopr_CloverTerm()
Definition: fopr_CloverTerm_impl.h:103
Imp::Fopr_CloverTerm::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_CloverTerm_impl.cpp:176
Imp::Fopr_CloverTerm::m_cSW
double m_cSW
Definition: fopr_CloverTerm_impl.h:64
staple_lex.h
Imp::Fopr_CloverTerm::m_U
const Field_G * m_U
pointer to gauge configuration.
Definition: fopr_CloverTerm_impl.h:76
Imp::Fopr_CloverTerm::m_repr
std::string m_repr
Definition: fopr_CloverTerm_impl.h:66
Imp::Fopr_CloverTerm::m_Cup
Field_G m_Cup
Definition: fopr_CloverTerm_impl.h:87
Imp::Fopr_CloverTerm
Definition: fopr_CloverTerm_impl.h:55
Imp::Fopr_CloverTerm::m_NinF
int m_NinF
Definition: fopr_CloverTerm_impl.h:73
Imp::Fopr_CloverTerm::init
void init(const std::string repr)
Definition: fopr_CloverTerm_impl.cpp:78
Imp::Fopr_CloverTerm::gm5_chiral
void gm5_chiral(Field &, const Field &)
Definition: fopr_CloverTerm_impl.cpp:338
Imp::Fopr_CloverTerm::setup_gamma_matrices
void setup_gamma_matrices()
Definition: fopr_CloverTerm_impl.cpp:188
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
Imp::Fopr_CloverTerm::m_kappa
double m_kappa
Definition: fopr_CloverTerm_impl.h:63
Imp::Fopr_CloverTerm::mult_gm5
void mult_gm5(Field &v, const Field &w)
multiplies gamma_5 matrix.
Definition: fopr_CloverTerm_impl.cpp:292
Imp::Fopr_CloverTerm::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_CloverTerm_impl.cpp:118
Imp::Fopr_CloverTerm::m_Bx
Field_G m_Bx
Definition: fopr_CloverTerm_impl.h:81
Staple_lex
Staple construction.
Definition: staple_lex.h:39
Imp::Fopr_CloverTerm::mult_dag
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult.
Definition: fopr_CloverTerm_impl.cpp:285
Imp::Fopr_CloverTerm::m_Nd
int m_Nd
Definition: fopr_CloverTerm_impl.h:73
Imp::Fopr_CloverTerm::m_boundary
std::vector< int > m_boundary
Definition: fopr_CloverTerm_impl.h:65
Imp::Fopr_CloverTerm::m_GM5
GammaMatrix m_GM5
Definition: fopr_CloverTerm_impl.h:90
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Imp::Fopr_CloverTerm::mult
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field.
Definition: fopr_CloverTerm_impl.cpp:271
Imp::Fopr_CloverTerm::mult_csw_chiral
void mult_csw_chiral(Field &, const Field &)
Definition: fopr_CloverTerm_impl.cpp:544
Imp::Fopr_CloverTerm::m_v1
Field_G m_v1
Definition: fopr_CloverTerm_impl.h:87
Imp
Clover term operator.
Definition: fopr_CloverTerm_eo_impl.cpp:32
Imp::Fopr_CloverTerm::m_Ey
Field_G m_Ey
Definition: fopr_CloverTerm_impl.h:84
Field
Container of Field-type object.
Definition: field.h:46
Imp::Fopr_CloverTerm::m_Ez
Field_G m_Ez
field strength (electric components)
Definition: fopr_CloverTerm_impl.h:84
Imp::Fopr_CloverTerm::Fopr_CloverTerm
DEPRECATED Fopr_CloverTerm(const std::string repr)
Definition: fopr_CloverTerm_impl.h:98
Imp::Fopr_CloverTerm::tidyup
void tidyup()
Definition: fopr_CloverTerm_impl.cpp:111
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Imp::Fopr_CloverTerm::set_fieldstrength
void set_fieldstrength(Field_G &, const int, const int)
Definition: fopr_CloverTerm_impl.cpp:693
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Imp::Fopr_CloverTerm::field_nvol
int field_nvol()
returns the volume of the fermion field.
Definition: fopr_CloverTerm_impl.h:129
Imp::Fopr_CloverTerm::m_Nc
int m_Nc
Definition: fopr_CloverTerm_impl.h:73
Imp::Fopr_CloverTerm::m_Bz
Field_G m_Bz
field strength (magnetic components)
Definition: fopr_CloverTerm_impl.h:81
Imp::Fopr_CloverTerm::m_SG
std::vector< GammaMatrix > m_SG
Definition: fopr_CloverTerm_impl.h:89
Imp::Fopr_CloverTerm::get_mode
std::string get_mode() const
Definition: fopr_CloverTerm_impl.h:116
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512