Skip to content

Commit

Permalink
Merge pull request #651 from bmad-sim/devel/57
Browse files Browse the repository at this point in the history
Fix potential round-off error problem.
  • Loading branch information
DavidSagan authored Nov 26, 2023
2 parents cb8fd76 + f10d252 commit b22cbd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bmad/low_level/track1_runge_kutta.f90
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ subroutine track1_runge_kutta (orbit, ele, param, err_flag, track, mat6, make_ma
! Track.
! Note that if ele is a slave, ele%field_calc = refer_to_lords$ and no error message is printed.

if ((ele%key == lcavity$ .or. ele%key == rfcavity$) .and. &
ele%field_calc == bmad_standard$ .and. ele%value(l$) < ele%value(l_active$)) then
if ((ele%key == lcavity$ .or. ele%key == rfcavity$) .and. ele%field_calc == bmad_standard$ .and. &
ele%value(l$) < ele%value(l_active$) - 0.1*bmad_com%significant_length) then
call out_io (s_error$, r_name, 'RUNGE-KUTTA TRACKING THROUGH A CAVITY: ' // ele%name, &
'WILL NOT BE ACCURATE SINCE THE LENGTH IS LESS THAN THE HARD EDGE MODEL LENGTH.')
endif
Expand Down

0 comments on commit b22cbd3

Please sign in to comment.