mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Update tests/regression_tests/trigger_statepoint_restart/test.py
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
a7e924e545
commit
bd71ac0588
1 changed files with 5 additions and 9 deletions
|
|
@ -12,11 +12,10 @@ from tests.regression_tests import config
|
|||
def model():
|
||||
|
||||
# Materials
|
||||
materials = openmc.Materials()
|
||||
mat = openmc.Material()
|
||||
mat.set_density('g/cm3', 4.5)
|
||||
mat.add_nuclide('U235', 1.0)
|
||||
materials.append(mat)
|
||||
materials = openmc.Materials([mat])
|
||||
|
||||
# Geometry
|
||||
sph = openmc.Sphere(r=10.0, boundary_type='vacuum')
|
||||
|
|
@ -36,22 +35,18 @@ def model():
|
|||
settings.verbosity = 1 # to test that this works even with no output
|
||||
|
||||
# Tallies
|
||||
tallies = openmc.Tallies()
|
||||
t = openmc.Tally()
|
||||
t.scores = ['flux']
|
||||
tallies.append(t)
|
||||
tallies = openmc.Tallies([t])
|
||||
|
||||
# Plots (none)
|
||||
plots = openmc.Plots()
|
||||
|
||||
# Put it all together
|
||||
model = openmc.model.Model(materials=materials,
|
||||
geometry=geometry,
|
||||
settings=settings,
|
||||
tallies=tallies,
|
||||
plots=plots)
|
||||
tallies=tallies)
|
||||
return model
|
||||
|
||||
|
||||
class TriggerStatepointRestartTestHarness(PyAPITestHarness):
|
||||
def __init__(self, statepoint, model=None):
|
||||
super().__init__(statepoint, model)
|
||||
|
|
@ -125,6 +120,7 @@ class TriggerStatepointRestartTestHarness(PyAPITestHarness):
|
|||
finally:
|
||||
self._cleanup()
|
||||
|
||||
|
||||
def test_trigger_statepoint_restart(model):
|
||||
# Assuming we converge within 1000 batches, the statepoint filename
|
||||
# should include the batch number padded by at least one '0'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue