mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
added source present to statepoint.py and incremented version
This commit is contained in:
parent
b1c288012b
commit
4ca97dde96
2 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue