mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Adding check for round-trip of spec for eff
This commit is contained in:
parent
b4cf42b092
commit
d88648634e
1 changed files with 18 additions and 0 deletions
|
|
@ -61,6 +61,24 @@ class FilterEnergyFunHarness(PyAPITestHarness):
|
|||
# Output the tally in a Pandas DataFrame.
|
||||
return br_tally.get_pandas_dataframe().to_string() + '\n'
|
||||
|
||||
def _compare_results(self):
|
||||
super()._compare_results()
|
||||
|
||||
# Read the statepoint file.
|
||||
sp = openmc.StatePoint(self._sp_name)
|
||||
|
||||
# check that values are round-tripped correctly from
|
||||
# the statepoint file
|
||||
sp_tally = sp.get_tally(id=2)
|
||||
sp_filt = sp_tally.find_filter(openmc.EnergyFunctionFilter)
|
||||
|
||||
model_tally = self._model.tallies[1]
|
||||
model_filt = model_tally.find_filter(openmc.EnergyFunctionFilter)
|
||||
|
||||
assert sp_filt.interpolation == model_filt.interpolation
|
||||
assert all(sp_filt.energy == model_filt.energy)
|
||||
assert all(sp_filt.y == model_filt.y)
|
||||
|
||||
|
||||
def test_filter_energyfun(model):
|
||||
harness = FilterEnergyFunHarness('statepoint.5.h5', model)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue