Changeset 32 in TRACY3 for trunk/tracy/tracy/src/t2lat.cc
- Timestamp:
- Apr 9, 2014, 3:50:11 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tracy/tracy/src/t2lat.cc
r11 r32 258 258 static long CheckUDItable(const char *name, struct LOC_Lattice_Read *LINK) 259 259 { 260 long i , j, FORLIM;260 long i=0, j=0, FORLIM=0; 261 261 262 262 j = 0; … … 2652 2652 QL = 0.0; /* L */ 2653 2653 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 */ 2658 2658 ClearHOMandDBN(&V); 2659 2659 getest__(P_expset(SET, 1 << ((long)comma)), "<, > expected", &V); … … 2668 2668 P_addset(mysys, (long)rollsym); 2669 2669 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 */ 2671 2671 test__(mysys, "illegal parameter", &V); sym1 = *V.sym; 2672 2672 if (*V.sym == (long)dbnsym || *V.sym == (long)rollsym || … … 2714 2714 else if (sym1 == versym) 2715 2715 Kplane = -1; 2716 else{ 2717 cout << "t2lat: Error! Must specify the type of the corrector, Horizontal or vertical!" << endl; 2718 exit_(1); 2719 } 2716 2720 GetSym__(&V); 2717 2721 } … … 2743 2747 WITH2->PN = k1; 2744 2748 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 }2750 2749 WITH2->PBpar[Kplane*Dip + HOMmax] = -1*QKick; //assign the kick angle [rad] 2751 2750 … … 3755 3754 Reg("inv ", invsym, &V); 3756 3755 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*/ 3758 3757 Reg("ks ", kssym, &V); 3759 3758 Reg("lambda ", lmdsym, &V); … … 4121 4120 void GetEnergy(struct LOC_Lattice_Read *LINK) 4122 4121 { 4123 long k ;4122 long k=0; 4124 4123 4125 4124 k = CheckUDItable("energy ", LINK); … … 4137 4136 void GetRingType(struct LOC_Lattice_Read *LINK) 4138 4137 { 4139 long k ;4138 long k=0; 4140 4139 4141 4140 k = CheckUDItable("ringtype ", LINK);
Note: See TracChangeset
for help on using the changeset viewer.