From d3f4efde4631e0c1c5dcb5e22d1837f9a96716e9 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Tue, 1 Jul 2014 14:14:31 +0200 Subject: [PATCH] Added particle restart case for fixed_source runs --- src/fixed_source.F90 | 1 - src/global.F90 | 3 +++ src/particle_restart_write.F90 | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/fixed_source.F90 b/src/fixed_source.F90 index 54c0a26979..0aee9bddb6 100644 --- a/src/fixed_source.F90 +++ b/src/fixed_source.F90 @@ -11,7 +11,6 @@ module fixed_source use tally, only: synchronize_tallies, setup_active_usertallies use tracking, only: transport - type(Bank), pointer :: source_site => null() !$omp threadprivate(source_site) contains diff --git a/src/global.F90 b/src/global.F90 index 02b99bfc89..159c7065db 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -256,6 +256,9 @@ module global ! Mode to run in (fixed source, eigenvalue, plotting, etc) integer :: run_mode = NONE + ! Fixed source particle bank + type(Bank), pointer :: source_site => null() + ! Restart run logical :: restart_run = .false. integer :: restart_batch diff --git a/src/particle_restart_write.F90 b/src/particle_restart_write.F90 index ba22d19d0e..90675d6343 100644 --- a/src/particle_restart_write.F90 +++ b/src/particle_restart_write.F90 @@ -42,7 +42,12 @@ contains call pr % file_create(filename) ! Get information about source particle - src => source_bank(current_work) + select case (run_mode) + case (MODE_EIGENVALUE) + src => source_bank(current_work) + case (MODE_FIXEDSOURCE) + src => source_site + end select ! Write data to file call pr % write_data(FILETYPE_PARTICLE_RESTART, 'filetype')