Skip to content

Commit 184f7a7

Browse files
committed
Documentation and also update some tests
1 parent 068bab5 commit 184f7a7

File tree

5 files changed

+675
-655
lines changed

5 files changed

+675
-655
lines changed

doc/latexuguide/elements.tex

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1810,4 +1810,26 @@ \section{Change of reference system}
18101810
be referred to the new coordinate system where both translations and
18111811
rotations are applied.
18121812

1813-
%%% END
1813+
1814+
\section{SixTrack Marker}
1815+
1816+
\madbox{
1817+
label: SIXMARKER, \= ELTYPE=real, ATTR=\{real, \ldots \}, \\
1818+
\> F3STRING=string, F3VECTOR=\{real, \ldots \} ;
1819+
}
1820+
f3string="NEW ELEMENT {newline} {0}, {1} {newline}NEXT"
1821+
The \texttt{SIXMARKER} element allows the definition of an arbitrary marker that is converted to SixTrack.
1822+
The element has no impact in MAD-X.
1823+
\begin{madlist}
1824+
\ttitem{ELTYPE} is the element type number in SixTrack, converted to the first column in fc.2.
1825+
\ttitem{ATTR} This defines the remaining columns of the fc.2 file.
1826+
\ttitem{F3STRING} Defines the String that is written to the fc.3 file, \{newline\} creates a new line in the output
1827+
and \{0\}\ldots\{10\} are being replaced with the values in F3VECTOR.
1828+
\ttitem{F3VECTOR} The values defined will be converted to the location defined in the F3STRING.
1829+
\end{madlist}
1830+
1831+
\textbf{Example:}
1832+
\madxmp{
1833+
DR1: \= DRIFT, \= L=1.5; \\
1834+
DR2: \> DRIFT, \> L=DR1->L;
1835+
}

src/mad_6track.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3251,10 +3251,10 @@ write_f3_sixmarker(struct element* el){
32513251
if (!f3) f3 = fopen("fc.3", "w");
32523252

32533253
tmp =command_par_string("f3string",el->def);
3254-
nl = element_vector(el, "attr", attrtemp);
3254+
nl = element_vector(el, "f3vector", attrtemp);
32553255

32563256
for(int i=0; i<nl; i++){
3257-
3257+
32583258
sprintf(str_att_value, "%12.8e", attrtemp[i]);
32593259

32603260
strcpy(nstr2,"{");

tests/test-c6t-7/fc.3.ref

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
NEW ELEMENT
2-
1.00000000e-01, 2.00000000e+00
1+
NEW_ELEMENT
2+
2.00000000e-01, 5.00000000e-01
33
NEXT

tests/test-c6t-7/test-c6t-7.madx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
circum=10;
22

3-
sm1:sixmarker, eltype=2, attr={0.1,2,3,4,5,6,7}, f3string="NEW ELEMENT {newline} {0}, {1} {newline}NEXT", f3vector={0.2, 0.5};
3+
sm1:SIXMARKER, eltype=2, attr={0.1,2,3,4,5,6,7}, f3string="NEW_ELEMENT {newline} {0}, {1} {newline}NEXT", f3vector={0.2, 0.5};
44
m1: multipole, knl={0, 0.2};
55
show, sm1;
66

0 commit comments

Comments
 (0)