Bridge++  Ver. 1.1.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 
28 //====================================================================
29 void GaugeConfig_SF::set_cold_SF(Field *U, double *phi, double *phipr)
30 {
31  int Nc = CommonParameters::Nc();
32  int Nvol = CommonParameters::Nvol();
33  int Ndim = CommonParameters::Ndim();
34  int Nx = CommonParameters::Nx();
35  int Ny = CommonParameters::Ny();
36  int Nz = CommonParameters::Nz();
37  int Nt = CommonParameters::Nt();
38  int Lx = CommonParameters::Lx();
39  int Ly = CommonParameters::Ly();
40  int Lz = CommonParameters::Lz();
41  int Lt = CommonParameters::Lt();
42  int NPEt = CommonParameters::NPEt();
43 
44  Index_lex idx;
45  int site;
46  Field_G *up = (Field_G *)U;
47  Mat_SU_N ut(Nc);
48 
49  ut.unit();
50  Mat_SU_N utree(Nc);
51  utree.zero();
52  double sr, si;
53 
54  for (int t = 0; t < Nt; t++) {
55  sr = cos((phi[0] + (phipr[0] - phi[0]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
56  si = sin((phi[0] + (phipr[0] - phi[0]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
57  utree.set(0, 0, sr, si);
58  sr = cos((phi[1] + (phipr[1] - phi[1]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
59  si = sin((phi[1] + (phipr[1] - phi[1]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
60  utree.set(1, 1, sr, si);
61  sr = cos((phi[2] + (phipr[2] - phi[2]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
62  si = sin((phi[2] + (phipr[2] - phi[2]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
63  utree.set(2, 2, sr, si);
64  for (int z = 0; z < Nz; z++) {
65  for (int y = 0; y < Ny; y++) {
66  for (int x = 0; x < Nx; x++) {
67  site = idx.site(x, y, z, t);
68  for (int mu = 0; mu < Ndim - 1; ++mu) {
69  up->set_mat(site, mu, utree);
70  }
71  }
72  }
73  }
74  }
75  {
76  int mu = Ndim - 1;
77  for (int site = 0; site < Nvol; ++site) {
78  up->set_mat(site, mu, ut);
79  }
80  }
81 
82  vout.detailed(m_vl, "gauge config. was set to the tree level value with SF BC.\n");
83 }
84 
85 
86 //====================================================================
87 //============================================================END=====