Bridge++  Ver. 2.0.2
fopr_Clover_SF.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_CLOVER_SF_INCLUDED
15 #define FOPR_CLOVER_SF_INCLUDED
16 
17 #include "fopr_Wilson_SF.h"
19 
20 #include "Field/shiftField_lex.h"
21 #include "Tools/gammaMatrixSet.h"
22 
23 #include "IO/bridgeIO.h"
24 using Bridge::vout;
25 
27 
44 class Fopr_Clover_SF : public Fopr
45 {
46  public:
47  static const std::string class_name;
48 
49  private:
51 
53  double m_kappa, m_cSW;
54  std::vector<int> m_boundary;
55  std::string m_repr;
56  std::string m_mode;
57 
59  const Field_G *m_U;
61 
63  // Bx = -iF(1,2), By = -iF(2,1), -iBz = F(0,1)
64  // Ex = -iF(4,0), Ey = -iF(4,1), Ez = -iF(4,2)
65 
66  std::vector<GammaMatrix> m_GM, m_SG;
67 
68  std::vector<double> m_phi;
69  std::vector<double> m_phipr;
70 
72 
73  public:
76  : m_vl(CommonParameters::Vlevel())
77  {
78  init("Dirac");
79  }
80 
81  Fopr_Clover_SF(const Parameters& params)
82  : m_vl(CommonParameters::Vlevel())
83  {
84  std::string repr = params.get_string("gamma_matrix_type");
85 
86  if (repr != "Dirac") {
87  vout.crucial(m_vl, "only Dirac representation is supported.\n");
88  exit(EXIT_FAILURE);
89  }
90 
91  init(repr);
92  set_parameters(params);
93  }
94 
96 
97  void set_parameters(const Parameters& params);
98  void set_parameters(const double kappa, const double cSW, const std::vector<int> bc,
99  const std::vector<double> phi,
100  const std::vector<double> phipr);
101 
102  void get_parameters(Parameters& params) const;
103 
105  void set_config(Field *U);
106 
107  void set_mode(const std::string mode);
108 
109  std::string get_mode() const { return m_mode; }
110 
111  void mult(Field& v, const Field& f);
112 
113  void mult_dag(Field& v, const Field& f);
114 
115  void mult(Field& v, const Field& f, const std::string mode);
116 
117  void mult_dag(Field& v, const Field& f, const std::string mode);
118 
119  void DdagD(Field&, const Field&);
120  void D(Field&, const Field&);
121  void Ddag(Field&, const Field&);
122  void H(Field&, const Field&);
123 
124  void mult_gm5(Field& v, const Field& w)
125  { m_fopr_w->mult_gm5(v, w); }
126 
127  void mult_isigma(Field_F&, const Field_F&,
128  const int mu, const int nu);
129 
130  int field_nvol() { return m_Nvol; }
131  int field_nin() { return 2 * m_Nc * m_Nd; }
132  int field_nex() { return 1; }
133 
135  double flop_count();
136 
137  private:
138  void init(const std::string repr);
139  void tidyup();
140 
141  void set_csw();
142  void mult_csw(Field&, const Field&);
143  void set_fieldstrength(Field_G&, const int, const int);
144 
145  void mult_csw_dirac(Field&, const Field&);
146 
147  //void mult_csw_chiral(Field&, const Field&);
148 
149  void set_boundary_zero(Field&);
150 
151  int sg_index(const int mu, const int nu) { return mu * m_Ndim + nu; }
152 
153 
154 #ifdef USE_FACTORY
155  private:
156 
157  static Fopr *create_object()
158  {
159  return new Fopr_Clover_SF();
160  }
161 
162  static Fopr *create_object_with_params(const Parameters& params)
163  {
164  return new Fopr_Clover_SF(params);
165  }
166 
167  public:
168  static bool register_factory()
169  {
170  bool init = true;
171  init &= Fopr::Factory_noarg::Register("Clover_SF", create_object);
172  init &= Fopr::Factory_params::Register("Clover_SF", create_object_with_params);
173  return init;
174  }
175 #endif
176 };
177 #endif
Fopr_Clover_SF::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Clover_SF.cpp:117
Fopr_Clover_SF::field_nin
int field_nin()
returns the on-site degree of freedom of the fermion field.
Definition: fopr_Clover_SF.h:131
Fopr_Clover_SF::mult_dag
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult.
Definition: fopr_Clover_SF.cpp:264
bridgeIO.h
Fopr_Clover_SF::m_Bz
Field_G m_Bz
Definition: fopr_Clover_SF.h:62
Fopr_Clover_SF::Fopr_Clover_SF
Fopr_Clover_SF(const Parameters &params)
Definition: fopr_Clover_SF.h:81
Fopr_Clover_SF::H
void H(Field &, const Field &)
Definition: fopr_Clover_SF.cpp:346
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
AFopr
Definition: afopr.h:48
Fopr_Clover_SF::m_w1
Field m_w1
Definition: fopr_Clover_SF.h:71
Fopr_Clover_SF::mult_csw
void mult_csw(Field &, const Field &)
Definition: fopr_Clover_SF.cpp:384
Parameters
Class for parameters.
Definition: parameters.h:46
Fopr_Clover_SF::m_mode
std::string m_mode
Definition: fopr_Clover_SF.h:56
Fopr_Clover_SF::m_SG
std::vector< GammaMatrix > m_SG
Definition: fopr_Clover_SF.h:66
shiftField_lex.h
Fopr_Clover_SF::m_Ndim
int m_Ndim
Definition: fopr_Clover_SF.h:52
Fopr_Clover_SF::init
void init(const std::string repr)
Definition: fopr_Clover_SF.cpp:47
Fopr_Clover_SF::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Clover_SF.cpp:207
Fopr_Clover_SF::m_Nd
int m_Nd
Definition: fopr_Clover_SF.h:52
fopr_Wilson_SF.h
Fopr_Clover_SF::mult_isigma
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Definition: fopr_Clover_SF.cpp:374
Fopr_Clover_SF::m_Bx
Field_G m_Bx
Definition: fopr_Clover_SF.h:62
Fopr_Clover_SF::set_config
void set_config(Field *U)
setup configuration (Note that this method is not multi-threaded).
Definition: fopr_Clover_SF.cpp:221
Fopr_Clover_SF::m_shift
ShiftField_lex m_shift
Definition: fopr_Clover_SF.h:60
Fopr_Clover_SF::m_repr
std::string m_repr
Definition: fopr_Clover_SF.h:55
Fopr_Clover_SF::m_Ez
Field_G m_Ez
Definition: fopr_Clover_SF.h:62
Fopr_Clover_SF::class_name
static const std::string class_name
Definition: fopr_Clover_SF.h:47
Fopr_Clover_SF
Clover fermion operator.
Definition: fopr_Clover_SF.h:44
Fopr_Clover_SF::DdagD
void DdagD(Field &, const Field &)
Definition: fopr_Clover_SF.cpp:323
Fopr_Clover_SF::set_csw
void set_csw()
Definition: fopr_Clover_SF.cpp:506
Fopr_Clover_SF::m_w2
Field m_w2
Definition: fopr_Clover_SF.h:71
Fopr_Clover_SF::m_cSW
double m_cSW
Definition: fopr_Clover_SF.h:53
Fopr_Clover_SF::m_fopr_w
Fopr_Wilson_SF * m_fopr_w
Definition: fopr_Clover_SF.h:58
Fopr_Clover_SF::tidyup
void tidyup()
Definition: fopr_Clover_SF.cpp:110
Fopr_Clover_SF::m_Nvol
int m_Nvol
Definition: fopr_Clover_SF.h:52
Fopr_Clover_SF::sg_index
int sg_index(const int mu, const int nu)
Definition: fopr_Clover_SF.h:151
Fopr_Clover_SF::set_boundary_zero
void set_boundary_zero(Field &)
Fopr_Clover_SF::mult_gm5
void mult_gm5(Field &v, const Field &w)
multiplies gamma_5 matrix.
Definition: fopr_Clover_SF.h:124
Fopr_Clover_SF::field_nex
int field_nex()
returns the external degree of freedom of the fermion field.
Definition: fopr_Clover_SF.h:132
Fopr_Clover_SF::m_U
const Field_G * m_U
Definition: fopr_Clover_SF.h:59
Fopr_Clover_SF::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_Clover_SF.cpp:233
Fopr_Wilson_SF::mult_gm5
void mult_gm5(Field &v, const Field &w)
multiplies gamma_5 matrix.
Definition: fopr_Wilson_SF.cpp:270
Fopr_Clover_SF::m_NinF
int m_NinF
Definition: fopr_Clover_SF.h:52
Fopr_Clover_SF::~Fopr_Clover_SF
~Fopr_Clover_SF()
Definition: fopr_Clover_SF.h:95
Fopr_Clover_SF::mult
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field.
Definition: fopr_Clover_SF.cpp:245
Fopr_Clover_SF::m_boundary
std::vector< int > m_boundary
Definition: fopr_Clover_SF.h:54
Fopr_Clover_SF::D
void D(Field &, const Field &)
Definition: fopr_Clover_SF.cpp:356
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
Fopr_Clover_SF::set_fieldstrength
void set_fieldstrength(Field_G &, const int, const int)
Definition: fopr_Clover_SF.cpp:525
Fopr_Clover_SF::m_kappa
double m_kappa
Definition: fopr_Clover_SF.h:53
Fopr_Clover_SF::Fopr_Clover_SF
DEPRECATED Fopr_Clover_SF()
Definition: fopr_Clover_SF.h:75
staple_SF.h
Fopr_Clover_SF::Ddag
void Ddag(Field &, const Field &)
Definition: fopr_Clover_SF.cpp:335
Fopr_Clover_SF::m_GM
std::vector< GammaMatrix > m_GM
Definition: fopr_Clover_SF.h:66
Fopr_Clover_SF::m_Ex
Field_G m_Ex
Definition: fopr_Clover_SF.h:62
Fopr_Clover_SF::field_nvol
int field_nvol()
returns the volume of the fermion field.
Definition: fopr_Clover_SF.h:130
Fopr_Clover_SF::flop_count
double flop_count()
this returns the number of floating point number operations.
Definition: fopr_Clover_SF.cpp:561
Fopr_Clover_SF::m_vl
Bridge::VerboseLevel m_vl
Definition: fopr_Clover_SF.h:50
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Parameters::get_string
string get_string(const string &key) const
Definition: parameters.cpp:221
Fopr_Clover_SF::m_phipr
std::vector< double > m_phipr
SF boundary condition at t=Nt.
Definition: fopr_Clover_SF.h:69
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
Fopr_Clover_SF::m_Nc
int m_Nc
Definition: fopr_Clover_SF.h:52
Fopr_Clover_SF::mult_csw_dirac
void mult_csw_dirac(Field &, const Field &)
Definition: fopr_Clover_SF.cpp:391
Fopr_Clover_SF::m_phi
std::vector< double > m_phi
SF boundary condition at t=0.
Definition: fopr_Clover_SF.h:68
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
Fopr_Clover_SF::m_By
Field_G m_By
Definition: fopr_Clover_SF.h:62
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Fopr_Clover_SF::get_mode
std::string get_mode() const
Definition: fopr_Clover_SF.h:109
Fopr_Wilson_SF
Wilson fermion operator with SF BC.
Definition: fopr_Wilson_SF.h:51
gammaMatrixSet.h
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Fopr_Clover_SF::m_Ey
Field_G m_Ey
Definition: fopr_Clover_SF.h:62