Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
field_G_SF.h
Go to the documentation of this file.
1 
15 #ifndef FIELD_G_SF_INCLUDED
16 #define FIELD_G_SF_INCLUDED
17 
18 #include "Parameters/parameters.h"
19 #include "field_G.h"
20 
22 
33 class Field_G_SF : public Field_G
34 {
35  private:
37  int m_Nc;
39  int m_Ndf;
41  int m_Nvol;
43  int m_Nex;
44 
46  int m_NPEt;
47 
52 
53  public:
54  // Field_G_SF(){}
55  Field_G_SF(const int Nvol = CommonParameters::Nvol(), const int Nex = 1) :
56  m_Nc(CommonParameters::Nc()), m_Nvol(Nvol), m_Nex(Nex),
57  m_wk(m_Nc), m_wkpr(m_Nc)
58  {
64  m_Svol = m_Nx * m_Ny * m_Nz;
65  m_Ndf = 2 * m_Nc * m_Nc;
67  }
68 
69  Field_G_SF(const Field& x) :
70  Field_G(x),
71  m_Nc(CommonParameters::Nc()), m_Ndf(x.nin()), m_Nvol(x.nvol()), m_Nex(x.nex()),
72  m_wk(m_Nc), m_wkpr(m_Nc)
73  {
74  assert(m_Ndf == 2 * m_Nc * m_Nc);
80  m_Svol = m_Nx * m_Ny * m_Nz;
81  }
82 
83  Field_G_SF(double *phi, double *phipr) :
85  {
86  const int Lx = CommonParameters::Lx();
87 
88  m_Nex = 1;
95  m_Svol = m_Nx * m_Ny * m_Nz;
96  m_Ndf = 2 * m_Nc * m_Nc;
97 
98  double c0r = cos(phi[0] / Lx);
99  double c0i = sin(phi[0] / Lx);
100  double c1r = cos(phi[1] / Lx);
101  double c1i = sin(phi[1] / Lx);
102  double c2r = cos(phi[2] / Lx);
103  double c2i = sin(phi[2] / Lx);
104  m_wk.zero();
105  m_wk.set(0, 0, c0r, c0i);
106  m_wk.set(1, 1, c1r, c1i);
107  m_wk.set(2, 2, c2r, c2i);
108 
109  c0r = cos(phipr[0] / Lx);
110  c0i = sin(phipr[0] / Lx);
111  c1r = cos(phipr[1] / Lx);
112  c1i = sin(phipr[1] / Lx);
113  c2r = cos(phipr[2] / Lx);
114  c2i = sin(phipr[2] / Lx);
115  m_wkpr.zero();
116  m_wkpr.set(0, 0, c0r, c0i);
117  m_wkpr.set(1, 1, c1r, c1i);
118  m_wkpr.set(2, 2, c2r, c2i);
119  }
120 
121  Field_G_SF& operator=(const Field_G_SF& v) { copy(*this, v); return *this; }
122 
124  void set_parameters(const std::vector<double>& phi,
125  const std::vector<double>& phipr);
126 
128  void set_parameters(double *phi, double *phipr);
129 
131  void set_boundary_wk(const Mat_SU_N& U);
132 
134  void set_boundary_wkpr(const Mat_SU_N& U);
135 
137  void set_boundary_zero();
138 
141 
143  void mult_ct_boundary(const int t, const double ct);
144 
145 
147  void set_boundary_wk(Field_G& f);
148 
150  void set_boundary_wkpr(Field_G& f);
151 
153  void set_boundary_zero(Field_G& f);
154 
157 };
158 #endif
SU(N) gauge field class in which a few functions are added for the SF.
Definition: field_G_SF.h:33
Field_G_SF & operator=(const Field_G_SF &v)
Definition: field_G_SF.h:121
void set_boundary_zero()
Set the boundary matrix to 0 for SF bc.
Definition: field_G_SF.cpp:78
void set_boundary_wkpr(const Mat_SU_N &U)
Set the boundary spatial link at t=Nt-1 for SF bc.
Definition: field_G_SF.cpp:53
Field_G_SF(const Field &x)
Definition: field_G_SF.h:69
int m_NPEt
Definition: field_G_SF.h:46
Mat_SU_N & zero()
Definition: mat_SU_N.h:383
Container of Field-type object.
Definition: field.h:45
friend void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition: field.cpp:532
int nvol() const
Definition: field.h:127
Field_G_SF(const int Nvol=CommonParameters::Nvol(), const int Nex=1)
Definition: field_G_SF.h:55
int nin() const
Definition: field.h:126
Field_G_SF(double *phi, double *phipr)
Definition: field_G_SF.h:83
void set_boundary_spatial_link_zero()
Set the boundary spatial link to 0 for SF bc.
Definition: field_G_SF.cpp:102
SU(N) gauge field.
Definition: field_G.h:38
int m_Nex
extra degree of freedom, such as mu, nu.
Definition: field_G_SF.h:43
Mat_SU_N m_wk
SF boundary condition at t=0.
Definition: field_G_SF.h:49
void set_parameters(const std::vector< double > &phi, const std::vector< double > &phipr)
Set the parameter by giving vector objects.
Definition: field_G_SF.cpp:245
int m_Svol
Definition: field_G_SF.h:45
void mult_ct_boundary(const int t, const double ct)
Multiply the boundary improvement factor ct or ctr to an SU(N) matrix object which belongs to a site ...
Definition: field_G_SF.cpp:128
void set_boundary_wk(const Mat_SU_N &U)
Set the boundary spatial link at t=0 for SF bc.
Definition: field_G_SF.cpp:27
int nex() const
Definition: field.h:128
Common parameter class: provides parameters as singleton.
Mat_SU_N m_wkpr
SF boundary condition at t=Nt.
Definition: field_G_SF.h:51
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=Element_type::COMPLEX)
Definition: field.h:95
int m_Nc
number of color elements
Definition: field_G_SF.h:37
int m_Nvol
number of sites
Definition: field_G_SF.h:41
void set(int c, double re, const double &im)
Definition: mat_SU_N.h:133
int m_Ndf
number of components as real values
Definition: field_G_SF.h:39