fixed up cmfd statepoint writing/reading, updated python statepoint file to reflect changes and incremented statepoint revision number

This commit is contained in:
Bryan Herman 2013-08-15 13:57:14 -04:00
parent 2b8e57b42d
commit 85e8ec9e24
5 changed files with 29 additions and 10 deletions

View file

@ -91,10 +91,9 @@ contains
! ALLOCATE_CMFD allocates all data in of cmfd type
!==============================================================================
subroutine allocate_cmfd(this, n_batches, entropy_on)
subroutine allocate_cmfd(this, n_batches)
integer :: n_batches
logical :: entropy_on
type(cmfd_type) :: this
integer :: nx ! number of mesh cells in x direction
@ -135,7 +134,7 @@ contains
if (.not. allocated(this % weightfactors)) allocate(this % weightfactors(ng,nx,ny,nz))
! Allocate batchwise parameters
if (.not. allocated(this % entropy) .and. entropy_on) allocate(this % entropy(n_batches))
if (.not. allocated(this % entropy)) allocate(this % entropy(n_batches))
if (.not. allocated(this % balance)) allocate(this % balance(n_batches))
if (.not. allocated(this % src_cmp)) allocate(this % src_cmp(n_batches))
if (.not. allocated(this % dom)) allocate(this % dom(n_batches))
@ -160,7 +159,7 @@ contains
this % src_cmp = ZERO
this % dom = ZERO
this % k_cmfd = ZERO
if (entropy_on) this % entropy = ZERO
this % entropy = ZERO
end subroutine allocate_cmfd

View file

@ -52,7 +52,7 @@ contains
call time_cmfdsolve % reset()
! Allocate cmfd object
call allocate_cmfd(cmfd, n_batches, entropy_on)
call allocate_cmfd(cmfd, n_batches)
end subroutine configure_cmfd

View file

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

View file

@ -98,14 +98,15 @@ contains
! Write out CMFD info
if (cmfd_on) then
call write_data(1, "cmfd_on")
call write_data(cmfd % indices, "indicies", length=4, group="cmfd")
call write_data(cmfd % k_cmfd, "k_cmfd", length=current_batch, &
group="cmfd")
call write_data(cmfd % cmfd_src, "cmfd_src", &
length=(/cmfd % indices(4), cmfd % indices(1), &
cmfd % indices(2), cmfd % indices(3)/), &
group="cmfd")
if (entropy_on) call write_data(cmfd % entropy, "cmfd_entropy", &
length=current_batch, group="cmfd")
call write_data(cmfd % entropy, "cmfd_entropy", &
length=current_batch, group="cmfd")
call write_data(cmfd % balance, "cmfd_balance", &
length=current_batch, group="cmfd")
call write_data(cmfd % dom, "cmfd_dominance", &
@ -543,14 +544,16 @@ contains
! Write out CMFD info
if (int_array(1) == 1) then
call read_data(cmfd % indices, "indicies", length=4, group="cmfd", &
option="collective")
call read_data(cmfd % k_cmfd, "k_cmfd", length=restart_batch, &
group="cmfd", option="collective")
call read_data(cmfd % cmfd_src, "cmfd_src", &
length=(/cmfd % indices(4), cmfd % indices(1), &
cmfd % indices(2), cmfd % indices(3)/), &
group="cmfd", option="collective")
if (entropy_on) call read_data(cmfd % entropy, "cmfd_entropy", &
length=restart_batch, group="cmfd", &
call read_data(cmfd % entropy, "cmfd_entropy", &
length=restart_batch, group="cmfd", &
option="collective")
call read_data(cmfd % balance, "cmfd_balance", &
length=restart_batch, group="cmfd", option="collective")

View file

@ -192,6 +192,23 @@ class StatePoint(object):
self.k_abs_tra = self._get_double(path='k_abs_tra')[0]
self.k_combined = self._get_double(2, path='k_combined')
# Read CMFD information
cmfd_present = self._get_int(path='cmfd_on')[0]
if cmfd_present == 1:
self.cmfd_indices = self._get_double(4, path='cmfd/indicies')
self.k_cmfd = self._get_double(self.current_batch,
path='cmfd/k_cmfd')
self.cmfd_src = self._get_double(np.product(self.cmfd_indices,
path='cmfd/cmfd_src'))
self.cmfd_entropy = self._get_double(self.current_batch,
path='cmfd/cmfd_entropy')
self.cmfd_balance = self._get_double(self.current_batch,
path='cmfd/cmfd_balance')
self.cmfd_dominance = self._get_double(self.current_batch,
path='cmfd/cmfd_dominance')
self.cmfd_srccmp = self._get_double(self.current_batch,
path='cmfd/cmfd_srccmp')
# Read number of meshes
n_meshes = self._get_int(path='tallies/n_meshes')[0]