Skip to content

Commit

Permalink
Turn spin tracking on if needed in Tao. (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSagan authored Nov 16, 2024
1 parent 6ec1eb6 commit aa9c7e8
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tao/code/tao_evaluate_a_datum.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2644,10 +2644,7 @@ recursive subroutine tao_evaluate_a_datum (datum, u, tao_lat, datum_value, valid

case ('spin.')

if (.not. bmad_com%spin_tracking_on) then
call tao_set_invalid (datum, 'NO SPIN TRACKING WHEN BMAD_COM%SPIN_TRACKING_ON = FALSE!', why_invalid)
return
endif
if (.not. bmad_com%spin_tracking_on) call tao_spin_tracking_turn_on()

select case (data_type)

Expand Down Expand Up @@ -2713,10 +2710,7 @@ recursive subroutine tao_evaluate_a_datum (datum, u, tao_lat, datum_value, valid

if (data_source == 'beam') goto 9000 ! Set error message and return

if (.not. bmad_com%spin_tracking_on) then
call tao_set_invalid (datum, 'NO SPIN TRACKING WHEN BMAD_COM%SPIN_TRACKING_ON = FALSE!', why_invalid)
return
endif
if (.not. bmad_com%spin_tracking_on) call tao_spin_tracking_turn_on()

call tao_spin_polarization_calc(branch, tao_branch)

Expand Down

0 comments on commit aa9c7e8

Please sign in to comment.