#include "analysis.h" int max_level=5; // This program makes the html files for a given simulation. // It takes as input a directory name. This directory is where // the upper html file will be placed. In this directory should // be a file named "run_parameters.dat" from which all information // about the run will be extracted. In this directory should be // several subdirectories: one for each symmetry channel. In each // of these subdirectories should be a file which contains a // summary of the fit results. // ******************************************************************* // Read lines from stream "in" starting a beginning of file until a line // is found containing the string "match". Returns value 1 if successful, // 0 otherwise. Returns the line in "str" if substring_flag=0, otherwise // it returns in "str" that part of the string which comes after the matched // pattern. int read_lines_until(ifstream& in, charString& str, const charString& match, int substring_flag) { const int maxline=132; static char ff[maxline]; int j,flag; in.clear(); // in case eof reached in.seekg(0,ios::beg); // go back to beginning of file flag=0; while (!flag){ j=0; in.get(ff[j]); while ((ff[j] != '\n')&&(j<(maxline-1))&&(!in.eof())) in.get(ff[++j]); ff[j]='\0'; str=ff; flag=str.locate(match); if (flag>=0){ if (substring_flag) str=str.right_substring(match); return 1; } else flag=0; if (in.eof()){ in.clear(); return 0;} } return 0; } // ******************************************************************* int error_quit(ifstream& in, ofstream& out, const charString& message) { in.close(); out.close(); cerr << " ERROR RETURN: "<=0) flag=1; else{ cerr << " problem with file"<=0){ answer_string="------------"; Qval=-1.0; answer=0.0; st_dev=-1.0; } else{ str=str.right_substring("Final fit result:"); // cout << "str = "<=0){ Rstrings(Norientations)=str; Rfilenames(Norientations)="R"+str.substring('(',','); orientations(Norientations)=0; } else{ Rstrings(Norientations)=str; Rfilenames(Norientations)="PD_R"+str.substring('(',','); orientations(Norientations)=1; } } else if (Nspace_dim==3){ if (str.locate(",0,0)")>=0){ Rstrings(Norientations)=str; Rfilenames(Norientations)="R"+str.substring('(',','); orientations(Norientations)=0; } else if (str.locate(",0)")>=0){ Rstrings(Norientations)=str; Rfilenames(Norientations)="PD_R"+str.substring('(',','); orientations(Norientations)=1; } else{ Rstrings(Norientations)=str; Rfilenames(Norientations)="CD_R"+str.substring('(',','); orientations(Norientations)=2; } } flag=0;} else flag=1; if (in.eof()){ in.clear(); return 0;} } return 0; } // ******************************************************************* // // DRIVER ROUTINE // // ******************************************************************* int write_pages(const charString& directory, const charString& mainoutfile, const charString& run_name, int Nspace_dim, int Nirreps, const Svector& labels, double glueball_mass) { int i,j,k,l,row,col,Ncol,flag; const int maxcol=8; double Qval,ans,st_dev; charString answer,str,stub; // **************************** // // first, extract run parameters from the run_parameters.dat file, // and get scale parameter information // // **************************** char *ifname=convert_to_charstar(directory+"/run_parameters.dat"); ifstream in(ifname); delete [] ifname; if (!in){ cerr << " *** error opening file run_parameters.dat"<')!=tmp) tmp=tmp.right_relax_substring('>'); sigma_inv=tmp+"."+str.substring('.',')')+")";} } scalein.close(); char *zfname=convert_to_charstar(directory+"/scale/zxi.html"); ifstream zin(zfname); delete [] zfname; if (!zin){ zxi="???";} else{ if (read_lines_until(zin,str,"Z_xi",1)==0) zxi="???"; else{ charString tmp=str.left_substring('.'); while (tmp.right_relax_substring('>')!=tmp) tmp=tmp.right_relax_substring('>'); zxi=tmp+"."+str.substring('.',')')+")";} } zin.close(); char *fname=convert_to_charstar(mainoutfile); ofstream out(fname); delete [] fname; if (!out){ cerr << " *** error opening file "<" << endl; out << "" << endl; out << " Run " << run_name <<" "<"<"<"<"<"<"<" << endl; out << ""<"<"<"<"<Run "<"<"< RUN PARAMETERS"<"<"< Improved anisotropic action "< beta "<"< input anisotropy a_s / a_t "<"< input u_t "<"< input u_s "<"<"<"<"< Individual term couplings: "< spatial plaquette "<"< temporal plaquette "<"< spatial 2x1 rectangle "<"< 2s x 1t rectangle "<"< 2t x 1s rectangle "<"<"<"<"<"< lattice size "<"< scale setting a_s a_t sigma "<"< inverse scale 1/(a_s a_t sigma) "<"< anisotropy renormalization Z_xi "<"<"<"<"<"< Configuration updating parameters: "< number of bins "<"< number of measurements per bin "<"< number of updates between measurements "<"< number of Cabibbo-Marinari sweeps per update "<"< number of over-relaxation sweeps (all links) per update "<"< number of over-relaxation sweeps (spatial links) per update "<"< number of over-relaxation sweeps per update "<"<"<"<"< Blocking parameters: "< blocking alpha "<"< blocking levels "<"< Link smearing parameters: "< alpha (staple weight) "<"< number of levels "<"< Thermal averaging of temporal links: "< number of Cabibbo-Marinari hits "<"< done analytically "<"<"<"<"<"< Correlator information: "< Maximum time separation measured "<"< Perpendicular spatial-translation increment "<"< Parallel spatial-translation increment "<"< Temporal-translation increment "<"< Number of optimized operators retained "<"< Optimized on time slices "<"<"<"<"< Number of operators before fuzzing: "<"<"<"<"<"<

