diff --git a/src/cmfd_header.F90 b/src/cmfd_header.F90 index 3eebb0f6d9..42e6b30ef9 100644 --- a/src/cmfd_header.F90 +++ b/src/cmfd_header.F90 @@ -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 diff --git a/src/cmfd_input.F90 b/src/cmfd_input.F90 index a836279d51..de23b89b09 100644 --- a/src/cmfd_input.F90 +++ b/src/cmfd_input.F90 @@ -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 diff --git a/src/constants.F90 b/src/constants.F90 index 1a4080f622..22b1e8e84e 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -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 diff --git a/src/state_point.F90 b/src/state_point.F90 index dd3f3e785f..b0d88946eb 100644 --- a/src/state_point.F90 +++ b/src/state_point.F90 @@ -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") diff --git a/src/utils/statepoint.py b/src/utils/statepoint.py index 917ba19e18..ec43435b91 100644 --- a/src/utils/statepoint.py +++ b/src/utils/statepoint.py @@ -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]