Bridge++  Ver. 2.0.2
fopr_Staggered_eo.h
Go to the documentation of this file.
1 
10 #ifndef FOPR_STAGGERED_EO_INCLUDED
11 #define FOPR_STAGGERED_EO_INCLUDED
12 
13 #include "fopr_eo.h"
14 
15 #include "bridge_defs.h"
16 #include "Field/index_eo.h"
17 #include "Field/shiftField_eo.h"
18 
19 #include "IO/bridgeIO.h"
20 using Bridge::vout;
21 
23 
34 class Fopr_Staggered_eo : public Fopr_eo
35 {
36  public:
37  static const std::string class_name;
38 
39  private:
40  // input parameters
41  double m_mq;
42  std::vector<int> m_boundary;
44 
45  std::string m_mode;
46 
47  // internal data members
48  int m_Nc, m_Nvc;
50 
53 
55 
57 
60 
61  public:
62 
65 
67  Fopr_Staggered_eo(const Parameters& params) { init(params); }
68 
71 
72  void set_parameters(const Parameters& params);
73 
74  void set_parameters(const double mq, const std::vector<int> bc);
75 
76  void get_parameters(Parameters& params) const;
77 
78  void set_config(Field *U);
79 
80  void set_config_impl(Field *U);
81 
82  void set_config_omp(Field *U);
83 
84  void set_mode(const std::string mode);
85 
86  std::string get_mode() const { return m_mode; }
87 
88  void mult(Field& w, const Field& f);
89 
90  void mult_dag(Field& w, const Field& f);
91 
92  void mult(Field& w, const Field& f, const std::string mode);
93 
94  void mult_dag(Field& w, const Field& f, const std::string mode);
95 
97  void preProp(Field&, Field&, const Field&);
98 
100  void postProp(Field&, const Field&, const Field&);
101 
103  void MeoMoe(Field& v, const Field& f);
104 
106  void Meo(Field&, const Field&, const int ieo, const int jd);
107 
109  void mult_staggered_phase(Field&, const int mu, const int ieo);
110 
111  int field_nin() { return 2 * m_Nc; }
112 
113  int field_nvol() { return m_Nvol2; }
114 
115  int field_nex() { return 1; }
116 
118  double flop_count() { return flop_count(m_mode); }
119 
121  double flop_count(const std::string mode);
122 
123  private:
125  void init();
126 
128  void init(const Parameters& params);
129 
130  void setup();
131 
133  void tidyup();
134 
135  void set_staggered_phase();
136 
137  void mult_up(Field&, const Field&, const int mu, const int ieo);
138 
139  void mult_dn(Field&, const Field&, const int mu, const int ieo);
140 
141 
142 #ifdef USE_FACTORY
143  private:
144  static Fopr *create_object() { return new Fopr_Staggered_eo(); }
145 
146  static Fopr *create_object_with_params(const Parameters& params)
147  { return new Fopr_Staggered_eo(params); }
148 
149  public:
150  static bool register_factory()
151  {
152  bool init = true;
153  init &= Fopr::Factory_noarg::Register("Staggered_eo", create_object);
154  init &= Fopr::Factory_params::Register("Staggered_eo",
155  create_object_with_params);
156  return init;
157  }
158 #endif
159 };
160 #endif
bridgeIO.h
ShiftField_eo
Methods to shift the even-odd field.
Definition: shiftField_eo.h:49
AFopr< Field >
Fopr_Staggered_eo::mult
void mult(Field &w, const Field &f)
multiplies fermion operator to a given field (2nd argument)
Definition: fopr_Staggered_eo.cpp:257
Parameters
Class for parameters.
Definition: parameters.h:46
Fopr_Staggered_eo::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Staggered_eo.cpp:165
AFopr_eo
Base class of fermion operator family.
Definition: afopr_eo.h:35
Fopr_Staggered_eo
Even-odd staggered fermion operator.
Definition: fopr_Staggered_eo.h:34
Fopr_Staggered_eo::m_t1
Field m_t1
Definition: fopr_Staggered_eo.h:58
Fopr_Staggered_eo::MeoMoe
void MeoMoe(Field &v, const Field &f)
D = m^2 - Deo * Doe.
Definition: fopr_Staggered_eo.cpp:461
Fopr_Staggered_eo::set_config_omp
void set_config_omp(Field *U)
Definition: fopr_Staggered_eo.cpp:376
Fopr_Staggered_eo::field_nvol
int field_nvol()
returns the volume for which the fermion operator is defined.
Definition: fopr_Staggered_eo.h:113
Fopr_Staggered_eo::m_mode
std::string m_mode
mult mode
Definition: fopr_Staggered_eo.h:45
Index_eo
Even-odd site index.
Definition: index_eo.h:44
Fopr_Staggered_eo::field_nin
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
Definition: fopr_Staggered_eo.h:111
Fopr_Staggered_eo::Meo
void Meo(Field &, const Field &, const int ieo, const int jd)
hopping term: ieo = 0: even <– odd, 1: odd <– even
Definition: fopr_Staggered_eo.cpp:476
Fopr_Staggered_eo::get_mode
std::string get_mode() const
Definition: fopr_Staggered_eo.h:86
Fopr_Staggered_eo::tidyup
void tidyup()
final clean-up.
Definition: fopr_Staggered_eo.cpp:99
Fopr_Staggered_eo::preProp
void preProp(Field &, Field &, const Field &)
for even-odd solver: called before linear solver.
Definition: fopr_Staggered_eo.cpp:414
Fopr_Staggered_eo::m_vl
Bridge::VerboseLevel m_vl
verbose level
Definition: fopr_Staggered_eo.h:43
shiftField_eo.h
Fopr_Staggered_eo::init
void init()
initial setup.
Definition: fopr_Staggered_eo.cpp:55
Fopr_Staggered_eo::m_v1
Field m_v1
Definition: fopr_Staggered_eo.h:59
fopr_eo.h
Fopr_Staggered_eo::m_Nvol
int m_Nvol
Definition: fopr_Staggered_eo.h:49
Fopr_Staggered_eo::setup
void setup()
Definition: fopr_Staggered_eo.cpp:73
Fopr_Staggered_eo::Fopr_Staggered_eo
Fopr_Staggered_eo(const Parameters &params)
constructor with a Paramters object.
Definition: fopr_Staggered_eo.h:67
Fopr_Staggered_eo::m_v2
Field m_v2
working vectors
Definition: fopr_Staggered_eo.h:59
Fopr_Staggered_eo::m_staggered_phase
Field m_staggered_phase
staggered phase
Definition: fopr_Staggered_eo.h:52
Fopr_Staggered_eo::m_Nvc
int m_Nvc
Definition: fopr_Staggered_eo.h:48
Fopr_Staggered_eo::m_index_eo
Index_eo m_index_eo
Definition: fopr_Staggered_eo.h:54
Fopr_Staggered_eo::set_config
void set_config(Field *U)
setting pointer to the gauge configuration.
Definition: fopr_Staggered_eo.cpp:357
Fopr_Staggered_eo::Fopr_Staggered_eo
DEPRECATED Fopr_Staggered_eo()
Definition: fopr_Staggered_eo.h:64
Fopr_Staggered_eo::class_name
static const std::string class_name
Definition: fopr_Staggered_eo.h:37
Fopr_Staggered_eo::m_Ueo
Field_G m_Ueo
even-odd gauge configuration
Definition: fopr_Staggered_eo.h:51
Fopr_Staggered_eo::mult_dag
void mult_dag(Field &w, const Field &f)
hermitian conjugate of mult(Field&, const Field&).
Definition: fopr_Staggered_eo.cpp:279
Fopr_Staggered_eo::flop_count
double flop_count()
returns the number of floating point operations.
Definition: fopr_Staggered_eo.h:118
Fopr_Staggered_eo::mult_dn
void mult_dn(Field &, const Field &, const int mu, const int ieo)
Definition: fopr_Staggered_eo.cpp:534
Fopr_Staggered_eo::m_Nc
int m_Nc
Definition: fopr_Staggered_eo.h:48
Fopr_Staggered_eo::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_Staggered_eo.cpp:301
index_eo.h
Fopr_Staggered_eo::m_Ndim
int m_Ndim
Definition: fopr_Staggered_eo.h:49
Fopr_Staggered_eo::mult_up
void mult_up(Field &, const Field &, const int mu, const int ieo)
Definition: fopr_Staggered_eo.cpp:504
Fopr_Staggered_eo::field_nex
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
Definition: fopr_Staggered_eo.h:115
Field
Container of Field-type object.
Definition: field.h:46
Fopr_Staggered_eo::m_boundary
std::vector< int > m_boundary
boundary conditions
Definition: fopr_Staggered_eo.h:42
Fopr_Staggered_eo::set_config_impl
void set_config_impl(Field *U)
Definition: fopr_Staggered_eo.cpp:388
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Fopr_Staggered_eo::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Staggered_eo.cpp:106
Fopr_Staggered_eo::m_mq
double m_mq
fermion mass
Definition: fopr_Staggered_eo.h:41
Fopr_Staggered_eo::m_Nvol2
int m_Nvol2
Definition: fopr_Staggered_eo.h:49
Fopr_Staggered_eo::postProp
void postProp(Field &, const Field &, const Field &)
for even-odd solver: called after linear solver.
Definition: fopr_Staggered_eo.cpp:436
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Fopr_Staggered_eo::set_staggered_phase
void set_staggered_phase()
Definition: fopr_Staggered_eo.cpp:175
bridge_defs.h
Fopr_Staggered_eo::mult_staggered_phase
void mult_staggered_phase(Field &, const int mu, const int ieo)
multiplied staggered phase with a given vector.
Definition: fopr_Staggered_eo.cpp:227
Fopr_Staggered_eo::m_t2
Field m_t2
working vectors
Definition: fopr_Staggered_eo.h:58
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Fopr_Staggered_eo::m_shift_eo
ShiftField_eo * m_shift_eo
Definition: fopr_Staggered_eo.h:56
Fopr_Staggered_eo::~Fopr_Staggered_eo
~Fopr_Staggered_eo()
deconstructor.
Definition: fopr_Staggered_eo.h:70