Added means of outputting lost particle tracks

This commit is contained in:
Sterling Harper 2013-06-08 14:28:21 -04:00
parent a9f7723d95
commit 8df7694b82
2 changed files with 15 additions and 0 deletions

View file

@ -363,6 +363,7 @@ module constants
integer, parameter :: UNIT_STATE = 16 ! unit # for writing state point
integer, parameter :: CMFD_BALANCE = 17 ! unit # for writing cmfd balance file
integer, parameter :: UNIT_PARTICLE = 18 ! unit # for writing particle restart
integer, parameter :: UNIT_TRACK = 19 ! unit # for writing particle tracks
!=============================================================================
! CMFD CONSTANTS

View file

@ -73,6 +73,12 @@ contains
! Force calculation of cross-sections by setting last energy to zero
micro_xs % last_E = ZERO
if (run_mode == MODE_PARTICLE) then
open(UNIT=UNIT_TRACK, FILE='test', STATUS='replace', &
ACCESS='stream')
write(UNIT_TRACK) p % coord0 % xyz
end if
do while (p % alive)
! Calculate microscopic and macroscopic cross sections -- note: if the
@ -100,6 +106,10 @@ contains
coord % xyz = coord % xyz + distance * coord % uvw
coord => coord % next
end do
if (run_mode == MODE_PARTICLE) then
write(UNIT_TRACK) p % coord0 % xyz
end if
! Score track-length tallies
if (active_tracklength_tallies % size() > 0) &
@ -175,6 +185,10 @@ contains
end do
if (run_mode == MODE_PARTICLE) then
close(UNIT=UNIT_TRACK)
end if
end subroutine transport
!===============================================================================