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

fix order due to PR install #1139

Merged
merged 3 commits into from Sep 29, 2022
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
8 changes: 4 additions & 4 deletions src/mad_node.c
Expand Up @@ -531,20 +531,20 @@ store_node_value(const char* par, double* value)

else if (strcmp(lpar, "k0") == 0) {
store_comm_par_value("k0",*value,el->def);
el->def->par_names->inform[8] = 1;
// el->def->par_names->inform[8] = 1;
}

else if (strcmp(lpar, "k1") == 0) store_comm_par_value("k1",*value,el->def);
else if (strcmp(lpar, "k2") == 0) store_comm_par_value("k2",*value,el->def);
// The inform is to make sure they are written out to a new sequence.
else if (strcmp(lpar, "ktap") == 0) {
store_comm_par_value("ktap",*value,el->def);
el->def->par_names->inform[9] = 1; // for quads and sextupoles
el->def->par_names->inform[23] = 1; // for bends
// el->def->par_names->inform[9] = 1; // for quads and sextupoles
// el->def->par_names->inform[23] = 1; // for bends
}
else if (strcmp(lpar, "lagtap") == 0) {
store_comm_par_value("lagtap",*value,el->def);
el->def->par_names->inform[9] = 1;
// el->def->par_names->inform[9] = 1;
}
else if (strcmp(lpar, "lag") == 0) store_comm_par_value("lag",*value,el->def);

Expand Down
6 changes: 5 additions & 1 deletion src/mad_seq.c
Expand Up @@ -810,7 +810,11 @@ export_sequence(struct sequence* sequ, FILE* file, int noexpr)
strcat(c_dum->c, c_node->from_name);
}
if(c_node->perm_misalign==1) write_permalign_node(c_node);

//if(c_node->ktap!=0) {
// strcat(c_dum->c, ", ktap = ");
// sprintf(num, v_format("%F"), c_node->ktap);
// strcat(c_dum->c, supp_tb(num));
//};
if (exp_par_flag) export_el_def(c_node->p_elem, c_dum->c, noexpr);
write_nice(c_dum->c, file);
}
Expand Down
20 changes: 10 additions & 10 deletions tests/test-c6t-4/fc.2.ref
@@ -1,7 +1,7 @@
SINGLE ELEMENTS---------------------------------------------------------
atlaspipe1.r1_AP 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
ip1 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
ip1_AP 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
atlaspipe1.r1_AP 0 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
drift_0 0 0.000000000000000e+00 0.000000000000000e+00 3.696700000000000e-01 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
drift_1 0 0.000000000000000e+00 0.000000000000000e+00 3.696600000000000e-01 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
drift_4 0 0.000000000000000e+00 0.000000000000000e+00 2.133000000000007e-02 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00
Expand Down Expand Up @@ -1533,7 +1533,7 @@ BLOC488 drift_8425
BLOC489 drift_8426
NEXT
STRUCTURE INPUT---------------------------------------------------------
atlaspipe1.r1_AP ip1 ip1_AP
ip1 ip1_AP atlaspipe1.r1_AP
BLOC1 atlaspipe1.r1_AP BLOC2
atlaspipe1.r1_AP BLOC1 atlaspipe1.r1_AP
BLOC1 atlaspipe1.r1_AP BLOC3
Expand Down Expand Up @@ -2904,8 +2904,8 @@ ip1_AP BLOC151
BLOC151 ip1_AP BLOC152
ip1_AP BLOC151 ip1_AP
BLOC151 ip1_AP BLOC152
ip1_AP BLOC151 ip1_AP
ip2 ip1_AP BLOC157
ip1_AP BLOC151 ip2
ip1_AP ip1_AP BLOC157
ip1_AP BLOC157 ip1_AP
BLOC157 alicepipe3.r2_AP BLOC157
alicepipe4.r2_AP BLOC157 alicepipe5.r2_AP
Expand Down Expand Up @@ -6598,8 +6598,8 @@ cmspipe7.l5_AP BLOC1
BLOC2 cmspipe5.l5_AP BLOC1
cmspipe4.l5_AP BLOC1 cmspipe4.l5_AP
BLOC2 cmspipe4.l5_AP BLOC1
cmspipe4.l5_AP cmspipe4.l5_AP ip5
ip1_AP BLOC1 cmspipe4.l5_AP
ip5 ip1_AP cmspipe4.l5_AP
cmspipe4.l5_AP BLOC1 cmspipe4.l5_AP
BLOC2 cmspipe4.l5_AP BLOC1
cmspipe4.l5_AP BLOC1 cmspipe5.l5_AP
BLOC2 cmspipe6.l5_AP BLOC1
Expand Down Expand Up @@ -10259,8 +10259,8 @@ atlaspipe30.r1_AP BLOC457
BLOC457 atlaspipe30.r1_AP BLOC457
atlaspipe30.r1_AP BLOC457 atlaspipe30.r1_AP
BLOC457 atlaspipe30.r1_AP BLOC457
atlaspipe30.r1_AP BLOC457 atlaspipe30.r1_AP
ip8 ip8_AP BLOC460
atlaspipe30.r1_AP BLOC457 ip8
ip8_AP atlaspipe30.r1_AP BLOC460
lhcbpipe1.r8_AP BLOC461 lhcbpipe2.r8_AP
BLOC460 lhcbpipe3.r8_AP BLOC460
lhcbpipe4.r8_AP BLOC461 lhcbpipe5.r8_AP
Expand Down Expand Up @@ -11614,6 +11614,6 @@ BLOC1 atlaspipe1.r1_AP
mbas2.1r1 mbas2.1r1_AP BLOC3
atlaspipe1.r1_AP BLOC1 atlaspipe1.r1_AP
BLOC1 atlaspipe1.r1_AP BLOC2
atlaspipe1.r1_AP BLOC1 atlaspipe1.r1_AP
ip1.l1 ip1_AP
atlaspipe1.r1_AP BLOC1 ip1.l1
ip1_AP atlaspipe1.r1_AP
NEXT
2 changes: 1 addition & 1 deletion tests/test-c6t-4/fc.3.aper.ref
@@ -1,5 +1,5 @@
atlaspipe1.r1_AP CR 23.500 0.000 0.000 0.000 0.000 0.000 0.000
ip1_AP CR 29.000 0.000 0.000 0.000 0.000 0.000 0.000
atlaspipe1.r1_AP CR 23.500 0.000 0.000 0.000 0.000 0.000 0.000
mbas2.1r1_AP RL 9999.999 9999.999 9999.999 9999.999 0.000 0.000 0.000
atlaspipe11.r1_AP CR 25.060 0.000 0.000 0.000 0.000 0.000 0.000
atlaspipe30.r1_AP CR 40.000 0.000 0.000 0.000 0.000 0.000 0.000
Expand Down