10 void su2_a_0(
const LatticeReal&, LatticeReal& ,
11 const Subset& sub,
const int NmaxHB,
12 LatticeBoolean& lAccept);
13 void su2_a_0_kp(
const LatticeReal&, LatticeReal& ,
14 const Subset& sub,
const int NmaxHB,
15 LatticeBoolean& lAccept);
19 const Subset& sub,
const int NmaxHB)
31 v[sub]=u_mu*u_mu_staple;
34 multi1d<LatticeReal>
r(4);
44 SqDet[sub]=sqrt(
r[0]*
r[0]+
r[1]*
r[1]+
r[2]*
r[2]+
r[3]*
r[3]);
50 r[1][sub]=-
r[1]/SqDet;
51 r[2][sub]=-
r[2]/SqDet;
52 r[3][sub]=-
r[3]/SqDet;
54 LatticeBoolean lAccept;
58 multi1d<LatticeReal>
a(4);
61 LatticeReal CosTheta, Phi;
65 a_abs[sub] = 1.0-
a[0]*
a[0];
67 lbtmp[sub] = (a_abs >= 0);
68 lWarning=where(lbtmp,0,1);
69 iWarning=toInt(
sum(lWarning));
70 if(iWarning>0) QDPIO::cerr <<
"wrong a_0!!!"<<std::endl;
72 lbtmp[sub] = (a_abs > fuzz);
73 lWarning=where(lbtmp,0,1);
74 iWarning=toInt(
sum(lWarning));
75 if(iWarning>0) QDPIO::cerr <<
"large a_0!!!"<<std::endl;
81 CosTheta[sub]=1.0-2.0*CosTheta;
82 a[3][sub]=a_r*CosTheta;
86 CosTheta[sub]=(1-CosTheta*CosTheta);
87 CosTheta[sub]=sqrt(CosTheta);
90 Phi[sub]*=8.0*atan(1.0);
92 a[1][sub]=a_r*cos(Phi);
93 a[2][sub]=a_r*sin(Phi);
95 multi1d<LatticeReal>
b(4);
96 b[0][sub]=
a[0]*
r[0]-
a[1]*
r[1]-
a[2]*
r[2]-
a[3]*
r[3];
97 b[1][sub]=
a[0]*
r[1]+
a[1]*
r[0]-
a[2]*
r[3]+
a[3]*
r[2];
98 b[2][sub]=
a[0]*
r[2]+
a[2]*
r[0]-
a[3]*
r[1]+
a[1]*
r[3];
99 b[3][sub]=
a[0]*
r[3]+
a[3]*
r[0]-
a[1]*
r[2]+
a[2]*
r[1];
101 u_mu[sub]=where(lAccept,v*u_mu,u_mu);
105 void su2_a_0(
const LatticeReal& weight, LatticeReal& a_0,
106 const Subset& sub,
const int NmaxHB,
107 LatticeBoolean& lAccept)
110 int vol_cb = Layout::vol() >> 1;
115 w_exp[sub]=exp(-2.0*weight);
125 a_0[sub]=where(lAccept,a_0,1.0+log(w_exp*(1-
x)+
x)/weight);
133 LatticeReal a_0trial;
136 lAccept[sub] = where(lAccept,(1 > 0),(
x < a_0trial));
138 ilbtmp[sub]=where(lAccept,1,0);
139 vol_accept = toInt(
sum(ilbtmp));
140 }
while ((vol_accept < vol_cb) && ((NmaxHB <= 0) || (n_runs<NmaxHB)));
144 const Subset& sub,
const int NmaxHB,
145 LatticeBoolean& lAccept)
148 int vol_cb = Layout::vol() >> 1;
152 LatticeReal xr1,xr2,xr3,xr4;
160 xr1=-(log(xr1)/weight);
161 xr3 = cos(2.0l*
M_PI*xr3);
163 xr2=-(log(xr2)/weight);
165 a_0[sub]=where(lAccept,a_0,xr2+xr1*xr3);
166 lAccept[sub] = where(lAccept,(1 > 0),(xr4*xr4) < (1.0l-a_0/2.0l));
167 ilbtmp[sub]=where(lAccept,1,0);
168 vol_accept = toInt(
sum(ilbtmp));
171 }
while ((vol_accept < vol_cb) && ((NmaxHB <= 0) || (n_runs<NmaxHB)));
178 double temp,fuzz=1e-44;
179 const int nodeSites = Layout::sitesOnNode();
180 const int nodeNumber = Layout::nodeNumber();
181 for(
int i=0;
i<nodeSites;
i++) {
182 temp=toDouble(peekSite(a0,Layout::siteCoords(nodeNumber,
i)));
183 if(temp > fuzz || temp<-fuzz) std::cout<<temp<<
" ";
187 std::cout<<std::endl;
Primary include file for CHROMA library code.
void sunFill(LatticeColorMatrix &dest, const multi1d< LatticeReal > &r, int su2_index, const Subset &s)
Fill a dest(su2_index) <- r_0,r_1,r_2,r_3 under a subset.
void su2Extract(multi1d< LatticeReal > &r, const LatticeColorMatrix &source, int su2_index, const Subset &s)
Su2_extract: r_0,r_1,r_2,r_3 <- source(su2_index) [SU(N) field] under a subset.
Asqtad Staggered-Dirac operator.
void su2_a_0(const LatticeReal &, LatticeReal &, const Subset &sub, const int NmaxHB, LatticeBoolean &lAccept)
void su2_a_0_kp(const LatticeReal &, LatticeReal &, const Subset &sub, const int NmaxHB, LatticeBoolean &lAccept)
void print_field(const LatticeReal &a0)
void su2_hb_update(LatticeColorMatrix &u_mu, const LatticeColorMatrix &u_mu_staple, Double BetaMC, const int su2_index, const Subset &sub, const int NmaxHB)
FloatingPoint< double > Double
Fill an SU(Nc) matrix with an SU(2) submatrix.