11 typedef multi1d<LatticeColorMatrix>
U;
13 int main(
int argc,
char **argv)
18 multi1d<int> nrow(
Nd);
20 nrow[0] = nrow[1] = nrow[2] = 4;
23 Layout::setLattSize(nrow);
28 multi1d<LatticeColorMatrix>
u(
Nd);
46 Real coeff_p_s = -0.5;
47 Real coeff_p_t = -0.4;
48 Real coeff_2plaq = -0.6;
57 Double S_all_S = S_all.
S(gstate);
58 Double S_old_S = S_plaq.
S(gstate)+S_pp.
S(gstate);
60 Double norm_diff = ( S_all_S - S_old_S ) / S_old_S;
62 QDPIO::cout <<
"( S_new - S_old ) / S_old = " << norm_diff << std::endl;
68 S_all.
deriv(F_new, gstate);
69 S_plaq.
deriv(F_old, gstate);
70 S_pp.
deriv(F_tmp, gstate);
72 F_old[
mu] += F_tmp[
mu];
76 LatticeColorMatrix f_d = F_new[
mu]- F_old[
mu];
78 QDPIO::cout <<
" F_old = " << sqrt(norm2(F_old[
mu])) <<
" F_new=" << sqrt(norm2(F_new[
mu])) <<
" (F_new-F_old) = " << sqrt(norm2(f_d)) <<
" (F_new - F_old) / F_old = " << sqrt(norm2(f_d)/norm2(F_old[
mu]))<< std::endl;
82 Real u_s = Real(0.75793);
84 Real
beta = Real(1.5);
87 Real u_s_2 = u_s * u_s;
88 Real u_s_4 = u_s_2 * u_s_2;
89 Real u_s_6 = u_s_4 * u_s_2;
90 Real u_s_8 = u_s_4 * u_s_4;
93 Real u_t_2 = u_t * u_t;
94 Real u_t_4 = u_t_2 * u_t_2;
97 Real plaq_c_s =
beta * Real(5) * ( Real(1) +
omega ) / ( Real(3) * u_s_4 );
98 Real plaq_c_t =
beta * Real(4) / ( Real(3) * u_s_2 * u_t_2 );
99 coeff_2plaq = Real(-5)*
beta*
omega/(Real(3)*u_s_8);
100 Real rect_c_s = -
beta / ( Real(12)*u_s_6 );
101 Real rect_c_t_2 = -
beta / ( Real(12)*u_s_4*u_t_2);
104 bool no_temporal_2link =
true;
109 RectGaugeAct S_r(cgs, rect_c_s, rect_c_t_1, rect_c_t_2, no_temporal_2link, aniso);
120 Double S_candidate = S_p_1.
S(gstate)+S_pp_1.
S(gstate)+S_r.
S(gstate);
121 Double S_ref = S_aniso.
S(gstate);
123 QDPIO::cout <<
" S_candidate ="<< S_candidate <<
" S_aniso=" << S_ref <<
" diff =" << S_candidate - S_ref <<
" Rel_diff=" << (S_candidate - S_ref)/S_ref << std::endl;
125 S_aniso.
deriv(F_new, gstate);
126 S_p_1.
deriv(F_old, gstate);
127 S_pp_1.
deriv(F_tmp, gstate);
129 F_old[
mu] += F_tmp[
mu];
131 S_r.
deriv(F_tmp, gstate);
133 F_old[
mu] += F_tmp[
mu];
137 LatticeColorMatrix f_d = F_new[
mu]- F_old[
mu];
139 QDPIO::cout <<
" F_old = " << sqrt(norm2(F_old[
mu])) <<
" F_new=" << sqrt(norm2(F_new[
mu])) <<
" (F_new-F_old) = " << sqrt(norm2(f_d)) <<
" (F_new - F_old) / F_old = " << sqrt(norm2(f_d)/norm2(F_old[
mu]))<< std::endl;
Anisotropic gaugeact useful for spectrum from hep-lat/9911003.
Primary include file for CHROMA in application codes.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
Create a simple gauge connection state.
virtual GaugeState< P, Q > * createState(const Q &q) const
Given links, create the state.
Class for counted reference semantics.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
static const LatticeInteger & beta(const int dim)
static multi1d< LatticeColorMatrix > u
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
FloatingPoint< double > Double
Periodic gauge boundary conditions.
Simple gauge state and a creator.
Parameters for anisotropy.
Gauge configuration structure.
int main(int argc, char **argv)
multi1d< LatticeColorMatrix > U