Bridge++  Ver. 2.0.2
fopr_Clover.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_CLOVER_INCLUDED
15 #define FOPR_CLOVER_INCLUDED
16 
17 #include "fopr_Wilson.h"
18 #include "fopr_CloverTerm.h"
19 
20 #include "IO/bridgeIO.h"
21 using Bridge::vout;
22 
24 
43 class Fopr_Clover : public Fopr
44 {
45  public:
46  static const std::string class_name;
47 
48  private:
49  double m_kappa;
50  double m_cSW;
51  std::vector<int> m_boundary;
52  std::string m_repr;
54 
55  std::string m_mode;
56 
57  // internal data members
58  int m_Nc, m_Nd, m_NinF;
59  int m_Nvol, m_Ndim;
60 
63  const Field_G *m_U;
64 
66 
68 
69  public:
71  Fopr_Clover() { init("Dirac"); }
72 
74  Fopr_Clover(const std::string repr) { init(repr); }
75 
76  Fopr_Clover(const Parameters& params) { init(params); }
77 
79 
80  void set_parameters(const Parameters& params);
81 
82  void set_parameters(const double kappa, const double cSW,
83  const std::vector<int> bc);
84 
85  void get_parameters(Parameters& params) const;
86 
87  void set_config(Field *U);
88 
89  void set_mode(const std::string mode);
90 
91  std::string get_mode() const { return m_mode; }
92 
93  void mult(Field& v, const Field& f);
94 
95  void mult_dag(Field& v, const Field& f);
96 
97  void D(Field&, const Field&);
98  void Ddag(Field&, const Field&);
99  void DdagD(Field&, const Field&);
100  void DDdag(Field&, const Field&);
101  void H(Field&, const Field&);
102 
103  void mult_gm5(Field& v, const Field& w);
104 
105  void mult_up(const int mu, Field& v, const Field& w);
106 
107  void mult_dn(const int mu, Field& v, const Field& w);
108 
109  void mult_isigma(Field_F&, const Field_F&,
110  const int mu, const int nu);
111 
112  int field_nin() { return 2 * m_Nc * m_Nd; }
113  int field_nvol() { return m_Nvol; }
114  int field_nex() { return 1; }
115 
117  double flop_count();
118 
119  private:
120 
121  void init(const std::string repr);
122 
123  void init(const Parameters& params);
124 
125  void setup();
126 
127  void tidyup();
128 
129 
130 #ifdef USE_FACTORY
131  private:
132  static Fopr *create_object() { return new Fopr_Clover(); }
133 
134  static Fopr *create_object_with_arg(const std::string& repr)
135  { return new Fopr_Clover(repr); }
136 
137  static Fopr *create_object_with_params(const Parameters& params)
138  { return new Fopr_Clover(params); }
139 
140  public:
141  static bool register_factory()
142  {
143  bool init = true;
144  init &= Fopr::Factory_noarg::Register("Clover", create_object);
145  init &= Fopr::Factory_string::Register("Clover",
146  create_object_with_arg);
147  init &= Fopr::Factory_params::Register("Clover",
148  create_object_with_params);
149  return init;
150  }
151 #endif
152 };
153 #endif
Fopr_Clover::m_NinF
int m_NinF
internal parameters
Definition: fopr_Clover.h:58
Fopr_Clover::m_U
const Field_G * m_U
gauge configuration (pointer)
Definition: fopr_Clover.h:63
bridgeIO.h
Fopr_Clover::m_Nvol
int m_Nvol
Definition: fopr_Clover.h:59
Fopr_Clover::H
void H(Field &, const Field &)
Definition: fopr_Clover.cpp:323
AFopr
Definition: afopr.h:48
Parameters
Class for parameters.
Definition: parameters.h:46
Fopr_Clover::mult_isigma
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Definition: fopr_Clover.cpp:331
Fopr_Clover::m_Nc
int m_Nc
Definition: fopr_Clover.h:58
Fopr_Clover::setup
void setup()
Definition: fopr_Clover.cpp:92
Fopr_Clover::DdagD
void DdagD(Field &, const Field &)
Definition: fopr_Clover.cpp:303
Fopr_Clover::tidyup
void tidyup()
Definition: fopr_Clover.cpp:110
Fopr_Clover::mult_dn
void mult_dn(const int mu, Field &v, const Field &w)
downward nearest neighbor hopping term.
Definition: fopr_Clover.cpp:274
Fopr_Clover::m_boundary
std::vector< int > m_boundary
boundary conditions
Definition: fopr_Clover.h:51
Fopr_Clover::Fopr_Clover
DEPRECATED Fopr_Clover(const std::string repr)
Definition: fopr_Clover.h:74
Fopr_Clover::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Clover.cpp:118
Fopr_Clover::m_mode
std::string m_mode
mode of multiplication
Definition: fopr_Clover.h:55
Fopr_Clover::m_v1
Field m_v1
Definition: fopr_Clover.h:65
Fopr_Clover::field_nin
int field_nin()
returns the on-site degree of freedom of the fermion field.
Definition: fopr_Clover.h:112
Fopr_Clover
Clover fermion operator.
Definition: fopr_Clover.h:43
Fopr_Clover::set_config
void set_config(Field *U)
sets the gauge configuration.
Definition: fopr_Clover.cpp:195
Fopr_Clover::Fopr_Clover
DEPRECATED Fopr_Clover()
Definition: fopr_Clover.h:71
Fopr_Clover::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Clover.cpp:183
Fopr_Clover::m_kappa
double m_kappa
hopping parameter
Definition: fopr_Clover.h:49
Fopr_Clover::m_repr
std::string m_repr
gamma matrix representation
Definition: fopr_Clover.h:52
fopr_Wilson.h
Fopr_Clover::mult_up
void mult_up(const int mu, Field &v, const Field &w)
upward nearest neighbor hopping term.
Definition: fopr_Clover.cpp:267
fopr_CloverTerm.h
Fopr_Clover::~Fopr_Clover
~Fopr_Clover()
Definition: fopr_Clover.h:78
Fopr_Clover::field_nvol
int field_nvol()
returns the volume of the fermion field.
Definition: fopr_Clover.h:113
Fopr_Clover::field_nex
int field_nex()
returns the external degree of freedom of the fermion field.
Definition: fopr_Clover.h:114
Fopr_Clover::mult_gm5
void mult_gm5(Field &v, const Field &w)
multiplies gamma_5 matrix.
Definition: fopr_Clover.cpp:260
Fopr_Clover::get_mode
std::string get_mode() const
Definition: fopr_Clover.h:91
Fopr_Clover::class_name
static const std::string class_name
Definition: fopr_Clover.h:46
Fopr_Clover::m_Ndim
int m_Ndim
internal parameters
Definition: fopr_Clover.h:59
Fopr_Clover::m_Nd
int m_Nd
Definition: fopr_Clover.h:58
Fopr_Clover::D
void D(Field &, const Field &)
Definition: fopr_Clover.cpp:281
Fopr_Clover::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.cpp:208
Fopr_Clover::m_v2
Field m_v2
working field.
Definition: fopr_Clover.h:65
Fopr_Clover::Fopr_Clover
Fopr_Clover(const Parameters &params)
Definition: fopr_Clover.h:76
Fopr_Clover::m_cSW
double m_cSW
clover coefficient
Definition: fopr_Clover.h:50
Fopr_Clover::flop_count
double flop_count()
this returns the number of floating point operations.
Definition: fopr_Clover.cpp:339
Fopr_Clover::m_fopr_w
Fopr_Wilson * m_fopr_w
Wilson fermion kernel.
Definition: fopr_Clover.h:61
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Org::Fopr_CloverTerm
Definition: fopr_CloverTerm_impl.h:55
Fopr_Clover::m_vl
Bridge::VerboseLevel m_vl
verbose level
Definition: fopr_Clover.h:53
Fopr_Clover::mult_dag
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult.
Definition: fopr_Clover.cpp:239
Fopr_Clover::Ddag
void Ddag(Field &, const Field &)
Definition: fopr_Clover.cpp:294
Fopr_Clover::m_is_initial_step
bool m_is_initial_step
to avoid redundant setup
Definition: fopr_Clover.h:67
Fopr_Clover::init
void init(const std::string repr)
Definition: fopr_Clover.cpp:65
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_Wilson
Definition: fopr_Wilson_impl.h:38
Fopr_Clover::mult
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field.
Definition: fopr_Clover.cpp:218
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Fopr_Clover::m_fopr_csw
Fopr_CloverTerm * m_fopr_csw
Clover term operator.
Definition: fopr_Clover.h:62
Fopr_Clover::DDdag
void DDdag(Field &, const Field &)
Definition: fopr_Clover.cpp:313
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512