source: TRACY3/branches/tracy3-3.10.1b/tracy/tracy/inc/t2elem.h @ 23

Last change on this file since 23 was 23, checked in by zhangj, 10 years ago

Clean version of Tracy: SoleilVersion at the end of 2011.Use this clean version to find the correct dipole fringe field to have the correct FMAP and FMAPDP of ThomX. Modified files: tpsa_lin.cc, soleillib.cc, prtmfile.cc, rdmfile.cc, read_script.cc, physlib.cc, tracy.cc, t2lat.cc, t2elem.cc, naffutils.cc in /tracy/tracy/src folder; naffutils.h, tracy_global.h, physlib.h, tracy.h, read_script.h, solielilib.h, t2elem.h in /tracy/tracy.inc folder; soltracy.cc in tracy/tools folder

  • Property svn:executable set to *
File size: 3.7 KB
Line 
1/* Tracy-3
2
3   J. Bengtsson, BNL 2007
4
5*/
6
7extern double  cl_rad, q_fluct, I2, I4, I5;
8
9
10void getelem(long i, CellType *cellrec);
11
12void putelem(long i, CellType *cellrec);
13
14
15int GetnKid(const int Fnum1);
16
17long Elem_GetPos(const int Fnum1, const int Knum1);
18
19
20template<typename T>
21void GtoL(ss_vect<T> &X, Vector2 &S, Vector2 &R,
22          const double c0, const double c1, const double s1);
23
24template<typename T>
25void LtoG(ss_vect<T> &X, Vector2 &S, Vector2 &R,
26          double c0, double c1, double s1);
27
28template<typename T>
29void p_rot(double phi, ss_vect<T> &x);
30
31
32template<typename T>
33void get_B2(const double h_ref, const T B[], const ss_vect<T> &xp,
34            T &B2_perp, T &B2_par);
35
36template<typename T>
37void radiate(ss_vect<T> &x, const double L, const double h_ref, const T B[]);
38
39template<typename T>
40void Drift(double L, ss_vect<T> &x);
41
42template<typename T>
43void bend_fringe(double hb, ss_vect<T> &x);
44
45template<typename T>
46static void EdgeFocus(double irho, double phi, double gap, ss_vect<T> &x);
47
48template<typename T>
49void quad_fringe(double b2, ss_vect<T> &x);
50
51
52template<typename T>
53void Drift_Pass(CellType &Cell, ss_vect<T> &x);
54
55template<typename T>
56void thin_kick(int Order, double MB[], double L, double h_bend, double h_ref,
57               ss_vect<T> &x);
58
59template<typename T>
60void Mpole_Pass(CellType &Cell, ss_vect<T> &x);
61
62template<typename T>
63void Marker_Pass(CellType &Cell, ss_vect<T> &X);
64
65template<typename T>
66void Cav_Pass(CellType &Cell, ss_vect<T> &X);
67
68template<typename T>
69void Wiggler_pass_EF(const elemtype &elem, ss_vect<T> &x);
70
71template<typename T>
72void Wiggler_pass_EF2(int nstep, double L, double kxV, double kxH, double kz, 
73                      double BoBrhoV, double BoBrhoH, double phi,
74                      ss_vect<T> &x);
75
76template<typename T>
77void Wiggler_pass_EF3(const elemtype &elem, ss_vect<T> &x);
78
79template<typename T>
80void Wiggler_Pass(CellType &Cell, ss_vect<T> &X);
81
82template<typename T>
83void FieldMap_Pass(CellType &Cell, ss_vect<T> &X);
84
85template<typename T>
86void Insertion_Pass(CellType &Cell, ss_vect<T> &x);
87
88template<typename T>
89void sol_pass(const elemtype &elem, ss_vect<T> &x);
90
91template<typename T>
92void Solenoid_Pass(CellType &Cell, ss_vect<T> &x);
93
94
95void Drift_SetMatrix(int Fnum1, int Knum1);
96
97void Insertion_SetMatrix(int Fnum1, int Knum1);
98
99
100void Mpole_SetPB(int Fnum1, int Knum1, int Order);
101
102void Wiggler_SetPB(int Fnum1, int Knum1, int Order);
103
104
105void GtoL_M(Matrix &X, Vector2 &T);
106
107void LtoG_M(Matrix &X, Vector2 &T);
108
109void Drift_Pass_M(CellType &Cell, Vector &xref, Matrix &X);
110
111void thin_kick_M(int Order, double MB[], double L, double irho,
112                 Vector &xref, Matrix &x);
113
114void Mpole_Pass_M(CellType &Cell, Vector &xref, Matrix &x);
115
116void Wiggler_Pass_M(CellType &Cell, Vector &xref, Matrix &x);
117
118void Insertion_Pass_M(CellType &Cell, Vector &xref, Matrix &M);
119
120
121void MulLsMat(Matrix &A, Matrix &B);
122
123void LinsTrans(Matrix &A, Vector &b);
124
125
126void Drift_Alloc(elemtype *Elem);
127
128void Mpole_Alloc(elemtype *Elem);
129
130void Cav_Alloc(elemtype *Elem);
131
132void Wiggler_Alloc(elemtype *Elem);
133
134void FieldMap_Alloc(elemtype *Elem, const bool alloc_fm);
135
136void Insertion_Alloc(elemtype *Elem);
137
138void Spreader_Alloc(elemtype *Elem);
139
140void Recombiner_Alloc(elemtype *Elem);
141
142void Solenoid_Alloc(elemtype *Elem);
143
144
145void SI_init(void);
146
147void Drift_Init(int Fnum1);
148
149void Mpole_Init(int Fnum1);
150
151void Wiggler_Init(int Fnum1);
152
153void FieldMap_Init(int Fnum1);
154
155void Cav_Init(int Fnum1);
156
157void Marker_Init(int Fnum1);
158
159void Insertion_Init(int Fnum1);
160
161void Spreader_Init(int Fnum1);
162
163void Recombiner_Init(int Fnum1);
164
165void Solenoid_Init(int Fnum1);
166
167
168void get_B(const char *file_name, FieldMapType *FM);
169
170double Elem_GetKval(int Fnum1, int Knum1, int Order);
171
172void Mpole_SetdS(int Fnum1, int Knum1);
173
174void Mpole_SetdT(int Fnum1, int Knum1);
Note: See TracBrowser for help on using the repository browser.