Changeset 11 in TRACY3 for trunk/tracy/tools


Ignore:
Timestamp:
Oct 21, 2013, 10:40:43 AM (11 years ago)
Author:
zhangj
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tracy/tools/soltracy.cc

    r10 r11  
    4141  globval.H_exact = false;
    4242
     43 
     44  //output files
     45  char fic_twiss[S_SIZE + 4] = "";   //twiss file
     46  char fic_summary[S_SIZE + 4]="";   //summary file
     47 
     48 
    4349  /* parameters to read the user input script .prm */
    4450  long i=0L; //initialize the for loop to read command string
     
    99105  else
    100106    globval.ge = ElemIndex(ge_name);
    101  
     107 
     108 
    102109//  globval.g = ElemIndex("g");  /* get family index of  girder*/
    103    
    104   /* print the summary of the element in lattice */ 
     110 strcpy(fic_twiss,lat_file);
     111  strcpy(fic_summary,lat_file);
     112  strcat(fic_twiss,".twi");
     113  strcat(fic_summary,".sum");
     114 
     115    //generate the twiss and summary files with proper appendix 
     116  /* print the summary of the element in lattice to the screen and an external file*/ 
    105117  printglob();   
     118  printglob2file(fic_summary);
     119 //print the twiss file
     120   /* print out lattice functions, with all the optical information for the lattice with design values */
     121  printlatt(fic_twiss); 
     122 
    106123  /************************************************************************
    107124    print files, very important file for debug
     
    246263   }
    247264   
     265   else if(strcmp(CommandStr,"PrintTrackElemFlag") == 0) {
     266      cout << "\n";
     267      cout << "print the tracked coordinates to file: "
     268           << UserCommandFlag[i]._PrintTrackElem_track_file << "\n";
     269       
     270      PrintTrackElem(UserCommandFlag[i]._PrintTrackElem_track_file,
     271                 UserCommandFlag[i]._PrintTrackElem_x, UserCommandFlag[i]._PrintTrackElem_px,
     272                 UserCommandFlag[i]._PrintTrackElem_y, UserCommandFlag[i]._PrintTrackElem_py,
     273                 UserCommandFlag[i]._PrintTrackElem_delta,UserCommandFlag[i]._PrintTrackElem_ctau,
     274                 UserCommandFlag[i]._PrintTrackElem_nelem1,UserCommandFlag[i]._PrintTrackElem_nelem2); 
     275   }
    248276    //print the girder
    249277  // else if(strcmp(CommandStr,"PrintGirderFlag") == 0) {
     
    462490 //        UserCommandFlag[i]._FmapFlag_delta,
    463491 //        UserCommandFlag[i]._FmapFlag_diffusion,
     492 //        UserCommandFlag[i]._FmapFlag_printloss,
    464493 //        numprocs,myid);
    465494
     
    514543           UserCommandFlag[i]._FmapFlag_ymax,
    515544           UserCommandFlag[i]._FmapFlag_delta,
    516            UserCommandFlag[i]._FmapFlag_diffusion);
     545           UserCommandFlag[i]._FmapFlag_diffusion,
     546           UserCommandFlag[i]._FmapFlag_printloss);
    517547      //#endif
    518548  }
     
    542572 //          UserCommandFlag[i]._FmapdpFlag_z,
    543573 //          UserCommandFlag[i]._FmapdpFlag_diffusion,
     574 //            UserCommandFlag[i]._FmapdpFlag_printloss,
    544575 //          numprocs,myid);
    545576
     
    594625              UserCommandFlag[i]._FmapdpFlag_emax,
    595626              UserCommandFlag[i]._FmapdpFlag_z,
    596               UserCommandFlag[i]._FmapdpFlag_diffusion);
     627              UserCommandFlag[i]._FmapdpFlag_diffusion,
     628               UserCommandFlag[i]._FmapdpFlag_printloss);
    597629       //  #endif
    598630  }
Note: See TracChangeset for help on using the changeset viewer.