mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Respond to reviewer comments on FY helpers
- Change Operator attribute name for fission yield helper - Use copy.deepcopy for constant_yields, fast_yields, and thermal_yields - Change import location of openmc in tests - Use bisect.bisect_left to find replacement fission yields on FissionYieldCutoffHelper if thermal or fast energies not found
This commit is contained in:
parent
6735657cb3
commit
b19a2db0ee
6 changed files with 37 additions and 60 deletions
|
|
@ -5,7 +5,6 @@ from unittest.mock import Mock
|
|||
|
||||
import pytest
|
||||
import numpy
|
||||
|
||||
from openmc.deplete.nuclide import Nuclide, FissionYieldDistribution
|
||||
from openmc.deplete.helpers import (
|
||||
FissionYieldCutoffHelper, ConstantFissionYieldHelper,
|
||||
|
|
@ -75,10 +74,10 @@ def test_cutoff_construction(nuclide_bundle):
|
|||
"U235": nuclide_bundle.u235.yield_data[0.0253]}
|
||||
assert helper.fast_yields == {"U235": nuclide_bundle.u235.yield_data[5e5]}
|
||||
# test failures in cutoff: super low, super high
|
||||
with pytest.raises(ValueError, match="thermal yields"):
|
||||
with pytest.raises(ValueError, match="replacement fission yields"):
|
||||
FissionYieldCutoffHelper(
|
||||
nuclide_bundle, 1, thermal_energy=0.001, cutoff=0.002)
|
||||
with pytest.raises(ValueError, match="fast yields"):
|
||||
with pytest.raises(ValueError, match="replacement fission yields"):
|
||||
FissionYieldCutoffHelper(
|
||||
nuclide_bundle, 1, cutoff=15e6, fast_energy=17e6)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import xml.etree.ElementTree as ET
|
|||
|
||||
import numpy
|
||||
import pytest
|
||||
|
||||
from openmc.deplete import nuclide
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue