From 6b8ad7e317784baa14079d9a2378fd5ed10b53da Mon Sep 17 00:00:00 2001 From: Shikhar Kumar Date: Tue, 12 Mar 2019 18:30:04 -0400 Subject: [PATCH] Make statepoint restart work with feedback on --- openmc/cmfd.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openmc/cmfd.py b/openmc/cmfd.py index cd528197aa..211eb1b78d 100644 --- a/openmc/cmfd.py +++ b/openmc/cmfd.py @@ -789,9 +789,10 @@ class CMFDRun(object): batch_str = str(openmc.capi.current_batch()).zfill(batch_str_len) filename = 'statepoint.{}.h5'.format(batch_str) - # Call C API statepoint_write if statepoint file doesn't exist - if not os.path.isfile(filename): - openmc.capi.statepoint_write(filename=filename) + # Call C API statepoint_write to save source distribution with CMFD + # feedback + # TODO don't call statepoint_write in openmc if settings::cmfd_run + openmc.capi.statepoint_write(filename=filename) # Append CMFD data to statepoint file using h5py self._write_cmfd_statepoint(filename)