MainWindow::MainWindow(QWidget *parent) : QWidget(parent), state(0) { setFixedSize(400, 600); login_edit = new QLineEdit(this); password_edit = new QLineEdit(this); password_edit->setEchoMode(QLineEdit::Password); login_label = new QLabel(tr("login"), this); password_label = new QLabel(tr("password"), this); login_button = new QPushButton(tr("login"), this); logout_botton = new QPushButton(tr("logout"), this); download_selected_music_button = new QPushButton(tr("download"), this); stop_download_button = new QPushButton(tr("stop"), this); select_all_button = new QPushButton(tr("select all"), this); clear_selection_button = new QPushButton(tr("clear\nselection"), this); music_list = new QListWidget(this); setup_widgets(); setup_links(); }
int main(int argc, char *argv[]) { int meascount; int prompt; Real avm_iters,avs_iters; double ssplaq,stplaq; double starttime,endtime; double dtime; int MinCG,MaxCG; Real size_r,RsdCG; register int i,j,l; register site *s; int spinindex,spin,color,k,kk,t; int flag; int ci,si,sf,cf; int num_prop; Real space_vol; int status; int source_chirality; wilson_vector **eigVec ; double *eigVal ; int total_R_iters ; double norm; Real re,im,re5,im5; complex cc; char label[20] ; double *grad, *err, max_error; Matrix Array,V ; int key[4]; #define restrict rstrict /* C-90 T3D cludge */ int restrict[4]; Real norm_fac[10]; static char *mes_kind[10] = {"PION","PS505","PS055","PS0505", "RHO33","RHO0303","SCALAR","SCALA0","PV35","B12"}; static char *bar_kind[4] = {"PROTON","PROTON0","DELTA","DELTA0"}; complex *pmes_prop[MAX_MASSES][10]; complex *smes_prop[MAX_MASSES][10]; complex *bar_prop[MAX_MASSES][4]; w_prop_file *fp_in_w[MAX_MASSES]; /* For propagator files */ w_prop_file *fp_out_w[MAX_MASSES]; /* For propagator files */ initialize_machine(&argc,&argv); /* Remap standard I/O */ if(remap_stdio_from_args(argc, argv) == 1)terminate(1); g_sync(); /* set up */ prompt = setup_p(); /* loop over input sets */ while( readin(prompt) == 0) { starttime=dclock(); MaxCG=niter; avm_iters=0.0; meascount=0; if(this_node==0)printf("END OF HEADER\n"); setup_offset(); /* if(this_node==0)printf("warning--no fat link\n"); */ monte_block_ape_b(1); /* call plaquette measuring process */ d_plaquette(&ssplaq,&stplaq); if(this_node==0)printf("FATPLAQ %e %e\n", (double)ssplaq,(double)stplaq); /* flip the time oriented fat links if(this_node==0) printf("Periodic time BC\n"); */ if(this_node==0) printf("AP time BC\n"); boundary_flip(MINUS); setup_links(SIMPLE); /* if(this_node==0) printf("num_masses = %d\n", num_masses); */ /* Loop over mass */ for(k=0;k<num_masses;k++){ m0=mass[k]; if(m0 <= -10.0) exit(1); RsdCG=resid[k]; if(this_node==0)printf("mass= %g r0= %g residue= %g\n", (double)m0,(double)wqs[k].r0,(double)RsdCG); build_params(m0); make_clov1(); eigVal = (double *)malloc(Nvecs*sizeof(double)); eigVec = (wilson_vector **)malloc(Nvecs*sizeof(wilson_vector*)); for(i=0;i<Nvecs;i++) eigVec[i]= (wilson_vector*)malloc(sites_on_node*sizeof(wilson_vector)); /* open files for wilson propagators */ fp_in_w[k] = r_open_wprop(startflag_w[k], startfile_w[k]); fp_out_w[k] = w_open_wprop(saveflag_w[k], savefile_w[k], wqs[k].type); if(startflag_w[k] == FRESH)flag = 0; else flag = 1; spin=color=0; /* needed by wilson writing routines */ /* initialize the CG vectors */ if(flag==0){ if(this_node==0) printf("random (but chiral) initial vectors\n"); /* Initiallize all the eigenvectors to a random vector */ for(j=0;j<Nvecs;j++) { if(j< Nvecs/2){ source_chirality=1;} else{source_chirality= -1;} printf("source chirality %d\n",source_chirality); grsource_w(); FORALLSITES(i,s){ copy_wvec(&(s->g_rand),&(eigVec[j][i])); if(source_chirality==1){ for(kk=2;kk<4;kk++)for(l=0;l<3;l++) eigVec[j][i].d[kk].c[l]=cmplx(0.0,0.0); } if(source_chirality== -1){ for(kk=0;kk<2;kk++)for(l=0;l<3;l++) eigVec[j][i].d[kk].c[l]=cmplx(0.0,0.0); } } eigVal[j]=1.0e+16; } } else{ if(this_node==0) printf("reading in %d wilson_vectors--must be <= 12\n",Nvecs); /* load psi if requested */ for(j=0;j<Nvecs;j++){ printf("reading %d %d %d\n",j,spin,color); #ifdef IOTIME status = reload_wprop_sc_to_site( startflag_w[k], fp_in_w[k], spin, color, F_OFFSET(psi),1); #else status = reload_wprop_sc_to_site( startflag_w[k], fp_in_w[k], spin, color, F_OFFSET(psi),0); #endif /* compute eigenvalue */ herm_delt(F_OFFSET(psi),F_OFFSET(chi)); re=im=0.0; FORALLSITES(i,s){ cc = wvec_dot( &(s->chi), &(s->psi) ); re += cc.real ; } g_floatsum(&re); eigVal[j]=re; printf("trial eigenvalue of state %d %e\n",j,eigVal[j]); FORALLSITES(i,s){eigVec[j][i]=s->psi;} spin++; if((spin %4) == 0){spin=0;color++;} } }