Skip to content

Commit

Permalink
check for existing data before radiation_map_setup
Browse files Browse the repository at this point in the history
  • Loading branch information
electronsandstuff committed Sep 30, 2023
1 parent 93f2d7f commit a2676f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bmad/modules/radiation_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ subroutine track1_radiation (orbit, ele, edge)
end select

! Use stochastic and damp mats

call radiation_map_setup(ele)
! Only setup if the element produces radiation and there isn't existing non-stale data
if ((ele%value(l$) /= 0 .and. ele%key /= taylor$) .and. (.not. associated(ele%rad_map) .or. ele%rad_map%stale)) then
call radiation_map_setup(ele)
endif

if (edge == start_edge$) then
rad_map = ele%rad_map%rm0
Expand Down

0 comments on commit a2676f8

Please sign in to comment.