mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Updates to object lifecycle for WeightWindows and WeightWindowGenerators (#2582)
This commit is contained in:
parent
36f229eb01
commit
382bcb2e8e
6 changed files with 275 additions and 211 deletions
|
|
@ -241,7 +241,21 @@ def test_roundtrip(run_in_tmpdir, model, wws):
|
|||
assert(ww_out == ww_in)
|
||||
|
||||
|
||||
def test_ww_attrs(run_in_tmpdir, model):
|
||||
def test_ww_attrs_python(model):
|
||||
mesh = openmc.RegularMesh.from_domain(model.geometry)
|
||||
lower_bounds = np.ones(mesh.dimension)
|
||||
|
||||
# ensure that creation of weight window objects with default arg values
|
||||
# is successful
|
||||
wws = openmc.WeightWindows(mesh, lower_bounds, upper_bound_ratio=10.0)
|
||||
|
||||
assert wws.energy_bounds == None
|
||||
|
||||
wwg = openmc.WeightWindowGenerator(mesh)
|
||||
|
||||
assert wwg.energy_bounds == None
|
||||
|
||||
def test_ww_attrs_capi(run_in_tmpdir, model):
|
||||
model.export_to_xml()
|
||||
|
||||
openmc.lib.init()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue