Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gaugeConfig_SF.cpp
Go to the documentation of this file.
1 
14 #include "gaugeConfig_SF.h"
15 
20 const std::string GaugeConfig_SF::class_name = "GaugeConfig_SF";
21 
22 //====================================================================
23 void GaugeConfig_SF::set_cold_SF(Field *U, double *phi, double *phipr)
24 {
25  int Nc = CommonParameters::Nc();
26  int Nvol = CommonParameters::Nvol();
27  int Ndim = CommonParameters::Ndim();
28  int Nx = CommonParameters::Nx();
29  int Ny = CommonParameters::Ny();
30  int Nz = CommonParameters::Nz();
31  int Nt = CommonParameters::Nt();
32  int Lx = CommonParameters::Lx();
33  int Ly = CommonParameters::Ly();
34  int Lz = CommonParameters::Lz();
35  int Lt = CommonParameters::Lt();
36  int NPEt = CommonParameters::NPEt();
37 
38  Index_lex idx;
39  int site;
40  Field_G *up = (Field_G *)U;
41  Mat_SU_N ut(Nc);
42 
43  ut.unit();
44  Mat_SU_N utree(Nc);
45  utree.zero();
46  double sr, si;
47 
48  for (int t = 0; t < Nt; t++) {
49  sr = cos((phi[0] + (phipr[0] - phi[0]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
50  si = sin((phi[0] + (phipr[0] - phi[0]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
51  utree.set(0, 0, sr, si);
52  sr = cos((phi[1] + (phipr[1] - phi[1]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
53  si = sin((phi[1] + (phipr[1] - phi[1]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
54  utree.set(1, 1, sr, si);
55  sr = cos((phi[2] + (phipr[2] - phi[2]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
56  si = sin((phi[2] + (phipr[2] - phi[2]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
57  utree.set(2, 2, sr, si);
58  for (int z = 0; z < Nz; z++) {
59  for (int y = 0; y < Ny; y++) {
60  for (int x = 0; x < Nx; x++) {
61  site = idx.site(x, y, z, t);
62  for (int mu = 0; mu < Ndim - 1; ++mu) {
63  up->set_mat(site, mu, utree);
64  }
65  }
66  }
67  }
68  }
69  {
70  int mu = Ndim - 1;
71  for (int site = 0; site < Nvol; ++site) {
72  up->set_mat(site, mu, ut);
73  }
74  }
75 
76  vout.detailed(m_vl, "%s: gauge config. was set to the tree level value with SF BC.\n", class_name.c_str());
77 }
78 
79 
80 //====================================================================
81 //============================================================END=====
BridgeIO vout
Definition: bridgeIO.cpp:503
void detailed(const char *format,...)
Definition: bridgeIO.cpp:216
int site(const int &x, const int &y, const int &z, const int &t) const
Definition: index_lex.h:53
Mat_SU_N & zero()
Definition: mat_SU_N.h:383
Container of Field-type object.
Definition: field.h:45
static int ipe(const int dir)
logical coordinate of current proc.
SU(N) gauge field.
Definition: field_G.h:38
Bridge::VerboseLevel m_vl
Definition: gaugeConfig.h:115
Lexical site index.
Definition: index_lex.h:34
Mat_SU_N & unit()
Definition: mat_SU_N.h:373
void set_cold_SF(Field *U, double *phi, double *phipr)
void set(int c, double re, const double &im)
Definition: mat_SU_N.h:133
void set_mat(const int site, const int mn, const Mat_SU_N &U)
Definition: field_G.h:160
static const std::string class_name