added source present to statepoint.py and incremented version

This commit is contained in:
Bryan Herman 2014-03-04 23:32:41 -05:00
parent b1c288012b
commit 4ca97dde96
2 changed files with 8 additions and 2 deletions

View file

@ -11,7 +11,7 @@ module constants
integer, parameter :: VERSION_RELEASE = 3
! Revision numbers for binary files
integer, parameter :: REVISION_STATEPOINT = 10
integer, parameter :: REVISION_STATEPOINT = 11
integer, parameter :: REVISION_PARTICLE_RESTART = 1
! Binary file types

View file

@ -151,7 +151,7 @@ class StatePoint(object):
# Read statepoint revision
self.revision = self._get_int(path='revision')[0]
if self.revision != 10:
if self.revision != 11:
raise Exception('Statepoint Revision is not consistent.')
# Read OpenMC version
@ -342,6 +342,12 @@ class StatePoint(object):
if not self._results:
self.read_results()
# Source bank present
source_present = self._get_int(path='source_present')[0]
if source_present != 1:
print('Source bank not present.')
return
# For HDF5 state points, copy entire bank
if self._hdf5:
source_sites = self._f['source_bank'].value