"< Remarks concerning effective mass plots:"<"<principal effective mass
values as defined by "< Eq. (5.18)
"<"<
"<N effective"<N physical masses as the temporal separation"<
"<red
indicate energies lying higher than one glueball mass"<amber indicate fits with quality factor"<Q<0.1.

"< "<.



"< RAW RESULTS
(in terms of temporal lattice spacing)
"<"<2)) Ncol--; // reduce by one so last table has at least 2 columns out << "" <"<" <"<"<"<= (ans_mean(1,row)+glueball_mass)){ out <<""<=0.1) out <<""<=0.0) out <<""<" << answer <<""< -------------"<"<"<

"<0){ gapdatafilenames.reset(Ngaplevels); gaplevelnames.reset(Ngaplevels); gaplevelstubs.reset(Ngaplevels); Ngaplevels=0; for (i=1;i<=Nirreps;i++){ for (j=0;j<=max_level;j++){ for (l=1;l<=Norientations;l++){ stub=directory+"/"+labels(i)+"/"+labels(i); for (k=1;k<=j;k++) stub=stub+"p"; stub=stub+"_gap"; str=stub; if (orientations(l)==1) str=str+"_PD"; else if (orientations(l)==2) str=str+"_CD"; str=str+"_res.dat"; indata.clear(); indata.open(str.convert_to_charstar()); if (indata){ Ngaplevels++; gapdatafilenames(Ngaplevels)=stub; gaplevelnames(Ngaplevels)=labels(i); for (k=1;k<=j;k++) gaplevelnames(Ngaplevels)=gaplevelnames(Ngaplevels)+"'"; gaplevelstubs(Ngaplevels)=labels(i)+"/"+labels(i); for (k=1;k<=j;k++) gaplevelstubs(Ngaplevels)=gaplevelstubs(Ngaplevels)+"p"; gaplevelstubs(Ngaplevels)=gaplevelstubs(Ngaplevels)+"_gap"; indata.close(); l=Norientations+1; break; } indata.close(); } }} cout << "Ngaplevels="< RAW GAP (above "<< labels(1) <<") RESULTS
(in terms of temporal lattice spacing)
"<"<2)) Ncol--; // reduce by one so last table has at least 2 columns out << "
R " << Rstrings(row)<<" " << answer <<"" << answer <<"" << answer <<"
" <"<" <"<"<"<= glueball_mass){ out <<""<=0.1) out <<""<=0.0) out <<""<" << answer <<""< -------------"<"<"<

"< RAW RESULTS PLOTS "<"<
"<"<"<"<"<

"< TEXTUAL DATA FILES"<"<
"<"<"<

"<"<"<"<"<"<
"<"<"<"<"< Fit results"<"<"<"<"<"<Fit results for the energy of the
"< stationary states of the gauge field
"<in the presence of a static source-antisource pair
"< for "< R = "<"< for Run "<

"<"<
"<0.0){ out << "



"<"<

"<"<"<"<"<"<"<"<"< Fit results"<"<"<"<"<"<Fit results for the energy of the
"< "<"< stationary state of the gauge field
"<in the presence of a static source-antisource pair
"< for Run "<

"<"<
"<0.0){ out << "



"<"<

"<"<"<"<"<"<"<"<"< Fit results"<"<"<"<"<"<Fit results for the energy gap of the
"< stationary states of the gauge field
"<in the presence of a static source-antisource pair
"< above the ground state for "< R = "<"< for Run "<

"<"<
"<0.0){ out << "



"<"<

"<"<"<"<"<"<"<"<"< Fit results"<"<"<"<"<"<Fit results for the energy gap of the
"< "<"< stationary state of the gauge field
"<in the presence of a static source-antisource pair
"< above the ground state for Run "<

"<"<
"<0.0){ out << "



"<"<

"<"<"<"<"<"<"<Ncol) Ncol=Rstrings(i).length(); fname=convert_to_charstar("all_results.dat"); out.clear(); out.open(fname); delete [] fname; if (!out){ cerr << " *** error opening file all_results.dat"<0.0){ out <<" "; out.width(Ncol); out << Rstrings(i)<<" "<0.0){ out <<" "; out.width(Ncol); out << Rstrings(i)<<" "<
R " << Rstrings(row)<<" " << answer <<"" << answer <<"" << answer <<""<Energies plotted against R
"<Energy gaps above "<
"<Energy gaps above "<
"<Energy gaps above "<N Pi/R
"<Energies
"<Energy gaps above "<