Don't write cycle/particle on error if simulation hasn't begun.

This commit is contained in:
Paul Romano 2012-02-20 10:52:12 -05:00
parent b206a831c3
commit 0f79eb83d1
2 changed files with 6 additions and 4 deletions

View file

@ -76,9 +76,11 @@ contains
write(ERROR_UNIT,*)
! Write information on current cycle and particle
write(ERROR_UNIT,'(1X,A,I11) ') 'Cycle: ', current_cycle
write(ERROR_UNIT,'(1X,A,I11)') 'Particle: ', p % id
write(ERROR_UNIT,*)
if (current_cycle > 0) then
write(ERROR_UNIT,'(1X,A,I11) ') 'Cycle: ', current_cycle
write(ERROR_UNIT,'(1X,A,I11)') 'Particle: ', p % id
write(ERROR_UNIT,*)
end if
! Release memory from all allocatable arrays
call free_memory()

View file

@ -118,7 +118,7 @@ module global
integer :: n_cycles = 500 ! # of cycles
integer :: n_inactive = 50 ! # of inactive cycles
integer :: n_active ! # of active cycles
integer :: current_cycle ! current cycle
integer :: current_cycle = 0 ! current cycle
! External source
type(ExtSource), target :: external_source