Changeset 32 in TRACY3 for trunk/tracy/tracy/src/t2lat.cc


Ignore:
Timestamp:
Apr 9, 2014, 3:50:11 PM (10 years ago)
Author:
zhangj
Message:

active the transport of the twiss functions and orbits of the transfer line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tracy/tracy/src/t2lat.cc

    r11 r32  
    258258static long CheckUDItable(const char *name, struct LOC_Lattice_Read *LINK)
    259259{
    260   long  i, j, FORLIM;
     260  long  i=0, j=0, FORLIM=0;
    261261
    262262  j = 0;
     
    26522652    QL = 0.0;   /* L */
    26532653    QKick = 0.0; /* kick angle of the corrector [rad]*/
    2654     Kplane = 0;   /* 1 is horizontal corrector, -1 is vertical corrector */
    2655     k1 = 1;     /* N */
    2656     k2 = Meth_Linear;   /* method */
    2657     dt = 0.0;
     2654    Kplane = 1;   /* 1 is horizontal corrector, -1 is vertical corrector */
     2655    k1 = 1;     /* N, cut piece of corrector */
     2656    k2 = Meth_Linear;   /* integartion method */
     2657    dt = 0.0;    /* roll angle of the corrector */
    26582658    ClearHOMandDBN(&V);
    26592659    getest__(P_expset(SET, 1 << ((long)comma)), "<, > expected", &V);
     
    26682668      P_addset(mysys, (long)rollsym);
    26692669      P_addset(mysys, (long)dbnsym);
    2670       do {   /*5: read L, K, N, T, T1, T2 */
     2670      do {   /*5: read L, kick angle, cut piece, integartion method, roll angle, T2 */
    26712671        test__(mysys, "illegal parameter", &V); sym1 = *V.sym;
    26722672        if (*V.sym == (long)dbnsym || *V.sym == (long)rollsym ||
     
    27142714            else if (sym1 == versym)
    27152715              Kplane = -1;
     2716            else{
     2717              cout << "t2lat: Error! Must specify the type of the corrector, Horizontal or vertical!" << endl;
     2718              exit_(1);
     2719            }
    27162720            GetSym__(&V);
    27172721          }
     
    27432747      WITH2->PN = k1;
    27442748      WITH2->PdTpar = dt;
    2745 
    2746         if(Kplane == 0){
    2747                 cout << "t2lat: Error! Must specify the type of the corrector, Horizontal or vertical!" << endl;
    2748                 exit_(1);
    2749             }
    27502749      WITH2->PBpar[Kplane*Dip + HOMmax] = -1*QKick;  //assign the kick angle [rad]
    27512750 
     
    37553754  Reg("inv            ", invsym, &V);
    37563755  Reg("kick           ", corkicksym, &V); /* with "corrector", define the kick angle of the corrector ,  Jianfeng Zhang*/
    3757   Reg("kicker         ", kicksym, &V);
     3756 //Reg("kicker         ", kicksym, &V); /*overlap with the lattice element type: corrector*/
    37583757  Reg("ks             ", kssym, &V);
    37593758  Reg("lambda         ", lmdsym, &V);
     
    41214120void GetEnergy(struct LOC_Lattice_Read *LINK)
    41224121{
    4123   long k;
     4122  long k=0;
    41244123
    41254124  k = CheckUDItable("energy         ", LINK);
     
    41374136void GetRingType(struct LOC_Lattice_Read *LINK)
    41384137{
    4139   long k;
     4138  long k=0;
    41404139
    41414140  k = CheckUDItable("ringtype       ", LINK);
Note: See TracChangeset for help on using the changeset viewer.