mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Fixed energyout filter indices in mg mode, fixed failing test_mg_convert and test_mgxs_library_ce_to_mg due to sp and su files not being closed
This commit is contained in:
parent
7927a2d814
commit
3b5ebc0eff
3 changed files with 15 additions and 1 deletions
|
|
@ -2523,9 +2523,13 @@ contains
|
|||
|
||||
if (.not. run_CE .and. eo_filt % matches_transport_groups) then
|
||||
|
||||
! determine outgoing energy from fission bank
|
||||
! determine outgoing energy group from fission bank
|
||||
g_out = int(fission_bank(n_bank - p % n_bank + k) % E)
|
||||
|
||||
! modify the value so that g_out = 1 corresponds to the highest
|
||||
! energy bin
|
||||
g_out = size(eo_filt % bins) - g_out
|
||||
|
||||
! change outgoing energy bin
|
||||
matching_bins(i) = g_out
|
||||
|
||||
|
|
|
|||
|
|
@ -154,6 +154,11 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
form = '{0:12.6E} {1:12.6E}\n'
|
||||
outstr += form.format(sp.k_combined[0], sp.k_combined[1])
|
||||
|
||||
# Enforce closing statepoint and summary files so HDF5
|
||||
# does not throw an error during the next OpenMC execution
|
||||
sp._f.close()
|
||||
sp._summary._f.close()
|
||||
|
||||
return outstr
|
||||
|
||||
def _get_results(self, outstr, hash_output=False):
|
||||
|
|
|
|||
|
|
@ -71,6 +71,11 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
if os.path.exists('./tallies.xml'):
|
||||
os.remove('./tallies.xml')
|
||||
|
||||
# Enforce closing statepoint and summary files so HDF5
|
||||
# does not throw an error during the next OpenMC execution
|
||||
sp._f.close()
|
||||
sp._summary._f.close()
|
||||
|
||||
# Re-run MG mode.
|
||||
if self._opts.mpi_exec is not None:
|
||||
mpi_args = [self._opts.mpi_exec, '-n', self._opts.mpi_np]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue