Skip to content

Commit

Permalink
Fixing missing BV flag in twiss
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias committed Aug 31, 2020
1 parent 41670e7 commit a4d1964
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/mad_6track.c
Original file line number Diff line number Diff line change
Expand Up @@ -3400,7 +3400,8 @@ write_f3_wire(void)
}

fprintf(f3,name_format_short,current_element->name);
for(int i=1; i < 9; i++) fprintf(f3,name_format_6, current_element->value[i]);
fprintf(f3, "%d", (int)current_element->value[1]);
for(int i=2; i < 9; i++) fprintf(f3,name_format_6, current_element->value[i]);
fprintf(f3,"\n");
}
current_element = current_element->next;
Expand Down
5 changes: 3 additions & 2 deletions src/twiss.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3618,16 +3618,17 @@ SUBROUTINE tmbend(ftrk,fcentre,orbit,fmap,el,dl,ek,re,te,code)
fintx = g_elpar(b_fintx)
sks = g_elpar(b_k1s)
h = an / el
h_k = h
h_k = h * bvk
!---- Apply field errors and change coefficients using DELTAP.
F_ERRORS = zero
n_ferr = node_fd_errors(f_errors)
if (sk0 .ne. 0) then
f_errors(0) = f_errors(0) + sk0*el - g_elpar(b_angle)
h_k = sk0
h_k = sk0 * bvk
endif




!! if (sk0*el .ne. g_elpar(b_angle)) then
!! call element_name(name,len(name))
Expand Down

0 comments on commit a4d1964

Please sign in to comment.