void accum_nl_meson_prop(int i,int dir, field_offset destq, field_offset desto) /* Apply symmetric shift to "q" and "o" propagators */ /* for all source wall colors */ /* at site i in direction dir */ /* destq <- D_dir q; desto <- D_dir o */ { su3_matrix *af, *ab; register su3_matrix *dstq, *dsto; /* gen_pt points to the "q" propagator */ /* destq <- D_dir q */ af = (su3_matrix *)gen_pt[dir][i]; ab = (su3_matrix *)gen_pt[dir+4][i]; dstq = (su3_matrix *)F_PT(&lattice[i],destq); su3mat_copy( af, dstq ); add_su3_matrix( ab, dstq, dstq); /* gen_pt2 points to the "o" propagator */ /* desto <- D_dir o */ af = (su3_matrix *)gen_pt2[dir][i]; ab = (su3_matrix *)gen_pt2[dir+4][i]; dsto = (su3_matrix *)F_PT(&lattice[i],desto); su3mat_copy( af, dsto); add_su3_matrix( ab, dsto, dsto); }
// ----------------------------------------------------------------- void directional_staple(int dir1, int dir2, field_offset lnk1, field_offset lnk2, su3_matrix *stp) { register int i; register site *s; msg_tag *tag0, *tag1, *tag2; su3_matrix tmat1, tmat2; // Get blocked_link[dir2] from direction dir1 tag0 = start_gather_site(lnk2, sizeof(su3_matrix), dir1, EVENANDODD, gen_pt[0]); // Get blocked_link[dir1] from direction dir2 tag1 = start_gather_site(lnk1, sizeof(su3_matrix), dir2, EVENANDODD, gen_pt[1]); // Start working on the lower staple while we wait for the gathers // The lower staple is prepared at x-dir2 and stored in tempmat1, // then gathered to x FORALLSITES(i, s) mult_su3_an((su3_matrix*)F_PT(s,lnk2), (su3_matrix*)F_PT(s,lnk1), tempmat1 + i); wait_gather(tag0); wait_gather(tag1); // Finish lower staple FORALLSITES(i, s) { mult_su3_nn(tempmat1 + i, (su3_matrix *)gen_pt[0][i], &tmat1); su3mat_copy(&tmat1, tempmat1 + i); }
FORALLSITES(i,s) { if( s-> t == tloop ) su3mat_copy((su3_matrix *) gen_pt[TDOWN][i], (su3_matrix *) F_PT(s,hqet_prop) ); }
void update_u_cpu( Real eps ){ register int i,dir; register site *s; su3_matrix *link,temp1,temp2,htemp; register Real t2,t3,t4,t5,t6,t7,t8; /**TEMP** Real gf_x,gf_av,gf_max; int gf_i,gf_j; **END TEMP **/ /**double dtime,dtime2,dclock();**/ /**dtime = -dclock();**/ /* Take divisions out of site loop (can't be done by compiler) */ t2 = eps/2.0; t3 = eps/3.0; t4 = eps/4.0; t5 = eps/5.0; t6 = eps/6.0; t7 = eps/7.0; t8 = eps/8.0; /** TEMP ** gf_av=gf_max=0.0; **END TEMP**/ #ifdef FN invalidate_fermion_links(fn_links); // free_fn_links(&fn_links); // free_fn_links(&fn_links_dmdu0); #endif FORALLSITES(i,s){ for(dir=XUP; dir <=TUP; dir++){ uncompress_anti_hermitian( &(s->mom[dir]) , &htemp ); link = &(s->link[dir]); mult_su3_nn(&htemp,link,&temp1); scalar_mult_add_su3_matrix(link,&temp1,t8,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,t7,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,t6,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,t5,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,t4,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,t3,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,t2,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,eps ,&temp2); su3mat_copy(&temp2,link); } } /**dtime += dclock(); node0_printf("LINK_UPDATE: time = %e mflops = %e\n", dtime, (double)(5616.0*volume/(1.0e6*dtime*numnodes())) );**/ } /* update_u */
void smear_hqet_prop(field_offset hqet_prop,int which_smear, int vpt) { int i,j,k ; register site *s; su3_matrix tmp ; FORALLSITES(i,s) { if ( s->t == 0) { /*** First time slice ***************/ for(k=0; k < 3 ; ++k) { for(j=k+1; j < 3 ; ++j) { tmp.e[k][j].real = 0.0 ; tmp.e[k][j].imag = 0.0 ; tmp.e[j][k].real = 0.0 ; tmp.e[j][k].imag = 0.0 ; } tmp.e[k][k] = s->seq_smear_func[which_smear] ; } su3mat_copy(&tmp, (su3_matrix *) F_PT(s,hqet_prop) ); } /**** end of the first time slice ****************/ else { for(k=0; k < 3 ; ++k) for(j=0; j < 3 ; ++j) { tmp.e[k][j].real = 0.0 ; tmp.e[k][j].imag = 0.0 ; } su3mat_copy(&tmp, (su3_matrix *) F_PT(s,hqet_prop) ); } /**** end of middle of the time ****************/ } /** end of the loop over the sites ****/ }
void update_u( double eps ){ register int i,dir; register site *s; su3_matrix *link,temp1,temp2,htemp; register double t2,t3,t4,t5,t6; /**TEMP** double gf_x,gf_av,gf_max; int gf_i,gf_j; **END TEMP **/ /**double dtime,dtime2,dclock();**/ /**dtime = -dclock();**/ /* Temporary by-hand optimization until pgcc compiler bug is fixed */ t2 = eps/2.0; t3 = eps/3.0; t4 = eps/4.0; t5 = eps/5.0; t6 = eps/6.0; /** TEMP ** gf_av=gf_max=0.0; **END TEMP**/ FORALLSITES(i,s){ for(dir=XUP; dir <=TUP; dir++){ uncompress_anti_hermitian( &(s->mom[dir]) , &htemp ); link = &(s->link[dir]); mult_su3_nn(&htemp,link,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/6.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t6,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/5.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t5,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/4.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t4,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/3.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t3,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/2.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t2,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,eps ,&temp2); su3mat_copy(&temp2,link); } } #ifdef FN valid_longlinks=0; valid_fatlinks=0; #endif /**dtime += dclock(); node0_printf("LINK_UPDATE: time = %e mflops = %e\n", dtime, (double)(5616.0*volume/(1.0e6*dtime*numnodes())) );**/ } /* update_u */
/* copy a gauge field in the site structure - an array of four su3_matrices */ void gauge_field_copy(field_offset src, field_offset dest){ register int i,dir,src2,dest2; register site *s; FORALLSITES(i,s){ src2=src; dest2=dest; for(dir=XUP;dir<=TUP; dir++){ su3mat_copy( (su3_matrix *)F_PT(s,src2), (su3_matrix *)F_PT(s,dest2) ); src2 += sizeof(su3_matrix); dest2 += sizeof(su3_matrix); } }
void path(int *dir,int *sign,int length) { register int i; register site *s; msg_tag *mtag0, *mtag1; int j; /* j=0 */ if(sign[0]>0) { mtag0 = start_gather_site( F_OFFSET(link[dir[0]]), sizeof(su3_matrix), OPP_DIR(dir[0]), EVENANDODD, gen_pt[0] ); wait_gather(mtag0); FORALLSITES(i,s){ su3mat_copy((su3_matrix *)(gen_pt[0][i]),&(s->tempmat1) ); }
void static_prop() { register int i; register site *st; msg_tag *tag; int tloop ; int nthalf = nt/2 ; /*************---------**********-------------************/ /* Initialise the gauge part of the propagator ***/ setup_static_prop() ; /* * Calculate the static propagator for positive time * * W(t+1) = W(t) U_4(t) */ for(tloop=1 ; tloop <= nthalf ; ++tloop) { /* The smear_w_line[0] object is used as work space ***/ FORALLSITES(i,st) { mult_su3_nn(&(st->w_line), &(st->link[TUP]), &(st->smear_w_line[0])); } /* Pull the w(t)*u(t) from the previous time slice ***/ tag=start_gather_site( F_OFFSET(smear_w_line[0]), sizeof(su3_matrix), TDOWN, EVENANDODD, gen_pt[0] ); wait_gather(tag); FORALLSITES(i,st) { if( st-> t == tloop ) su3mat_copy((su3_matrix *) gen_pt[0][i], &(st->w_line)); } cleanup_gather(tag); } /* end the loop over time slice ***/
void update_u(Real eps) { register int i,dir; register site *s; su3_matrix *link,temp1,temp2,htemp; register Real t2,t3,t4,t5,t6; /* Temporary by-hand optimization until pgcc compiler bug is fixed */ t2 = eps/2.0; t3 = eps/3.0; t4 = eps/4.0; t5 = eps/5.0; t6 = eps/6.0; invalidate_fermion_links(fn_links); FORALLSITES(i,s){ for(dir=XUP; dir <=TUP; dir++) if(dir==TUP || s->t>0){ uncompress_anti_hermitian( &(s->mom[dir]) , &htemp ); link = &(s->link[dir]); mult_su3_nn(&htemp,link,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/6.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t6,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/5.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t5,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/4.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t4,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/3.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t3,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); /**scalar_mult_add_su3_matrix(link,&temp1,eps/2.0,&temp2);**/ scalar_mult_add_su3_matrix(link,&temp1,t2,&temp2); mult_su3_nn(&htemp,&temp2,&temp1); scalar_mult_add_su3_matrix(link,&temp1,eps ,&temp2); su3mat_copy(&temp2,link); } } } /* update_u */
void hybrid_loop1(int tot_smear) { char myname[] = "hybrid_loop1"; register int i,j,dir,r,t; int dir1=0,dir2=0,trans_path1=0,trans_path2=0; int disp[4]; int nth,nxh; register site *s; su3_matrix tmat1,tmat2; su3_matrix *tmatp; Real *wils_loop1; su3_matrix *flux_links_f; su3_matrix *trans_links, *trans_links_f; su3_matrix *flux_links; su3_matrix *tempmat1; /* Names of messages used to index "mtag" and "gen_pt" */ /* NMSGS must not exceed N_POINTERS */ enum{ M_S_LINK, M_F_LINKS_F, M_T_LINKS_F, M_STAP_POS1, M_STAP_NEG1, M_STAP_POS2, M_STAP_NEG2, NMSGS }; msg_tag *mtag[NMSGS]; /* Names of flux tube shapes built from transverse links and on-axis links used to index "flux_links" */ enum{ S_LINK, STAP_POS1, STAP_NEG1, STAP_POS2, STAP_NEG2, NFLUX }; /* Names of transverse links used to index "trans_path", "trans_links" and "trans_links_f" */ enum{ XX, YY, ZZ, NTRANS }; /* Names of space-shifted transverse links */ /* used to index "trans_links_f" */ enum{ TRANS_PATH1_F, TRANS_PATH2_F, T_LINK_F, NTRANS_F }; /* Paths for transverse links */ const link_path trans_path[NTRANS] = { { "XX", 2, {2,0,0,0}, {XUP, XUP, NODIR, NODIR} }, { "YY", 2, {0,2,0,0}, {YUP, YUP, NODIR, NODIR} }, { "ZZ", 2, {0,0,2,0}, {ZUP, ZUP, NODIR, NODIR} } }; /* Names of flux tube shapes transported forward in time */ /* Used to index "flux_links_f" */ enum{ S_LINK_F, STAP_POS1_F, NFLUX_F }; /* Names of loop observables */ /* Used to index "wils_loop1" */ enum{ W_LOOP1, STAP_SIG_GP1, STAP_PI_U1, STAP_DELTA_G1, NWLOOP1 }; /* Check the rules */ if(NMSGS > N_POINTERS){ if(this_node == 0)fprintf(stderr,"%s: Aborted. gen_pt array too small.",myname); terminate(1); } if( nx != ny || nx != ny){ if(this_node == 0)fprintf(stderr,"%s: Aborted. requires nx=ny=nz",myname); terminate(1); } /* Allocate space for observables */ //AB nth = nt/2; nxh = nx/2; //CD nth = nt; nxh = nx/2; nth = max_t; nxh = nx/2; wils_loop1 = (Real *)malloc(nth*nxh*sizeof(Real)*NWLOOP1); if(wils_loop1 == NULL){ fprintf(stderr,"%s: CAN'T MALLOC wils_loop1\n",myname); fflush(stderr); terminate(1); } for(i=0;i<NWLOOP1;i++) for(t=0;t<nth;t++) for(r=0;r<nxh;r++) WILS_LOOP1(i,t,r) = 0.0; /* Allocate space for timeward shifted flux tube shapes */ flux_links_f = (su3_matrix *)malloc(sites_on_node*sizeof(su3_matrix)*NFLUX_F); if(flux_links_f == NULL){ fprintf(stderr,"%s: CAN'T MALLOC flux_links_f\n",myname); fflush(stderr); terminate(1); } /* Allocate space for transverse link products */ trans_links = (su3_matrix *)malloc(NTRANS*sites_on_node*sizeof(su3_matrix)); if(trans_links == NULL){ fprintf(stderr,"%s: CAN'T MALLOC trans_links\n",myname); fflush(stderr); terminate(1); } /* Allocate space for shifted auxiliary link products */ trans_links_f = (su3_matrix *)malloc(NTRANS_F*sites_on_node*sizeof(su3_matrix)); if(trans_links_f == NULL){ fprintf(stderr,"%s: CAN'T MALLOC trans_links_f\n",myname); fflush(stderr); terminate(1); } tempmat1 = (su3_matrix *)malloc(sites_on_node*sizeof(su3_matrix)); if(tempmat1 == NULL){ printf("%s(%d): Can't malloc temporary\n",myname,this_node); terminate(1); } /* Compute and store products of transverse links */ /* trans_links[i][j] is set to the link product for the jth path type that ends at site i */ for(j = 0; j < NTRANS; j++){ path_product(trans_path[j].dir, trans_path[j].length, tempmat1); FORALLSITES(i,s){ su3mat_copy(tempmat1+i, TRANS_LINKS(i,j)); } }
void load_W_from_Y(info_t *info, hisq_auxiliary_t *aux, int umethod, int ugroup){ su3_matrix *W_unitlink = aux->W_unitlink; su3_matrix *Y_unitlink = aux->Y_unitlink; int dir,i; su3_matrix tmat; /* Temporary. FIX THIS! */ int r0[4] = {0, 0, 0, 0}; char myname[] = "load_W_from_Y"; info->final_flop = 0; /* Currently not counted if we do use SU(3) */ /* If we have already set the W pointers equal to the V pointers, no copy is needed. */ if(aux->WeqY)return; if( ugroup != UNITARIZE_SU3 ) { node0_printf("%s: Unrecognized ugroup value\n", myname); terminate(1); } switch(umethod){ case UNITARIZE_NONE: //node0_printf("WARNING: UNITARIZE_NONE\n"); FORALLFIELDSITES_OMP(i,private(dir))for(dir=XUP;dir<=TUP;dir++) W_unitlink[4*i+dir] = Y_unitlink[4*i+dir]; END_LOOP_OMP; break; case UNITARIZE_APE: node0_printf("UNITARIZE_APE: not ready\n"); terminate(0); break; case UNITARIZE_ROOT: { complex cdet; //node0_printf("WARNING: SPECIAL UNITARIZE_ROOT is performed\n"); /* rephase (out) Y_unitlink array */ rephase_field_offset( Y_unitlink, OFF, NULL , r0); FORALLFIELDSITES_OMP(i,private(dir,tmat,cdet))for(dir=XUP;dir<=TUP;dir++){ /* special unitarize - project U(3) on SU(3) CAREFUL WITH FERMION PHASES! */ su3_spec_unitarize( &( Y_unitlink[4*i+dir] ), &tmat, &cdet ); W_unitlink[4*i+dir] = tmat; } END_LOOP_OMP; rephase_field_offset( Y_unitlink, ON, NULL , r0); /* rephase (in) W_unitlink array */ rephase_field_offset( W_unitlink, ON, NULL , r0); //printf("SPECIAL UNITARIZATION RESULT (ROOT)\n"); //dumpmat( &( Y_unitlink[TUP][3] ) ); //dumpmat( &( W_unitlink[TUP][3] ) ); } break; case UNITARIZE_RATIONAL: { complex cdet; //node0_printf("WARNING: SPECIAL UNITARIZE_ROOT is performed\n"); /* rephase (out) Y_unitlink array */ rephase_field_offset( Y_unitlink, OFF, NULL , r0); FORALLFIELDSITES_OMP(i,private(dir,tmat,cdet))for(dir=XUP;dir<=TUP;dir++){ /* special unitarize - project U(3) on SU(3) CAREFUL WITH FERMION PHASES! */ su3_spec_unitarize( &( Y_unitlink[4*i+dir] ), &tmat, &cdet ); W_unitlink[4*i+dir] = tmat; } END_LOOP_OMP; rephase_field_offset( Y_unitlink, ON, NULL , r0); /* rephase (in) W_unitlink array */ rephase_field_offset( W_unitlink, ON, NULL , r0); //printf("SPECIAL UNITARIZATION RESULT (RATIONAL)\n"); //dumpmat( &( Y_unitlink[TUP][3] ) ); //dumpmat( &( W_unitlink[TUP][3] ) ); } break; case UNITARIZE_ANALYTIC: { complex cdet; //node0_printf("WARNING: SPECIAL UNITARIZE_ROOT is performed\n"); /* rephase (out) Y_unitlink array */ rephase_field_offset( Y_unitlink, OFF, NULL , r0); FORALLFIELDSITES_OMP(i,private(dir,tmat,cdet))for(dir=XUP;dir<=TUP;dir++){ /* special unitarize - project U(3) on SU(3) CAREFUL WITH FERMION PHASES! */ #ifdef MILC_GLOBAL_DEBUG #ifdef HISQ_REUNITARIZATION_DEBUG su3_spec_unitarize_index( &( Y_unitlink[dir][i] ), &tmat, &cdet, i, dir ); #else /* HISQ_REUNITARIZATION_DEBUG */ su3_spec_unitarize( &( Y_unitlink[dir][i] ), &tmat, &cdet ); #endif /* HISQ_REUNITARIZATION_DEBUG */ #else /* MILC_GLOBAL_DEBUG */ su3_spec_unitarize( &( Y_unitlink[4*i+dir] ), &tmat, &cdet ); #endif /* MILC_GLOBAL_DEBUG */ W_unitlink[4*i+dir] = tmat; } END_LOOP_OMP; rephase_field_offset( Y_unitlink, ON, NULL , r0); /* rephase (in) W_unitlink array */ rephase_field_offset( W_unitlink, ON, NULL , r0); //TEMP TEST //{int ii,jj; complex cc; su3_matrix tmat; //cc = ce_itheta ( 2.0*3.1415926/3.0 ); //c_scalar_mult_su3mat( &(hl->W_unitlink[XUP][0]), &cc, &tmat ); //hl->W_unitlink[YUP][0] = tmat; //printf("ACTION: TEMPTEST %e %e\n", cc.real, cc.imag); //} //END TEMPTEST //printf("SPECIAL UNITARIZATION RESULT (RATIONAL)\n"); //dumpmat( &( Y_unitlink[TUP][3] ) ); //dumpmat( &( W_unitlink[TUP][3] ) ); } break; case UNITARIZE_STOUT: { //node0_printf("WARNING: SPECIAL UNITARIZE_ROOT is performed\n"); /* rephase (out) Y_unitlink array */ rephase_field_offset( Y_unitlink, OFF, NULL , r0); FORALLFIELDSITES_OMP(i,private(dir))for(dir=XUP;dir<=TUP;dir++){ /* QUICK FIX: copy Y to W */ su3mat_copy( &( Y_unitlink[4*i+dir] ), &( W_unitlink[4*i+dir] ) ); } END_LOOP_OMP; rephase_field_offset( Y_unitlink, ON, NULL , r0); /* rephase (in) W_unitlink array */ rephase_field_offset( W_unitlink, ON, NULL , r0); } break; case UNITARIZE_HISQ: node0_printf("UNITARIZE_HISQ: not ready!\n"); terminate(0); break; default: node0_printf("Unknown unitarization method\n"); terminate(0); } }
void generate_hqet_prop(field_offset hqet_prop, int tstart, int tend , int tcurrent, int v1, int v2) { register int i,j,t; register site *s; msg_tag *tag[8]; int tloop ; int nthalf = nt/2 ; int dir ; int jj ; register su3_vector *a,*b1,*b2,*b3,*b4; complex unorm[4] ; /*************---------**********-------------************/ assert( tend > tstart ) ; /** check to see whether to a two or three point function ***/ if( v1 == v2 ) { tcurrent = tend + 4 ; } /** set up the renormalized velocity ****/ unorm[TUP].real =0.0 ; unorm[TUP].imag = 0.0 ; for(jj =XUP ; jj <= ZUP ; ++jj) { unorm[jj].real =0.0 ; unorm[jj].imag = velocity[v1][jj] /( 2.0 * velocity[v1][TUP] ); } ++tstart ; /*** tloop is the time slice of the required propagator ****/ for(tloop=tstart ; tloop <= tend ; ++tloop) { if( tloop > tcurrent ) { for(jj =XUP ; jj <= ZUP ; ++jj) { unorm[jj].real =0.0 ; unorm[jj].imag = velocity[v2][jj] /( 2.0 * velocity[v2][TUP] ) ; } } /***----- spatial parts of the evolution equation ------***/ /* Start gathers of the propagator from positive directions */ for(dir=XUP; dir<=ZUP; dir++) { tag[dir] = start_gather_site( hqet_prop, sizeof(su3_matrix), dir, EVENANDODD, gen_pt[dir] ); } /* * tmpvec[i] = U_{\mu}^{\dagger}(x-i,t) s(x-i) */ /* Multiply by adjoint matrix at other sites */ FORALLSITES(i,s) { for(dir=XUP; dir<=ZUP; dir++) { mult_su3_an_z(unorm[dir] , &(s->link[dir]), (su3_matrix *)F_PT(s,hqet_prop), &(s->tempvec[dir]) ); } } /* Start gathers from negative directions */ for( dir=XUP; dir <= ZUP; dir++) { tag[OPP_DIR(dir)] = start_gather_site( F_OFFSET(tempvec[dir]), sizeof(su3_matrix), OPP_DIR( dir), EVENANDODD , gen_pt[OPP_DIR(dir)] ); } /* Wait gathers from positive directions *******/ for(dir=XUP; dir<=ZUP; dir++) { wait_gather(tag[dir]); } FORALLSITES(i,s) { su3mat_copy((su3_matrix *)F_PT(s,hqet_prop) , &(s->tempvec[ TUP ]) ); for(dir=XUP; dir<=ZUP; dir++) { mult_su3_nn_z_inc( unorm[dir] ,&(s->link[dir]),(su3_matrix *)(gen_pt[dir][i]), &(s->tempvec[ TUP ]) ); } } /* Wait gathers from negative directions */ for(dir=XUP; dir<=ZUP; dir++) { wait_gather(tag[OPP_DIR(dir)]); } FORALLSITES(i,s) { sub3_su3_matrix((su3_matrix *)(gen_pt[XDOWN][i]) , (su3_matrix *)(gen_pt[YDOWN][i]) , (su3_matrix *)(gen_pt[ZDOWN][i]) , &(s->tempvec[ TUP ])) ; }