Bridge++  Ver. 2.0.2
fopr_CloverTerm_impl.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_CLOVERTERM_IMPL_ORG_INCLUDED
15 #define FOPR_CLOVERTERM_IMPL_ORG_INCLUDED
16 
17 #include "Fopr/fopr_Wilson.h"
18 
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
54 namespace Org {
55  class Fopr_CloverTerm : public Fopr
56  {
57  public:
58  static const std::string class_name;
59 
60  private:
61 
62  // input parameters
63  double m_kappa;
64  double m_cSW;
65  std::vector<int> m_boundary;
66  std::string m_repr;
67 
69 
70  std::string m_mode;
71 
72  // local variables
74  int m_Nvol;
75 
76  const Field_G *m_U;
77 
81  // Bx = -iF(1,2), By = -iF(2,0), Bz = -iF(0,1)
82  // Ex = -iF(3,0), Ey = -iF(3,1), Ez = -iF(3,2)
83 
86 
87  std::vector<GammaMatrix> m_SG;
89 
90  public:
92  Fopr_CloverTerm() { init("Dirac"); }
93 
95  Fopr_CloverTerm(const std::string repr) { init(repr); }
96 
97  Fopr_CloverTerm(const Parameters& params) { init(params); }
98 
100 
101  void set_parameters(const Parameters& params);
102 
103  void set_parameters(const double kappa,
104  const double cSW,
105  const std::vector<int> bc);
106 
107  void get_parameters(Parameters& params) const;
108 
109  void set_config(Field *U);
110 
111  void set_config_omp(Field *U);
112 
113  void set_config_impl(Field *U);
114 
115  void set_mode(const std::string mode);
116 
117  std::string get_mode() const { return m_mode; }
118 
119  void mult(Field& v, const Field& f);
120 
121  void mult_dag(Field& v, const Field& f);
122 
123  void mult_sigmaF(Field&, const Field&);
124 
125  void mult_gm5(Field& v, const Field& w);
126 
127  void mult_isigma(Field_F&, const Field_F&,
128  const int mu, const int nu);
129 
130  int field_nin() { return m_NinF; }
131  int field_nvol() { return m_Nvol; }
132  int field_nex() { return 1; }
133 
135  double flop_count();
136 
137  private:
138 
140  void init(const Parameters& params);
141 
143  void init(const std::string repr);
144 
146  void setup();
147 
149  void tidyup();
150 
151  void set_csw();
152 
153  void set_fieldstrength(Field_G&, const int, const int);
154 
155  void gm5_dirac(Field&, const Field&);
156 
157  void gm5_chiral(Field&, const Field&);
158 
159  // multiplies csw kappa sigma_{mu nu} F_{mu nu}
160  // NOTE: this is NOT 1 - csw kappa sigma_{mu nu} F_{mu nu}
161  void mult_csw(Field&, const Field&);
162  void mult_csw_dirac(Field&, const Field&);
163  void mult_csw_chiral(Field&, const Field&);
164 
165  void mult_csw_dirac(Field_F&, const Field_F&);
166  void mult_csw_chiral(Field_F&, const Field_F&);
167 
168  int sg_index(const int mu, const int nu) { return mu * m_Ndim + nu; }
169  };
170 } // namespace Org
171 
172 #endif /* FOPR_CLOVERTERM_IMPL_ORG_INCLUDED */
Org::Fopr_CloverTerm::mult_csw
void mult_csw(Field &, const Field &)
Definition: fopr_CloverTerm_impl.cpp:317
Org::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:185
Org::Fopr_CloverTerm::m_Nd
int m_Nd
Definition: fopr_CloverTerm_impl.h:73
Org::Fopr_CloverTerm::mult_gm5
void mult_gm5(Field &v, const Field &w)
multiplies gamma_5 matrix.
Definition: fopr_CloverTerm_impl.cpp:280
Org::Fopr_CloverTerm::m_Ndim
int m_Ndim
Definition: fopr_CloverTerm_impl.h:73
bridgeIO.h
Org::Fopr_CloverTerm::m_mode
std::string m_mode
Definition: fopr_CloverTerm_impl.h:70
AFopr
Definition: afopr.h:48
Org::Fopr_CloverTerm::Fopr_CloverTerm
DEPRECATED Fopr_CloverTerm()
Definition: fopr_CloverTerm_impl.h:92
Org::Fopr_CloverTerm::m_shift
ShiftField_lex * m_shift
Definition: fopr_CloverTerm_impl.h:78
Org::Fopr_CloverTerm::set_fieldstrength
void set_fieldstrength(Field_G &, const int, const int)
Definition: fopr_CloverTerm_impl.cpp:367
Org::Fopr_CloverTerm::mult_dag
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult.
Definition: fopr_CloverTerm_impl.cpp:265
Org::Fopr_CloverTerm::m_u2
Field_G m_u2
working field
Definition: fopr_CloverTerm_impl.h:84
Org::Fopr_CloverTerm::field_nvol
int field_nvol()
returns the volume of the fermion field.
Definition: fopr_CloverTerm_impl.h:131
Parameters
Class for parameters.
Definition: parameters.h:46
GammaMatrix
Gamma Matrix class.
Definition: gammaMatrix.h:44
Org::Fopr_CloverTerm::mult_csw_chiral
void mult_csw_chiral(Field &, const Field &)
Org::Fopr_CloverTerm::m_By
Field_G m_By
Definition: fopr_CloverTerm_impl.h:80
Org::Fopr_CloverTerm::m_vl
Bridge::VerboseLevel m_vl
Definition: fopr_CloverTerm_impl.h:68
Org::Fopr_CloverTerm::m_v1
Field_F m_v1
Definition: fopr_CloverTerm_impl.h:85
Org::Fopr_CloverTerm::m_Cdn
Field_G m_Cdn
Definition: fopr_CloverTerm_impl.h:84
Org::Fopr_CloverTerm::set_config_omp
void set_config_omp(Field *U)
Definition: fopr_CloverTerm_impl.cpp:214
Org::Fopr_CloverTerm::field_nex
int field_nex()
returns the external degree of freedom of the fermion field.
Definition: fopr_CloverTerm_impl.h:132
Org::Fopr_CloverTerm::mult_isigma
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Definition: fopr_CloverTerm_impl.cpp:296
Org::Fopr_CloverTerm::set_config
void set_config(Field *U)
sets the gauge configuration.
Definition: fopr_CloverTerm_impl.cpp:197
Org::Fopr_CloverTerm::m_kappa
double m_kappa
Definition: fopr_CloverTerm_impl.h:63
Org::Fopr_CloverTerm::m_Bz
Field_G m_Bz
Definition: fopr_CloverTerm_impl.h:80
Org::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:125
Org::Fopr_CloverTerm::gm5_chiral
void gm5_chiral(Field &, const Field &)
Org::Fopr_CloverTerm::class_name
static const std::string class_name
Definition: fopr_CloverTerm_impl.h:58
Org::Fopr_CloverTerm::tidyup
void tidyup()
final clean-up.
Definition: fopr_CloverTerm_impl.cpp:118
Org::Fopr_CloverTerm::set_csw
void set_csw()
Definition: fopr_CloverTerm_impl.cpp:355
Org::Fopr_CloverTerm::m_SG
std::vector< GammaMatrix > m_SG
Definition: fopr_CloverTerm_impl.h:87
Org::Fopr_CloverTerm::get_mode
std::string get_mode() const
Definition: fopr_CloverTerm_impl.h:117
Org::Fopr_CloverTerm::flop_count
double flop_count()
this returns the number of floating point operations.
Definition: fopr_CloverTerm_impl.cpp:389
Org::Fopr_CloverTerm::m_Ex
Field_G m_Ex
Definition: fopr_CloverTerm_impl.h:80
Org::Fopr_CloverTerm::m_NinF
int m_NinF
Definition: fopr_CloverTerm_impl.h:73
fopr_Wilson.h
Org::Fopr_CloverTerm::field_nin
int field_nin()
returns the on-site degree of freedom of the fermion field.
Definition: fopr_CloverTerm_impl.h:130
Org::Fopr_CloverTerm::mult
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field.
Definition: fopr_CloverTerm_impl.cpp:250
Org::Fopr_CloverTerm::m_u1
Field_G m_u1
Definition: fopr_CloverTerm_impl.h:84
Org::Fopr_CloverTerm::m_Bx
Field_G m_Bx
Definition: fopr_CloverTerm_impl.h:80
Org::Fopr_CloverTerm::mult_sigmaF
void mult_sigmaF(Field &, const Field &)
Definition: fopr_CloverTerm_impl.cpp:310
Org::Fopr_CloverTerm::set_config_impl
void set_config_impl(Field *U)
Definition: fopr_CloverTerm_impl.cpp:224
Org::Fopr_CloverTerm::~Fopr_CloverTerm
~Fopr_CloverTerm()
Definition: fopr_CloverTerm_impl.h:99
Org::Fopr_CloverTerm::gm5_dirac
void gm5_dirac(Field &, const Field &)
staple_lex.h
Org::Fopr_CloverTerm::m_v2
Field_F m_v2
Definition: fopr_CloverTerm_impl.h:85
Org::Fopr_CloverTerm::mult_csw_dirac
void mult_csw_dirac(Field &, const Field &)
Org::Fopr_CloverTerm::sg_index
int sg_index(const int mu, const int nu)
Definition: fopr_CloverTerm_impl.h:168
Org::Fopr_CloverTerm::m_cSW
double m_cSW
Definition: fopr_CloverTerm_impl.h:64
Org::Fopr_CloverTerm::m_staple
Staple_lex m_staple
Definition: fopr_CloverTerm_impl.h:79
Org
Clover term operator.
Definition: fopr_CloverTerm_eo_impl.cpp:23
Org::Fopr_CloverTerm::Fopr_CloverTerm
Fopr_CloverTerm(const Parameters &params)
Definition: fopr_CloverTerm_impl.h:97
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
Org::Fopr_CloverTerm::m_GM5
GammaMatrix m_GM5
Definition: fopr_CloverTerm_impl.h:88
Org::Fopr_CloverTerm::init
void init(const Parameters &params)
initialization (standard).
Definition: fopr_CloverTerm_impl.cpp:20
Staple_lex
Staple construction.
Definition: staple_lex.h:39
Org::Fopr_CloverTerm::m_Ey
Field_G m_Ey
Definition: fopr_CloverTerm_impl.h:80
Org::Fopr_CloverTerm::m_repr
std::string m_repr
Definition: fopr_CloverTerm_impl.h:66
Org::Fopr_CloverTerm::setup
void setup()
initialization common part.
Definition: fopr_CloverTerm_impl.cpp:73
Org::Fopr_CloverTerm::m_Nvol
int m_Nvol
Definition: fopr_CloverTerm_impl.h:74
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Org::Fopr_CloverTerm
Definition: fopr_CloverTerm_impl.h:55
Org::Fopr_CloverTerm::m_Umu
Field_G m_Umu
Definition: fopr_CloverTerm_impl.h:84
Org::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:240
Field
Container of Field-type object.
Definition: field.h:46
Org::Fopr_CloverTerm::m_U
const Field_G * m_U
pointer to gauge configuration.
Definition: fopr_CloverTerm_impl.h:76
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Org::Fopr_CloverTerm::m_boundary
std::vector< int > m_boundary
Definition: fopr_CloverTerm_impl.h:65
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Org::Fopr_CloverTerm::m_Cup
Field_G m_Cup
Definition: fopr_CloverTerm_impl.h:84
Org::Fopr_CloverTerm::Fopr_CloverTerm
DEPRECATED Fopr_CloverTerm(const std::string repr)
Definition: fopr_CloverTerm_impl.h:95
Org::Fopr_CloverTerm::m_Nc
int m_Nc
Definition: fopr_CloverTerm_impl.h:73
Org::Fopr_CloverTerm::m_v3
Field_F m_v3
working field
Definition: fopr_CloverTerm_impl.h:85
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Org::Fopr_CloverTerm::m_Ez
Field_G m_Ez
field strength.
Definition: fopr_CloverTerm_impl.h:80