Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_Clover_Isochemical.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_CLOVER_ISOCHEMICAL_INCLUDED
15 #define FOPR_CLOVER_ISOCHEMICAL_INCLUDED
16 
18 #include "fopr_CloverTerm.h"
19 
20 #include "IO/bridgeIO.h"
21 using Bridge::vout;
22 
24 
37 {
38  public:
39  static const std::string class_name;
40 
41  private:
42  double m_kappa;
43  double m_cSW;
44  double m_mu;
45  std::vector<int> m_boundary;
46  std::string m_repr;
47  std::string m_mode;
48 
50 
53 
54  const Field_G *m_U;
55 
58 
59  public:
61  : Fopr()
62  {
63  init("Dirac");
64  }
65 
66  Fopr_Clover_Isochemical(const std::string repr)
67  : Fopr()
68  {
69  init(repr);
70  }
71 
73  {
74  tidyup();
75  }
76 
77  void set_parameters(const Parameters& params);
78  void set_parameters(const double kappa, const double cSW, const double mu, const std::vector<int> bc);
79 
80  void set_config(Field *U);
81 
83  {
84  set_config(U.get());
85  }
86 
87  void set_mode(const std::string mode)
88  {
89  m_mode = mode;
90  }
91 
92  std::string get_mode() const
93  {
94  return m_mode;
95  }
96 
97  void mult(Field& v, const Field& f)
98  {
99  if (m_mode == "D") {
100  D(v, f);
101  } else if (m_mode == "DdagD") {
102  DdagD(v, f);
103  } else if (m_mode == "Ddag") {
104  Ddag(v, f);
105  } else if (m_mode == "H") {
106  H(v, f);
107  } else {
108  vout.crucial(m_vl, "Error at %s: undefined mode = %s.\n", class_name.c_str(), m_mode.c_str());
109  exit(EXIT_FAILURE);
110  }
111  }
112 
113  void mult_dag(Field& v, const Field& f)
114  {
115  if (m_mode == "D") {
116  Ddag(v, f);
117  } else if (m_mode == "DdagD") {
118  DdagD(v, f);
119  } else if (m_mode == "Ddag") {
120  D(v, f);
121  } else if (m_mode == "H") {
122  Hdag(v, f);
123  } else {
124  vout.crucial(m_vl, "Error at %s: undefined mode = %s.\n", class_name.c_str(), m_mode.c_str());
125  exit(EXIT_FAILURE);
126  }
127  }
128 
129  void DdagD(Field&, const Field&);
130  void D(Field&, const Field&);
131  void Ddag(Field&, const Field&);
132  void H(Field&, const Field&);
133  void Hdag(Field&, const Field&);
134 
135  void mult_gm5(Field& v, const Field& w)
136  {
137  m_fopr_w->mult_gm5(v, w);
138  }
139 
140  void mult_up(const int mu, Field& v, const Field& w)
141  {
142  m_fopr_w->mult_up(mu, v, w);
143  }
144 
145  void mult_dn(const int mu, Field& v, const Field& w)
146  {
147  m_fopr_w->mult_dn(mu, v, w);
148  }
149 
150  void mult_isigma(Field_F&, const Field_F&,
151  const int mu, const int nu);
152 
153  int field_nvol() { return m_Nvol; }
154  int field_nin() { return 2 * m_Nc * m_Nd; }
155  int field_nex() { return 1; }
156 
158  double flop_count();
159 
160  private:
161  void init(const std::string repr);
162  void tidyup();
163 
164 #ifdef USE_FACTORY
165  private:
166  static Fopr *create_object()
167  {
168  return new Fopr_Clover_Isochemical();
169  }
170 
171  static Fopr *create_object_with_repr(const std::string& repr)
172  {
173  return new Fopr_Clover_Isochemical(repr);
174  }
175 
176  public:
177  static bool register_factory()
178  {
179  bool init1 = Fopr::Factory_noarg::Register("Clover_Isochemical", create_object);
180  bool init2 = Fopr::Factory_string::Register("Clover_Isochemical", create_object_with_repr);
181 
182  return init1 && init2;
183  }
184 #endif
185 };
186 #endif
const Field_G * m_U
gauge configuration (pointer)
BridgeIO vout
Definition: bridgeIO.cpp:503
void set_config(Field *U)
setting pointer to the gauge configuration.
Fopr_CloverTerm * m_fopr_csw
Clover term operator.
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
std::string get_mode() const
only for Fopr_Overlap
double m_cSW
clover coefficient
void mult_gm5(Field &, const Field &)
gamma_5 multiplication. [31 Mar 2017 H.Matsufuru]
Fopr_Clover_Isochemical(const std::string repr)
Container of Field-type object.
Definition: field.h:45
double m_mu
isospin chemical potential
void mult_up(const int mu, Field &v, const Field &w)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
double flop_count()
this returns the number of floating point operations.
void set_config(unique_ptr< Field_G > &U)
Class for parameters.
Definition: parameters.h:46
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
void mult_up(const int mu, Field &v, const Field &w)
nearest neighbor hopping term: temporary entry [H.Matsufuru]
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field (2nd argument)
void mult_dn(const int mu, Field &v, const Field &w)
Wilson-type fermion field.
Definition: field_F.h:37
void mult_gm5(Field &v, const Field &w)
gamma_5 multiplication. [31 Mar 2017 H.Matsufuru]
double m_kappa
hopping parameter
Fopr_Wilson_Isochemical * m_fopr_w
Wilson fermion kernel.
Clover fermion operator with isospin chemical potential.
SU(N) gauge field.
Definition: field_G.h:38
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult(Field&, const Field&).
Wilson fermion operator with isospin chemical potential.
Bridge::VerboseLevel m_vl
Definition: fopr.h:127
void DdagD(Field &, const Field &)
static const std::string class_name
void Hdag(Field &, const Field &)
pointer get() const
std::vector< int > m_boundary
boundary conditions
void set_parameters(const Parameters &params)
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
void init(const std::string repr)
void Ddag(Field &, const Field &)
std::string m_mode
mode of multiplication
void mult_dn(const int mu, Field &v, const Field &w)
void crucial(const char *format,...)
Definition: bridgeIO.cpp:178
int field_nvol()
returns the volume for which the fermion operator is defined.
int m_NinF
internal parameters
void D(Field &, const Field &)
void H(Field &, const Field &)
std::string m_repr
gamma matrix representation
Base class of fermion operator family.
Definition: fopr.h:46
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)