Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gaugeConfig_SF.cpp
Go to the documentation of this file.
1 
15 #include "gaugeConfig_SF.h"
16 
17 #include "commonParameters.h"
18 #include "communicator.h"
19 #include "bridgeIO.h"
20 using Bridge::vout;
21 
22 #include "field.h"
23 #include "field_G.h"
24 
29 const std::string GaugeConfig_SF::class_name = "GaugeConfig_SF";
30 
31 //====================================================================
32 void GaugeConfig_SF::set_cold_SF(Field *U, double *phi, double *phipr)
33 {
34  int Nc = CommonParameters::Nc();
35  int Nvol = CommonParameters::Nvol();
36  int Ndim = CommonParameters::Ndim();
37  int Nx = CommonParameters::Nx();
38  int Ny = CommonParameters::Ny();
39  int Nz = CommonParameters::Nz();
40  int Nt = CommonParameters::Nt();
41  int Lx = CommonParameters::Lx();
42  int Ly = CommonParameters::Ly();
43  int Lz = CommonParameters::Lz();
44  int Lt = CommonParameters::Lt();
45  int NPEt = CommonParameters::NPEt();
46 
47  Index_lex idx;
48  int site;
49  Field_G *up = (Field_G *)U;
50  Mat_SU_N ut(Nc);
51 
52  ut.unit();
53  Mat_SU_N utree(Nc);
54  utree.zero();
55  double sr, si;
56 
57  for (int t = 0; t < Nt; t++) {
58  sr = cos((phi[0] + (phipr[0] - phi[0]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
59  si = sin((phi[0] + (phipr[0] - phi[0]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
60  utree.set(0, 0, sr, si);
61  sr = cos((phi[1] + (phipr[1] - phi[1]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
62  si = sin((phi[1] + (phipr[1] - phi[1]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
63  utree.set(1, 1, sr, si);
64  sr = cos((phi[2] + (phipr[2] - phi[2]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
65  si = sin((phi[2] + (phipr[2] - phi[2]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
66  utree.set(2, 2, sr, si);
67  for (int z = 0; z < Nz; z++) {
68  for (int y = 0; y < Ny; y++) {
69  for (int x = 0; x < Nx; x++) {
70  site = idx.site(x, y, z, t);
71  for (int mu = 0; mu < Ndim - 1; ++mu) {
72  up->set_mat(site, mu, utree);
73  }
74  }
75  }
76  }
77  }
78  {
79  int mu = Ndim - 1;
80  for (int site = 0; site < Nvol; ++site) {
81  up->set_mat(site, mu, ut);
82  }
83  }
84 
85  vout.detailed(m_vl, "gauge config. was set to the tree level value with SF BC.\n");
86 }
87 
88 
89 //====================================================================
90 //============================================================END=====
BridgeIO vout
Definition: bridgeIO.cpp:207
void detailed(const char *format,...)
Definition: bridgeIO.cpp:50
static int NPEt()
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:37
static int ipe(const int dir)
logical coordinate of current proc.
SU(N) gauge field.
Definition: field_G.h:36
Bridge::VerboseLevel m_vl
Definition: gaugeConfig.h:96
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:156
static const std::string class_name