Converting test_mgxs_library_*_nuclides tests to use openmc.mgxs.MGXS_TYPES so the test always tests the latest list of Mgxs classes

This commit is contained in:
Adam Nelson 2016-05-29 14:18:31 -04:00
parent 56f2a0b2e6
commit 3368d7aebe
2 changed files with 8 additions and 14 deletions

View file

@ -20,17 +20,14 @@ class MGXSTestHarness(PyAPITestHarness):
super(MGXSTestHarness, self)._build_inputs()
# Initialize a two-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6, 20.])
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6,
20.])
# Initialize MGXS Library for a few cross section types
self.mgxs_lib = openmc.mgxs.Library(self._input_set.geometry)
self.mgxs_lib.by_nuclide = False
self.mgxs_lib.mgxs_types = ['total', 'transport', 'nu-transport',
'absorption', 'capture', 'fission',
'nu-fission', 'kappa-fission', 'scatter',
'nu-scatter', 'scatter matrix',
'nu-scatter matrix', 'multiplicity matrix',
'nu-fission matrix', 'chi']
# Test all MGXS types
self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES
self.mgxs_lib.energy_groups = energy_groups
self.mgxs_lib.legendre_order = 3
self.mgxs_lib.domain_type = 'material'

View file

@ -20,17 +20,14 @@ class MGXSTestHarness(PyAPITestHarness):
super(MGXSTestHarness, self)._build_inputs()
# Initialize a two-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6, 20.])
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6,
20.])
# Initialize MGXS Library for a few cross section types
self.mgxs_lib = openmc.mgxs.Library(self._input_set.geometry)
self.mgxs_lib.by_nuclide = True
self.mgxs_lib.mgxs_types = ['total', 'transport', 'nu-transport',
'absorption', 'capture', 'fission',
'nu-fission', 'kappa-fission', 'scatter',
'nu-scatter', 'scatter matrix',
'nu-scatter matrix', 'multiplicity matrix',
'nu-fission matrix', 'chi']
# Test all MGXS types
self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES
self.mgxs_lib.energy_groups = energy_groups
self.mgxs_lib.legendre_order = 3
self.mgxs_lib.domain_type = 'material'