Only call tally scoring routines when needed.

This commit is contained in:
Paul Romano 2012-02-12 21:03:07 -05:00
parent 78103849f8
commit 51a6461d69
2 changed files with 8 additions and 5 deletions

View file

@ -266,7 +266,7 @@ contains
! forward slightly so that if the mesh boundary is on the surface, it is
! still processed
if (tallies_on) then
if (tallies_on .and. n_current_tallies > 0) then
! TODO: Find a better solution to score surface currents than
! physically moving the particle forward slightly
@ -296,7 +296,7 @@ contains
! particle to change -- artificially move the particle slightly back in
! case the surface crossing in coincident with a mesh boundary
if (tallies_on) then
if (tallies_on .and. n_current_tallies > 0) then
p % coord0 % xyz = p % coord0 % xyz - TINY_BIT * p % coord0 % uvw
call score_surface_current(p)
p % coord0 % xyz = p % coord0 % xyz + TINY_BIT * p % coord0 % uvw

View file

@ -96,7 +96,8 @@ contains
end do
! Score track-length tallies
if (tallies_on) call score_tracklength_tally(p, distance)
if (tallies_on .and. n_tracklength_tallies > 0) &
call score_tracklength_tally(p, distance)
if (d_collision > d_boundary) then
last_cell = p % coord % cell
@ -166,7 +167,8 @@ contains
! since the direction of the particle will change and we need to use the
! pre-collision direction to figure out what mesh surfaces were crossed
if (tallies_on) call score_surface_current(p)
if (tallies_on .and. n_current_tallies > 0) &
call score_surface_current(p)
! Sample nuclide/reaction for the material the particle is in
call sample_reaction(p)
@ -190,7 +192,8 @@ contains
! information on the outgoing energy for any tallies with an outgoing energy
! filter
if (tallies_on) call score_analog_tally(p)
if (tallies_on .and. n_analog_tallies > 0) &
call score_analog_tally(p)
! Reset number of particles banked during collision
p % n_bank = 0