Bridge++  Ver. 2.0.2
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_G& U, double phi[3], double phipr[3])
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  Mat_SU_N ut(Nc);
41 
42  ut.unit();
43  Mat_SU_N utree(Nc);
44  utree.zero();
45  double sr, si;
46 
47  for (int t = 0; t < Nt; t++) {
48  sr = cos((phi[0] + (phipr[0] - phi[0]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
49  si = sin((phi[0] + (phipr[0] - phi[0]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
50  utree.set(0, 0, sr, si);
51  sr = cos((phi[1] + (phipr[1] - phi[1]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
52  si = sin((phi[1] + (phipr[1] - phi[1]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
53  utree.set(1, 1, sr, si);
54  sr = cos((phi[2] + (phipr[2] - phi[2]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
55  si = sin((phi[2] + (phipr[2] - phi[2]) / Lt * (t + (Communicator::ipe(3)) * Nt)) / Lx);
56  utree.set(2, 2, sr, si);
57  for (int z = 0; z < Nz; z++) {
58  for (int y = 0; y < Ny; y++) {
59  for (int x = 0; x < Nx; x++) {
60  site = idx.site(x, y, z, t);
61  for (int mu = 0; mu < Ndim - 1; ++mu) {
62  U.set_mat(site, mu, utree);
63  }
64  }
65  }
66  }
67  }
68  {
69  int mu = Ndim - 1;
70  for (int site = 0; site < Nvol; ++site) {
71  U.set_mat(site, mu, ut);
72  }
73  }
74 
75  vout.detailed(m_vl, "%s: gauge config. was set to the tree level value with SF BC.\n", class_name.c_str());
76 }
77 
78 
79 //====================================================================
80 //============================================================END=====
CommonParameters::Ny
static int Ny()
Definition: commonParameters.h:106
CommonParameters::Nz
static int Nz()
Definition: commonParameters.h:107
Index_lex
Lexical site index.
Definition: index_lex.h:34
CommonParameters::Ndim
static int Ndim()
Definition: commonParameters.h:117
GaugeConfig_SF::class_name
static const std::string class_name
Definition: gaugeConfig_SF.h:44
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:219
Field_G::set_mat
void set_mat(const int site, const int mn, const Mat_SU_N &U)
Definition: field_G.h:160
CommonParameters::Ly
static int Ly()
Definition: commonParameters.h:92
CommonParameters::Nvol
static int Nvol()
Definition: commonParameters.h:109
gaugeConfig_SF.h
SU_N::Mat_SU_N::unit
Mat_SU_N & unit()
Definition: mat_SU_N.h:419
SU_N::Mat_SU_N::set
void set(int c, const double &re, const double &im)
Definition: mat_SU_N.h:137
CommonParameters::Nx
static int Nx()
Definition: commonParameters.h:105
CommonParameters::Lt
static int Lt()
Definition: commonParameters.h:94
CommonParameters::Lx
static int Lx()
Definition: commonParameters.h:91
CommonParameters::Nc
static int Nc()
Definition: commonParameters.h:115
SU_N::Mat_SU_N::zero
Mat_SU_N & zero()
Definition: mat_SU_N.h:429
CommonParameters::Lz
static int Lz()
Definition: commonParameters.h:93
CommonParameters::Nt
static int Nt()
Definition: commonParameters.h:108
SU_N::Mat_SU_N
Definition: mat_SU_N.h:36
AIndex_eo_qxs::idx
int idx(const int in, const int Nin, const int ist, const int Nx2, const int Ny, const int leo, const int Nvol2, const int ex)
Definition: aindex_eo.h:27
GaugeConfig::m_vl
Bridge::VerboseLevel m_vl
Definition: gaugeConfig.h:107
Communicator::ipe
static int ipe(const int dir)
logical coordinate of current proc.
Definition: communicator.cpp:105
CommonParameters::NPEt
static int NPEt()
Definition: commonParameters.h:100
Field_G
SU(N) gauge field.
Definition: field_G.h:38
GaugeConfig_SF::set_cold_SF
void set_cold_SF(Field_G &U, double phi[3], double phipr[3])
Definition: gaugeConfig_SF.cpp:23
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512