mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Fix tests which autolink summary metadata now
This commit is contained in:
parent
5947bbefd2
commit
049b04d995
9 changed files with 2 additions and 47 deletions
|
|
@ -82,11 +82,6 @@ class AsymmetricLatticeTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Extract the tally of interest
|
||||
tally = sp.get_tally(name='distribcell tally')
|
||||
|
||||
|
|
@ -96,8 +91,8 @@ class AsymmetricLatticeTestHarness(PyAPITestHarness):
|
|||
outstr += ', '.join(map(str, tally.std_dev.flatten())) + '\n'
|
||||
|
||||
# Extract fuel assembly lattices from the summary
|
||||
core = su.get_cell_by_id(1)
|
||||
fuel = su.get_cell_by_id(80)
|
||||
core = sp.summary.get_cell_by_id(1)
|
||||
fuel = sp.summary.get_cell_by_id(80)
|
||||
fuel = fuel.fill
|
||||
core = core.fill
|
||||
|
||||
|
|
|
|||
|
|
@ -43,11 +43,6 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Load the MGXS library from the statepoint
|
||||
self.mgxs_lib.load_from_statepoint(sp)
|
||||
|
||||
|
|
|
|||
|
|
@ -46,11 +46,6 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Load the MGXS library from the statepoint
|
||||
self.mgxs_lib.load_from_statepoint(sp)
|
||||
|
||||
|
|
|
|||
|
|
@ -44,11 +44,6 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Load the MGXS library from the statepoint
|
||||
self.mgxs_lib.load_from_statepoint(sp)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,11 +43,6 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Load the MGXS library from the statepoint
|
||||
self.mgxs_lib.load_from_statepoint(sp)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,11 +43,6 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Load the MGXS library from the statepoint
|
||||
self.mgxs_lib.load_from_statepoint(sp)
|
||||
|
||||
|
|
|
|||
|
|
@ -43,11 +43,6 @@ class TallyAggregationTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Extract the tally of interest
|
||||
tally = sp.get_tally(name='distribcell tally')
|
||||
|
||||
|
|
|
|||
|
|
@ -62,11 +62,6 @@ class TallyArithmeticTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Load the tallies
|
||||
tally_1 = sp.get_tally(name='tally 1')
|
||||
tally_2 = sp.get_tally(name='tally 2')
|
||||
|
|
|
|||
|
|
@ -83,11 +83,6 @@ class TallySliceMergeTestHarness(PyAPITestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0]
|
||||
sp = openmc.StatePoint(statepoint)
|
||||
|
||||
# Read the summary file.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.h5'))[0]
|
||||
su = openmc.Summary(summary)
|
||||
sp.link_with_summary(su)
|
||||
|
||||
# Extract the cell tally
|
||||
tallies = [sp.get_tally(name='cell tally')]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue