QUDA v0.3.2
A library for QCD on GPUs

quda/tests/fermion_force_reference.cpp

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <math.h>
00004 #include <string.h>
00005 
00006 #include "quda.h"
00007 #include "test_util.h"
00008 #include "misc.h"
00009 #include "fermion_force_reference.h"
00010 
00011 extern int Z[4];
00012 extern int V;
00013 extern int Vh;
00014 
00015 
00016 #define CADD(a,b,c) { (c).real = (a).real + (b).real;   \
00017         (c).imag = (a).imag + (b).imag; }
00018 #define CMUL(a,b,c) { (c).real = (a).real*(b).real - (a).imag*(b).imag; \
00019                       (c).imag = (a).real*(b).imag + (a).imag*(b).real; }
00020 #define CSUM(a,b) { (a).real += (b).real; (a).imag += (b).imag; }
00021 
00022 /* c = a* * b */
00023 #define CMULJ_(a,b,c) { (c).real = (a).real*(b).real + (a).imag*(b).imag; \
00024                         (c).imag = (a).real*(b).imag - (a).imag*(b).real; }
00025 
00026 /* c = a * b* */
00027 #define CMUL_J(a,b,c) { (c).real = (a).real*(b).real + (a).imag*(b).imag; \
00028                         (c).imag = (a).imag*(b).real - (a).real*(b).imag; }
00029 
00030 #define CONJG(a,b) { (b).real = (a).real; (b).imag = -(a).imag; }
00031 
00032 typedef struct {   
00033     float real;    
00034     float imag; 
00035 } fcomplex;  
00036 
00037 /* specific for double complex */
00038 typedef struct {
00039     double real;
00040     double imag;
00041 } dcomplex;
00042 
00043 typedef struct { fcomplex e[3][3]; } fsu3_matrix;
00044 typedef struct { fcomplex c[3]; } fsu3_vector;
00045 typedef struct { dcomplex e[3][3]; } dsu3_matrix;
00046 typedef struct { dcomplex c[3]; } dsu3_vector;
00047 
00048 typedef struct { 
00049     fcomplex m01,m02,m12; 
00050     float m00im,m11im,m22im; 
00051     float space; 
00052 } fanti_hermitmat;
00053 
00054 typedef struct { 
00055     dcomplex m01,m02,m12; 
00056     double m00im,m11im,m22im; 
00057     double space; 
00058 } danti_hermitmat;
00059 
00060 typedef struct { fsu3_vector h[2]; } fhalf_wilson_vector;
00061 typedef struct { dsu3_vector h[2]; } dhalf_wilson_vector;
00062 
00063 
00064 template<typename su3_matrix>
00065 static void  
00066 su3_adjoint( su3_matrix *a, su3_matrix *b )
00067 {
00068     int i,j;
00069     for(i=0;i<3;i++)for(j=0;j<3;j++){
00070             CONJG( a->e[j][i], b->e[i][j] );
00071         }
00072 }
00073 
00074 
00075 template<typename su3_matrix, typename anti_hermitmat>
00076 static void
00077 make_anti_hermitian( su3_matrix *m3, anti_hermitmat *ah3 ) 
00078 {
00079     
00080     typeof(ah3->m00im) temp =
00081         (m3->e[0][0].imag + m3->e[1][1].imag + m3->e[2][2].imag)*0.33333333333333333;
00082     ah3->m00im = m3->e[0][0].imag - temp;
00083     ah3->m11im = m3->e[1][1].imag - temp;
00084     ah3->m22im = m3->e[2][2].imag - temp;
00085     ah3->m01.real = (m3->e[0][1].real - m3->e[1][0].real)*0.5;
00086     ah3->m02.real = (m3->e[0][2].real - m3->e[2][0].real)*0.5;
00087     ah3->m12.real = (m3->e[1][2].real - m3->e[2][1].real)*0.5;
00088     ah3->m01.imag = (m3->e[0][1].imag + m3->e[1][0].imag)*0.5;
00089     ah3->m02.imag = (m3->e[0][2].imag + m3->e[2][0].imag)*0.5;
00090     ah3->m12.imag = (m3->e[1][2].imag + m3->e[2][1].imag)*0.5;
00091     
00092 }
00093 
00094 template <typename anti_hermitmat, typename su3_matrix>
00095 static void
00096 uncompress_anti_hermitian(anti_hermitmat *mat_antihermit,
00097                           su3_matrix *mat_su3 )
00098 {
00099     typeof(mat_antihermit->m00im) temp1;
00100     mat_su3->e[0][0].imag=mat_antihermit->m00im;
00101     mat_su3->e[0][0].real=0.;
00102     mat_su3->e[1][1].imag=mat_antihermit->m11im;
00103     mat_su3->e[1][1].real=0.;
00104     mat_su3->e[2][2].imag=mat_antihermit->m22im;
00105     mat_su3->e[2][2].real=0.;
00106     mat_su3->e[0][1].imag=mat_antihermit->m01.imag;
00107     temp1=mat_antihermit->m01.real;
00108     mat_su3->e[0][1].real=temp1;
00109     mat_su3->e[1][0].real= -temp1;
00110     mat_su3->e[1][0].imag=mat_antihermit->m01.imag;
00111     mat_su3->e[0][2].imag=mat_antihermit->m02.imag;
00112     temp1=mat_antihermit->m02.real;
00113     mat_su3->e[0][2].real=temp1;
00114     mat_su3->e[2][0].real= -temp1;
00115     mat_su3->e[2][0].imag=mat_antihermit->m02.imag;
00116     mat_su3->e[1][2].imag=mat_antihermit->m12.imag;
00117     temp1=mat_antihermit->m12.real;
00118     mat_su3->e[1][2].real=temp1;
00119     mat_su3->e[2][1].real= -temp1;
00120     mat_su3->e[2][1].imag=mat_antihermit->m12.imag;    
00121 }
00122 
00123 template <typename su3_matrix, typename Float>
00124 static void
00125 scalar_mult_sub_su3_matrix(su3_matrix *a,su3_matrix *b, Float s, su3_matrix *c)
00126 {    
00127     int i,j;
00128     for(i=0;i<3;i++){
00129         for(j=0;j<3;j++){           
00130             c->e[i][j].real = a->e[i][j].real - s*b->e[i][j].real;
00131             c->e[i][j].imag = a->e[i][j].imag - s*b->e[i][j].imag;
00132         }
00133     }
00134 }
00135 
00136 template <typename su3_matrix, typename Float>
00137 static void
00138 scalar_mult_add_su3_matrix(su3_matrix *a,su3_matrix *b, Float s, su3_matrix *c)
00139 {
00140     int i,j;
00141     for(i=0;i<3;i++){
00142         for(j=0;j<3;j++){           
00143             c->e[i][j].real = a->e[i][j].real + s*b->e[i][j].real;
00144             c->e[i][j].imag = a->e[i][j].imag + s*b->e[i][j].imag;
00145         }
00146     }    
00147 }
00148 
00149 
00150 template<typename su3_matrix, typename su3_vector>
00151 static void
00152 mult_su3_mat_vec( su3_matrix *a, su3_vector *b, su3_vector *c  )
00153 {
00154     int i,j;
00155     typeof(a->e[0][0]) x,y;
00156     for(i=0;i<3;i++){
00157         x.real=x.imag=0.0;
00158         for(j=0;j<3;j++){
00159             CMUL( a->e[i][j] , b->c[j] , y );
00160             CSUM( x , y );
00161         }
00162         c->c[i] = x;
00163     }
00164 }
00165 template<typename su3_matrix, typename su3_vector>
00166 static void
00167 mult_adj_su3_mat_vec( su3_matrix *a, su3_vector *b, su3_vector *c )
00168 {
00169     int i,j;
00170     typeof(a->e[0][0]) x,y,z;
00171     for(i=0;i<3;i++){
00172         x.real=x.imag=0.0;
00173         for(j=0;j<3;j++){
00174             CONJG( a->e[j][i], z );
00175             CMUL( z , b->c[j], y );
00176             CSUM( x , y );
00177         }
00178         c->c[i] = x;
00179     }
00180 }
00181 
00182 template<typename su3_vector, typename su3_matrix>
00183 static void
00184 su3_projector( su3_vector *a, su3_vector *b, su3_matrix *c )
00185 {
00186     int i,j;
00187     for(i=0;i<3;i++)for(j=0;j<3;j++){
00188             CMUL_J( a->c[i], b->c[j], c->e[i][j] );
00189         }
00190 }
00191 
00192 template<typename su3_vector, typename Real>
00193 static void 
00194 scalar_mult_add_su3_vector(su3_vector *a, su3_vector *b, Real s,
00195                            su3_vector *c)
00196 {    
00197     int i;
00198     for(i=0;i<3;i++){
00199         c->c[i].real = a->c[i].real + s*b->c[i].real;
00200         c->c[i].imag = a->c[i].imag + s*b->c[i].imag;
00201     }    
00202 }
00203 
00204 
00205 
00206 template < typename su3_matrix>
00207 static void
00208 print_su3_matrix(su3_matrix *a)
00209 {
00210     int i, j;
00211     for(i=0;i < 3; i++){
00212         for(j=0;j < 3;j++){
00213             printf("(%f %f)\t", a->e[i][j].real, a->e[i][j].imag);
00214         }
00215         printf("\n");
00216     }
00217     
00218 }
00219 
00220 
00221 
00222 
00223 template <typename su3_matrix, typename anti_hermitmat, typename Float>
00224 static void
00225 update_mom(anti_hermitmat* momentum, int dir, su3_matrix* sitelink,
00226            su3_matrix* staple, Float eb3)
00227 {
00228     int i;
00229     for(i=0;i <V; i++){
00230         su3_matrix tmat1;
00231         su3_matrix tmat2;
00232         su3_matrix tmat3;
00233 
00234         su3_matrix* lnk = sitelink + 4*i+dir;
00235         su3_matrix* stp = staple + i;
00236         anti_hermitmat* mom = momentum + 4*i+dir;
00237         
00238         mult_su3_na(lnk, stp, &tmat1);
00239         uncompress_anti_hermitian(mom, &tmat2);
00240         
00241         scalar_mult_sub_su3_matrix(&tmat2, &tmat1, eb3, &tmat3);
00242         make_anti_hermitian(&tmat3, mom);
00243         
00244     }
00245     
00246 }
00247 
00248 
00249 template<typename half_wilson_vector, typename su3_matrix>
00250 static void 
00251 u_shift_hw(half_wilson_vector *src, half_wilson_vector *dest, int dir, su3_matrix* sitelink ) 
00252 {
00253     int i ;
00254     int dx[4];
00255     
00256     dx[3]=dx[2]=dx[1]=dx[0]=0;
00257     
00258     if(GOES_FORWARDS(dir)){     
00259         dx[dir]=1;      
00260         for(i=0;i < V; i++){
00261             int nbr_idx = neighborIndexFullLattice(i, dx[3], dx[2], dx[1], dx[0]);
00262             half_wilson_vector* hw = src + nbr_idx;
00263             su3_matrix* link = sitelink + i*4 + dir;
00264             mult_su3_mat_vec(link, &hw->h[0], &dest[i].h[0]);
00265             mult_su3_mat_vec(link, &hw->h[1], &dest[i].h[1]);       
00266         }       
00267     }else{
00268         dx[OPP_DIR(dir)]=-1;
00269         for(i=0;i < V; i++){
00270             int nbr_idx = neighborIndexFullLattice(i, dx[3], dx[2], dx[1], dx[0]);
00271             half_wilson_vector* hw = src + nbr_idx;
00272             su3_matrix* link = sitelink + nbr_idx*4 + OPP_DIR(dir);
00273             mult_adj_su3_mat_vec(link, &hw->h[0], &dest[i].h[0]);
00274             mult_adj_su3_mat_vec(link, &hw->h[1], &dest[i].h[1]);          
00275         }       
00276     }
00277     
00278 }
00279 
00280 template <typename half_wilson_vector,
00281           typename anti_hermitmat, typename Real>
00282 static void 
00283 add_3f_force_to_mom(half_wilson_vector *back, half_wilson_vector *forw, 
00284                     int dir, Real coeff[2], anti_hermitmat* momentum) 
00285 {
00286     Real my_coeff[2] ;
00287     Real tmp_coeff[2] ;
00288     int mydir;
00289     int i;
00290     
00291     if(GOES_BACKWARDS(dir)){
00292         mydir = OPP_DIR(dir);
00293         my_coeff[0] = -coeff[0]; 
00294         my_coeff[1] = -coeff[1];
00295     }else{ 
00296         mydir = dir; 
00297         my_coeff[0] = coeff[0]; 
00298         my_coeff[1] = coeff[1]; 
00299     }
00300     
00301     for(i=0;i < V;i++){
00302         if (i < Vh){
00303             tmp_coeff[0] = my_coeff[0];
00304             tmp_coeff[1] = my_coeff[1];
00305         }else{
00306             tmp_coeff[0] = -my_coeff[0];
00307             tmp_coeff[1] = -my_coeff[1] ;       
00308         }
00309         
00310         if (sizeof(Real) == sizeof(float)){
00311             fsu3_matrix tmat;
00312             fsu3_matrix mom_matrix;
00313             anti_hermitmat* mom = momentum+ 4* i + mydir;
00314             uncompress_anti_hermitian(mom, &mom_matrix);
00315             su3_projector( &back[i].h[0], &forw[i].h[0], &tmat);
00316             scalar_mult_add_su3_matrix(&mom_matrix, &tmat,  tmp_coeff[0], &mom_matrix );
00317             su3_projector( &back[i].h[1], &forw[i].h[1], &tmat);
00318             scalar_mult_add_su3_matrix(&mom_matrix, &tmat,  tmp_coeff[1], &mom_matrix );        
00319             make_anti_hermitian(&mom_matrix, mom);
00320         }else{
00321             dsu3_matrix tmat;
00322             dsu3_matrix mom_matrix;
00323             anti_hermitmat* mom = momentum+ 4* i + mydir;
00324             uncompress_anti_hermitian(mom, &mom_matrix);
00325             su3_projector( &back[i].h[0], &forw[i].h[0], &tmat);
00326             scalar_mult_add_su3_matrix(&mom_matrix, &tmat,  tmp_coeff[0], &mom_matrix );
00327             su3_projector( &back[i].h[1], &forw[i].h[1], &tmat);
00328             scalar_mult_add_su3_matrix(&mom_matrix, &tmat,  tmp_coeff[1], &mom_matrix );        
00329             make_anti_hermitian(&mom_matrix, mom);
00330         }
00331     }    
00332 }
00333 
00334 template<typename Real, typename half_wilson_vector, typename anti_hermitmat>
00335 static void 
00336 side_link_3f_force(int mu, int nu, Real coeff[2], half_wilson_vector *Path   , 
00337                    half_wilson_vector *Path_nu, half_wilson_vector *Path_mu, 
00338                    half_wilson_vector *Path_numu, anti_hermitmat* mom) 
00339 {
00340     
00341     Real m_coeff[2] ;
00342     
00343     m_coeff[0] = -coeff[0] ;
00344     m_coeff[1] = -coeff[1] ;
00345 
00346     if(GOES_FORWARDS(mu)){
00347         if(GOES_FORWARDS(nu)){
00348             add_3f_force_to_mom(Path_numu, Path, mu, coeff, mom) ;
00349         }else{
00350             add_3f_force_to_mom(Path,Path_numu,OPP_DIR(mu),m_coeff, mom);
00351         }
00352     }
00353   else{
00354       if(GOES_FORWARDS(nu))
00355           add_3f_force_to_mom(Path_nu, Path_mu, mu, m_coeff, mom);
00356       else
00357           add_3f_force_to_mom(Path_mu, Path_nu, OPP_DIR(mu), coeff, mom) ;
00358   }
00359 }
00360 
00361 
00362 
00363 #define Pmu          tempvec[0] 
00364 #define Pnumu        tempvec[1]
00365 #define Prhonumu     tempvec[2]
00366 #define P7           tempvec[3]
00367 #define P7rho        tempvec[4]              
00368 #define P7rhonu      tempvec[5]
00369 #define P5           tempvec[6]
00370 #define P3           tempvec[7]
00371 #define P5nu         tempvec[3]
00372 #define P3mu         tempvec[3]
00373 #define Popmu        tempvec[4]
00374 #define Pmumumu      tempvec[4]
00375 
00376 
00377 
00378 template <typename Real, typename half_wilson_vector, typename anti_hermitmat, 
00379           typename su3_matrix>
00380 static void
00381 do_fermion_force_reference(Real eps, Real weight1, Real weight2,
00382                            half_wilson_vector* temp_x, Real* act_path_coeff, 
00383                            su3_matrix* sitelink, anti_hermitmat* mom)    
00384 {
00385     int i;
00386     int mu, nu, rho, sig;
00387     Real coeff[2];
00388     Real OneLink[2], Lepage[2], Naik[2], FiveSt[2], ThreeSt[2], SevenSt[2] ;
00389     Real mNaik[2], mLepage[2], mFiveSt[2], mThreeSt[2], mSevenSt[2];    
00390     half_wilson_vector *tempvec[8] ;
00391     int sites_on_node = V;
00392     int DirectLinks[8] ;
00393  
00394     Real ferm_epsilon;
00395     ferm_epsilon = 2.0*weight1*eps;
00396     OneLink[0] = act_path_coeff[0]*ferm_epsilon ; 
00397     Naik[0]    = act_path_coeff[1]*ferm_epsilon ; mNaik[0]    = -Naik[0];
00398     ThreeSt[0] = act_path_coeff[2]*ferm_epsilon ; mThreeSt[0] = -ThreeSt[0];
00399     FiveSt[0]  = act_path_coeff[3]*ferm_epsilon ; mFiveSt[0]  = -FiveSt[0];
00400     SevenSt[0] = act_path_coeff[4]*ferm_epsilon ; mSevenSt[0] = -SevenSt[0];
00401     Lepage[0]  = act_path_coeff[5]*ferm_epsilon ; mLepage[0]  = -Lepage[0];
00402     
00403     ferm_epsilon = 2.0*weight2*eps;
00404     OneLink[1] = act_path_coeff[0]*ferm_epsilon ; 
00405     Naik[1]    = act_path_coeff[1]*ferm_epsilon ; mNaik[1]    = -Naik[1];
00406     ThreeSt[1] = act_path_coeff[2]*ferm_epsilon ; mThreeSt[1] = -ThreeSt[1];
00407     FiveSt[1]  = act_path_coeff[3]*ferm_epsilon ; mFiveSt[1]  = -FiveSt[1];
00408     SevenSt[1] = act_path_coeff[4]*ferm_epsilon ; mSevenSt[1] = -SevenSt[1];
00409     Lepage[1]  = act_path_coeff[5]*ferm_epsilon ; mLepage[1]  = -Lepage[1];
00410     
00411     for(mu=0;mu<8;mu++){
00412         DirectLinks[mu] = 0 ;
00413     }
00414     
00415     for(mu=0;mu<8;mu++){
00416         tempvec[mu] = (half_wilson_vector *)malloc( sites_on_node*sizeof(half_wilson_vector) );  
00417     }
00418     
00419     for(sig=0; sig < 8; sig++){
00420         for(mu = 0; mu < 8; mu++){
00421             if ( (mu == sig) || (mu == OPP_DIR(sig))){
00422                 continue;
00423             }
00424 
00425             // 3 link path 
00426             u_shift_hw(temp_x, Pmu, OPP_DIR(mu), sitelink);
00427             u_shift_hw(Pmu, P3, sig, sitelink);
00428             if (GOES_FORWARDS(sig)){
00429                 add_3f_force_to_mom(P3, Pmu, sig, mThreeSt, mom);
00430             }       
00431             for(nu=0; nu < 8; nu++){
00432                 if (nu == sig || nu == OPP_DIR(sig)
00433                     || nu == mu || nu == OPP_DIR(mu)){
00434                     continue;
00435                 }
00436                 
00437                 // 5 link path
00438                 u_shift_hw(Pmu, Pnumu, OPP_DIR(nu), sitelink);
00439                 u_shift_hw(Pnumu, P5, sig, sitelink);
00440                 if (GOES_FORWARDS(sig)){
00441                     add_3f_force_to_mom(P5, Pnumu, sig, FiveSt, mom);
00442                 }
00443 
00444 
00445                 for(rho =0; rho < 8; rho++){
00446                     if (rho == sig || rho == OPP_DIR(sig)
00447                         || rho == mu || rho == OPP_DIR(mu)
00448                         || rho == nu || rho == OPP_DIR(nu)){
00449                         continue;
00450                     }
00451                     
00452                     //7 link path
00453                     u_shift_hw(Pnumu, Prhonumu, OPP_DIR(rho), sitelink);
00454                     u_shift_hw(Prhonumu, P7,sig, sitelink);
00455                     if(GOES_FORWARDS(sig)){
00456                         add_3f_force_to_mom(P7, Prhonumu, sig, mSevenSt, mom) ; 
00457                     }
00458                     u_shift_hw(P7, P7rho, rho, sitelink);
00459                     side_link_3f_force(rho,sig,SevenSt, Pnumu, P7, Prhonumu, P7rho, mom);                   
00460                     if(FiveSt[0] != 0)coeff[0] = SevenSt[0]/FiveSt[0] ; else coeff[0] = 0;
00461                     if(FiveSt[1] != 0)coeff[1] = SevenSt[1]/FiveSt[1] ; else coeff[1] = 0;                  
00462                     for(i=0;i < V; i++){
00463                         scalar_mult_add_su3_vector(&(P5[i].h[0]),&(P7rho[i].h[0]), coeff[0],
00464                                                    &(P5[i].h[0]));
00465                         scalar_mult_add_su3_vector(&(P5[i].h[1]),&(P7rho[i].h[1]), coeff[1],
00466                                                    &(P5[i].h[1]));
00467                     }               
00468 
00469                 }//rho  
00470 
00471                 u_shift_hw(P5,P5nu, nu, sitelink);
00472                 side_link_3f_force(nu,sig,mFiveSt,Pmu,P5, Pnumu,P5nu, mom);
00473                 if(ThreeSt[0] != 0)coeff[0] = FiveSt[0]/ThreeSt[0] ; else coeff[0] = 0;
00474                 if(ThreeSt[1] != 0)coeff[1] = FiveSt[1]/ThreeSt[1] ; else coeff[1] = 0;
00475                 for(i=0; i < V; i++){
00476                     scalar_mult_add_su3_vector(&(P3[i].h[0]),&(P5nu[i].h[0]),coeff[0],&(P3[i].h[0]));
00477                     scalar_mult_add_su3_vector(&(P3[i].h[1]),&(P5nu[i].h[1]),coeff[1],&(P3[i].h[1]));
00478                 }
00479 
00480             }//nu
00481 
00482             //Lepage term
00483             u_shift_hw(Pmu, Pnumu, OPP_DIR(mu), sitelink);
00484             u_shift_hw(Pnumu, P5, sig, sitelink);
00485             if(GOES_FORWARDS(sig)){
00486                 add_3f_force_to_mom(P5, Pnumu, sig, Lepage, mom);
00487             }
00488             
00489             u_shift_hw(P5,P5nu, mu, sitelink);
00490             side_link_3f_force(mu, sig, mLepage, Pmu, P5, Pnumu, P5nu, mom);
00491             if(ThreeSt[0] != 0) coeff[0] = Lepage[0]/ThreeSt[0] ; else coeff[0] = 0;
00492             if(ThreeSt[1] != 0) coeff[1] = Lepage[1]/ThreeSt[1] ; else coeff[1] = 0;
00493             for(i=0;i < V;i++){
00494                 scalar_mult_add_su3_vector(&(P3[i].h[0]),&(P5nu[i].h[0]),coeff[0],&(P3[i].h[0]));
00495                 scalar_mult_add_su3_vector(&(P3[i].h[1]),&(P5nu[i].h[1]),coeff[1],&(P3[i].h[1]));
00496             }
00497             
00498             if(GOES_FORWARDS(mu)) {
00499                 u_shift_hw(P3,P3mu, mu, sitelink);
00500             }
00501             side_link_3f_force(mu, sig, ThreeSt, temp_x, P3, Pmu, P3mu, mom);   
00502             
00503             //One link term and Naik term
00504             if( (!DirectLinks[mu]) ){
00505                 DirectLinks[mu]=1 ;
00506                 if(GOES_BACKWARDS(mu)){
00507                     //one link term
00508                     add_3f_force_to_mom(Pmu, temp_x, OPP_DIR(mu), OneLink, mom);
00509                     u_shift_hw(temp_x, Popmu, mu, sitelink);
00510                     add_3f_force_to_mom(Pnumu, Popmu, OPP_DIR(mu), mNaik, mom);
00511                     u_shift_hw(Pnumu, Pmumumu, OPP_DIR(mu), sitelink);
00512                     add_3f_force_to_mom(Pmumumu, temp_x, OPP_DIR(mu), Naik, mom);
00513                 }else{
00514                     u_shift_hw(temp_x, Popmu, mu, sitelink);
00515                     add_3f_force_to_mom(Popmu, Pnumu, mu, Naik, mom);
00516                 }               
00517             }//if
00518         }//mu
00519     }//sig
00520     
00521 }
00522 
00523 #undef Pmu
00524 #undef Pnumu
00525 #undef Prhonumu
00526 #undef P7
00527 #undef P7rho
00528 #undef P7rhonu
00529 #undef P5
00530 #undef P3
00531 #undef P5nu
00532 #undef P3mu
00533 #undef Popmu
00534 #undef Pmumumu
00535 
00536 
00537 void
00538 fermion_force_reference(float eps, float weight1, float weight2,
00539                         void* act_path_coeff, void* temp_x, void* sitelink, void* mom)    
00540 {
00541     do_fermion_force_reference((float)eps, (float)weight1, (float)weight2, 
00542                                (fhalf_wilson_vector*) temp_x, (float*)act_path_coeff,
00543                                (fsu3_matrix*)sitelink, (fanti_hermitmat*) mom);   
00544     
00545 }
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines