mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Only call tally scoring routines when needed.
This commit is contained in:
parent
78103849f8
commit
51a6461d69
2 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue