source: TRACY3/trunk/tracy/tracy/inc/t2elem.h @ 11

Last change on this file since 11 was 11, checked in by zhangj, 11 years ago
  • Property svn:executable set to *
File size: 4.1 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,double h_bend, ss_vect<T> &x);
41
42template<typename T>
43void Drift(double L, ss_vect<T> &x);
44
45template<typename T>
46void bend_fringe(double hb, ss_vect<T> &x);
47
48template<typename T>
49void bend_fringe(double hb, double gap, ss_vect<T> &x);
50
51template<typename T>
52static void bendCurvature(double irho, double H, ss_vect<T> &x); 
53
54template<typename T>
55static void EdgeFocus(double irho, double phi, double gap, ss_vect<T> &x, bool Entrance);
56
57template<typename T>
58void quad_fringe(double b2, ss_vect<T> &x);
59
60
61template<typename T>
62void Drift_Pass(CellType &Cell, ss_vect<T> &x);
63
64template<typename T>
65void dipole_kick(double L, double h_ref, double h_bend, ss_vect<T> &x);
66template<typename T>
67void multipole_kick(int Order, double MB[], double L, double h_bend, ss_vect<T> &x);
68
69template<typename T>
70void thin_kick(int Order, double MB[], double L, double h_bend, double h_ref,
71               ss_vect<T> &x);
72
73template<typename T>
74void Mpole_Pass(CellType &Cell, ss_vect<T> &x);
75
76template<typename T>
77void Marker_Pass(CellType &Cell, ss_vect<T> &X);
78
79template<typename T>
80void Cav_Pass(CellType &Cell, ss_vect<T> &X);
81
82template<typename T>
83void Wiggler_pass_EF(const elemtype &elem, ss_vect<T> &x);
84
85template<typename T>
86void Wiggler_pass_EF2(int nstep, double L, double kxV, double kxH, double kz, 
87                      double BoBrhoV, double BoBrhoH, double phi,
88                      ss_vect<T> &x);
89
90template<typename T>
91void Wiggler_pass_EF3(const elemtype &elem, ss_vect<T> &x);
92
93template<typename T>
94void Wiggler_Pass(CellType &Cell, ss_vect<T> &X);
95
96template<typename T>
97void FieldMap_Pass(CellType &Cell, ss_vect<T> &X);
98
99template<typename T>
100void Insertion_Pass(CellType &Cell, ss_vect<T> &x);
101
102template<typename T>
103void sol_pass(const elemtype &elem, ss_vect<T> &x);
104
105template<typename T>
106void Solenoid_Pass(CellType &Cell, ss_vect<T> &x);
107
108
109void Drift_SetMatrix(int Fnum1, int Knum1);
110
111void Insertion_SetMatrix(int Fnum1, int Knum1);
112
113
114void Mpole_SetPB(int Fnum1, int Knum1, int Order);
115
116void Wiggler_SetPB(int Fnum1, int Knum1, int Order);
117
118
119void GtoL_M(Matrix &X, Vector2 &T);
120
121void LtoG_M(Matrix &X, Vector2 &T);
122
123void Drift_Pass_M(CellType &Cell, Vector &xref, Matrix &X);
124
125void thin_kick_M(int Order, double MB[], double L, double irho,
126                 Vector &xref, Matrix &x);
127
128void Mpole_Pass_M(CellType &Cell, Vector &xref, Matrix &x);
129
130void Wiggler_Pass_M(CellType &Cell, Vector &xref, Matrix &x);
131
132void Insertion_Pass_M(CellType &Cell, Vector &xref, Matrix &M);
133
134
135void MulLsMat(Matrix &A, Matrix &B);
136
137void LinsTrans(Matrix &A, Vector &b);
138
139
140void Drift_Alloc(elemtype *Elem);
141
142void Mpole_Alloc(elemtype *Elem);
143
144void Cav_Alloc(elemtype *Elem);
145
146void Wiggler_Alloc(elemtype *Elem);
147
148void FieldMap_Alloc(elemtype *Elem, const bool alloc_fm);
149
150void Insertion_Alloc(elemtype *Elem);
151
152void Spreader_Alloc(elemtype *Elem);
153
154void Recombiner_Alloc(elemtype *Elem);
155
156void Solenoid_Alloc(elemtype *Elem);
157
158
159void SI_init(void);
160
161void Drift_Init(int Fnum1);
162
163void Mpole_Init(int Fnum1);
164
165void Wiggler_Init(int Fnum1);
166
167void FieldMap_Init(int Fnum1);
168
169void Cav_Init(int Fnum1);
170
171void Marker_Init(int Fnum1);
172
173void Insertion_Init(int Fnum1);
174
175void Spreader_Init(int Fnum1);
176
177void Recombiner_Init(int Fnum1);
178
179void Solenoid_Init(int Fnum1);
180
181
182void get_B(const char *file_name, FieldMapType *FM);
183
184double Elem_GetKval(int Fnum1, int Knum1, int Order);
185
186void Mpole_SetdS(int Fnum1, int Knum1);
187
188void Mpole_SetdT(int Fnum1, int Knum1);
Note: See TracBrowser for help on using the repository browser.