Go to the documentation of this file.
18 #if defined USE_GROUP_SU3
20 #elif defined USE_GROUP_SU2
22 #elif defined USE_GROUP_SU_N
27 #ifdef USE_FACTORY_AUTOREGISTER
29 bool init = Fopr_Staggered_eo::register_factory();
136 const std::vector<int> bc)
138 assert(bc.size() ==
m_Ndim);
158 for (
int mu = 0; mu <
m_Ndim; ++mu) {
191 for (
int it = 0; it < Nt; ++it) {
192 int kt = it + ipet * Nt;
193 for (
int iz = 0; iz < Nz; ++iz) {
194 int kz = iz + ipez * Nz;
195 for (
int iy = 0; iy < Ny; ++iy) {
196 int ky = iy + ipey * Ny;
197 for (
int ix = 0; ix < Nx; ++ix) {
198 int kx = ix + ipex * Nx;
200 int is = idx_lex.
site(ix, iy, iz, it);
202 phase_lex.
set(0, is, 0, 1.0);
203 phase_lex.
set(0, is, 1, 1.0);
204 phase_lex.
set(0, is, 2, 1.0);
205 phase_lex.
set(0, is, 3, 1.0);
207 if (kx % 2 == 1) phase_lex.
set(0, is, 1, -1.0);
208 if ((kx + ky) % 2 == 1) phase_lex.
set(0, is, 2, -1.0);
209 if ((kx + ky + kz) % 2 == 1) phase_lex.
set(0, is, 3, -1.0);
228 const int mu,
const int ieo)
231 const int Nvol2 = Nvol / 2;
233 const int Nin = v.
nin();
234 const int Nex = v.
nex();
236 assert(v.
nvol() == Nvol2);
238 int ith, nth, is, ns;
239 set_threadtask(ith, nth, is, ns,
m_Nvol2);
242 for (
int ex = 0; ex < Nex; ++ex) {
243 for (
int site = is; site < ns; ++site) {
246 for (
int in = 0; in < Nin; ++in) {
247 double vt = ph * v.
cmp(in, site, ex);
248 v.
set(in, site, ex, vt);
261 }
else if (
m_mode ==
"Deo") {
263 }
else if (
m_mode ==
"Doe") {
265 }
else if (
m_mode ==
"Ddag") {
267 }
else if (
m_mode ==
"DdagD") {
283 }
else if (
m_mode ==
"Deo") {
285 }
else if (
m_mode ==
"Doe") {
287 }
else if (
m_mode ==
"Ddag") {
289 }
else if (
m_mode ==
"DdagD") {
305 if (ith == 0)
m_mode = mode;
312 const std::string mode)
316 }
else if (mode ==
"Deo") {
318 }
else if (mode ==
"Doe") {
320 }
else if ((mode ==
"Dee") || (mode ==
"Doo")) {
335 const std::string mode)
339 }
else if (mode ==
"Deo") {
341 }
else if (mode ==
"Doe") {
343 }
else if ((mode ==
"Dee") || (mode ==
"Doo")) {
394 int ith, nth, is, ns;
395 set_threadtask(ith, nth, is, ns,
m_Nvol);
399 for (
int mu = 0; mu <
m_Ndim; ++mu) {
400 for (
int site = is; site < ns; ++site) {
402 for (
int cc = 0; cc < Ncc; ++cc) {
477 const int ieo,
const int jd)
495 double fac = double(jd) * 0.5;
505 const int mu,
const int ieo)
510 double *vp = v.
ptr(0);
511 const double *wp =
m_t1.
ptr(0);
514 int ith, nth, is, ns;
515 set_threadtask(ith, nth, is, ns,
m_Nvol2);
517 for (
int site = is; site < ns; ++site) {
519 for (
int ic = 0; ic <
m_Nc; ++ic) {
520 int ic2 = ic *
m_Nvc;
522 wtr = mult_uv_r(&up[ic2 + Ndf * site2], &wp[
m_Nvc * site],
m_Nc);
523 wti = mult_uv_i(&up[ic2 + Ndf * site2], &wp[
m_Nvc * site],
m_Nc);
524 vp[2 * ic +
m_Nvc * site] += wtr;
525 vp[2 * ic + 1 +
m_Nvc * site] += wti;
535 const int mu,
const int ieo)
539 const double *wp = w.
ptr(0);
542 int ith, nth, is, ns;
543 set_threadtask(ith, nth, is, ns,
m_Nvol2);
547 for (
int site = is; site < ns; ++site) {
549 for (
int ic = 0; ic <
m_Nc; ++ic) {
552 wtr = mult_udagv_r(&up[ic2 + Ndf * site2], &wp[
m_Nvc * site],
m_Nc);
553 wti = mult_udagv_i(&up[ic2 + Ndf * site2], &wp[
m_Nvc * site],
m_Nc);
554 vp[2 * ic +
m_Nvc * site] = wtr;
555 vp[2 * ic + 1 +
m_Nvc * site] = wti;
581 if ((mode ==
"Deo") || (mode ==
"Doe")) {
582 flop_site = flop_site_Meo;
583 }
else if (mode ==
"D") {
584 flop_site =
m_Nvc * 2 + 2 * flop_site_Meo;
591 double flop_vol = double(Nvol2) * double(NPE);
593 double gflop = double(flop_site) * flop_vol * 1.0e-9;
void forward_h(Field &, const Field &, const int mu, const int ieo)
Methods to shift the even-odd field.
void set_string(const string &key, const string &value)
static int get_num_threads()
returns available number of threads.
void mult(Field &w, const Field &f)
multiplies fermion operator to a given field (2nd argument)
void set(const int jin, const int site, const int jex, double v)
void get_parameters(Parameters ¶ms) const
gets parameters by a Parameter object: to be implemented in a subclass.
void MeoMoe(Field &v, const Field &f)
D = m^2 - Deo * Doe.
void set_double(const string &key, const double value)
void set_ri(const int cc, const int site, const int mn, const double re, const double im)
void set_config_omp(Field *U)
void detailed(const char *format,...)
bool check_size(const int nin, const int nvol, const int nex) const
checking size parameters. [23 May 2016 H.Matsufuru]
std::string m_mode
mult mode
void Meo(Field &, const Field &, const int ieo, const int jd)
hopping term: ieo = 0: even <– odd, 1: odd <– even
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
void tidyup()
final clean-up.
void preProp(Field &, Field &, const Field &)
for even-odd solver: called before linear solver.
Bridge::VerboseLevel m_vl
verbose level
void copy(Field &y, const Field &x)
copy(y, x): y = x
void reverseField(Field &lex, const Field &eo)
void init()
initial setup.
int site(const int x2, const int y, const int z, const int t, const int ieo) const
Field m_v2
working vectors
Field m_staggered_phase
staggered phase
void convertField(Field &eo, const Field &lex)
int fetch_int_vector(const string &key, vector< int > &value) const
void backward_h(Field &, const Field &, const int mu, const int ieo)
void reset(const int Nvol, const int Nex)
int site(const int &x, const int &y, const int &z, const int &t) const
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=Element_type::COMPLEX)
void set_int_vector(const string &key, const vector< int > &value)
void set_config(Field *U)
setting pointer to the gauge configuration.
static const std::string class_name
double cmp(const int jin, const int site, const int jex) const
Field_G m_Ueo
even-odd gauge configuration
const double * ptr(const int jin, const int site, const int jex) const
void mult_dag(Field &w, const Field &f)
hermitian conjugate of mult(Field&, const Field&).
static Bridge::VerboseLevel Vlevel()
double cmp_r(const int cc, const int site, const int mn=0) const
static VerboseLevel set_verbose_level(const std::string &str)
double flop_count()
returns the number of floating point operations.
void mult_dn(Field &, const Field &, const int mu, const int ieo)
double cmp_i(const int cc, const int site, const int mn=0) const
void scal(Field &x, const double a)
scal(x, a): x = a * x
static int ipe(const int dir)
logical coordinate of current proc.
int fetch_string(const string &key, string &value) const
int fetch_double(const string &key, double &value) const
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void crucial(const char *format,...)
void mult_up(Field &, const Field &, const int mu, const int ieo)
Container of Field-type object.
static int get_thread_id()
returns thread id.
std::vector< int > m_boundary
boundary conditions
void set_config_impl(Field *U)
void set_parameters(const Parameters ¶ms)
sets parameters by a Parameter object: to be implemented in a subclass.
void general(const char *format,...)
void postProp(Field &, const Field &, const Field &)
for even-odd solver: called after linear solver.
void set_staggered_phase()
static void assert_single_thread(const std::string &class_name)
assert currently running on single thread.
void mult_staggered_phase(Field &, const int mu, const int ieo)
multiplied staggered phase with a given vector.
Field m_t2
working vectors
ShiftField_eo * m_shift_eo
static std::string get_verbose_level(const VerboseLevel vl)