Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hack to enable plotting without sequence (do not merge) #967

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/cmake.yml
Expand Up @@ -131,6 +131,7 @@ jobs:

- name: Install MAD-X build dependencies
run: |
sudo apt-get update
sudo apt-get install -qy \
libblas-dev \
liblapack-dev \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/make.yml
Expand Up @@ -41,6 +41,7 @@ jobs:
- name: Install dependencies
run: |
set -ex
sudo apt-get update
sudo apt-get install -qy \
libblas-dev \
liblapack-dev \
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/manylinux.yml
Expand Up @@ -87,7 +87,9 @@ jobs:
ln -sf bin/numdiff$ARCH .

- name: Install runtime dependencies
run: sudo apt-get install -qy gnuplot
run: |
sudo apt-get update \
sudo apt-get install -qy gnuplot

- name: Run tests
# Skip 32bit build - it's broken and mind-boggelingly slow (>>2h)!
Expand Down
2 changes: 2 additions & 0 deletions doc/latexuguide/thintrack.tex
Expand Up @@ -265,6 +265,8 @@ \section{TRACK}

\ttitem{UPDATE} flag to trigger parameter update per turn. \\
(Default:~false) \\
\textbf{Note} that \ttitem{tr\$macro} needs to be defined even if only the access
to the turn number \texttt{tr\$turni} is used.
Specifying \texttt{UPDATE=true} gives access to the following additions:
\begin{madlist}
\ttitem{tr\$turni} this special variable contains the turn number;
Expand Down
2 changes: 1 addition & 1 deletion src/mad_elem.c
Expand Up @@ -187,7 +187,7 @@ enter_elm_reference(struct in_cmd* cmd, struct element* el, int flag, int isupda
current_node->from_name = permbuff(from);
nupdates = 2;
}
if (isupdating==0) check_for_update_in_seq(el, cmd->clone, nupdates);
if (isupdating==0) check_for_update_in_seq(el, cmd->clone, nupdates);
}

static int
Expand Down
9 changes: 8 additions & 1 deletion src/mad_plot.c
Expand Up @@ -133,6 +133,7 @@ exec_plot(struct in_cmd* cmd)
struct table* p_table = NULL;
const char *table_name = NULL, *file_name = NULL;
char *last_twiss_table, *trackfile;
struct command* tmp_command;
char track_file_name[NAME_L], ps_file_name[NAME_L];
char plot_title[TITLE_SIZE], version[TITLE_SIZE];
FILE *gpu;
Expand All @@ -142,7 +143,13 @@ exec_plot(struct in_cmd* cmd)

/* use correct beam for sequence to be plotted - HG 031127 */
struct command* keep_beam = current_beam;
if (attach_beam(current_sequ) == 0)
tmp_command = clone_command(this_cmd->clone);
if (attach_beam(current_sequ) == 0){
char mychar [100] = "resbeam; neverusedsequencename632:sequence, l=10; q1:quadrupole, at=1; endsequence;";
pro_input(mychar);
this_cmd->clone = clone_command(tmp_command);
}
if (attach_beam(current_sequ) == 0)
fatal_error("PLOT - sequence without beam:", current_sequ->name);
/* end part1 of HG 031127 */

Expand Down