From 3c1dd4075dfde4e8bfc15a5a9d5c9e6207d99e67 Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Fri, 5 Aug 2016 08:39:55 -0400 Subject: [PATCH] removed mdgxs tests --- .../inputs_true.dat | 1 - .../results_true.dat | 63 ---------- .../test_mdgxs_library_condense.py | 82 ------------ .../inputs_true.dat | 1 - .../results_true.dat | 21 ---- .../test_mdgxs_library_distribcell.py | 84 ------------- tests/test_mdgxs_library_hdf5/inputs_true.dat | 1 - .../test_mdgxs_library_hdf5/results_true.dat | 117 ------------------ .../test_mdgxs_library_hdf5.py | 93 -------------- tests/test_mdgxs_library_mesh/inputs_true.dat | 1 - .../test_mdgxs_library_mesh/results_true.dat | 78 ------------ .../test_mdgxs_library_mesh.py | 84 ------------- .../inputs_true.dat | 1 - .../results_true.dat | 117 ------------------ .../test_mdgxs_library_no_nuclides.py | 80 ------------ .../inputs_true.dat | 1 - .../results_true.dat | 1 - .../test_mdgxs_library_nuclides.py | 80 ------------ 18 files changed, 906 deletions(-) delete mode 100644 tests/test_mdgxs_library_condense/inputs_true.dat delete mode 100644 tests/test_mdgxs_library_condense/results_true.dat delete mode 100644 tests/test_mdgxs_library_condense/test_mdgxs_library_condense.py delete mode 100644 tests/test_mdgxs_library_distribcell/inputs_true.dat delete mode 100644 tests/test_mdgxs_library_distribcell/results_true.dat delete mode 100644 tests/test_mdgxs_library_distribcell/test_mdgxs_library_distribcell.py delete mode 100644 tests/test_mdgxs_library_hdf5/inputs_true.dat delete mode 100644 tests/test_mdgxs_library_hdf5/results_true.dat delete mode 100644 tests/test_mdgxs_library_hdf5/test_mdgxs_library_hdf5.py delete mode 100644 tests/test_mdgxs_library_mesh/inputs_true.dat delete mode 100644 tests/test_mdgxs_library_mesh/results_true.dat delete mode 100644 tests/test_mdgxs_library_mesh/test_mdgxs_library_mesh.py delete mode 100644 tests/test_mdgxs_library_no_nuclides/inputs_true.dat delete mode 100644 tests/test_mdgxs_library_no_nuclides/results_true.dat delete mode 100644 tests/test_mdgxs_library_no_nuclides/test_mdgxs_library_no_nuclides.py delete mode 100644 tests/test_mdgxs_library_nuclides/inputs_true.dat delete mode 100644 tests/test_mdgxs_library_nuclides/results_true.dat delete mode 100644 tests/test_mdgxs_library_nuclides/test_mdgxs_library_nuclides.py diff --git a/tests/test_mdgxs_library_condense/inputs_true.dat b/tests/test_mdgxs_library_condense/inputs_true.dat deleted file mode 100644 index 49fe693ee4..0000000000 --- a/tests/test_mdgxs_library_condense/inputs_true.dat +++ /dev/null @@ -1 +0,0 @@ -9e8d8b468bdd81d996956d0d43eef5779b7b7d5ca3f6a1e628f10318748086183e45cf221edf7a274ff2dc6aff34f4411e21952740cdb7652477dfa0a1ffb5f2 \ No newline at end of file diff --git a/tests/test_mdgxs_library_condense/results_true.dat b/tests/test_mdgxs_library_condense/results_true.dat deleted file mode 100644 index 20cc048d14..0000000000 --- a/tests/test_mdgxs_library_condense/results_true.dat +++ /dev/null @@ -1,63 +0,0 @@ - material delayedgroup group in nuclide mean std. dev. -0 10000 1 1 total 0.000021 0.000001 -1 10000 2 1 total 0.000110 0.000008 -2 10000 3 1 total 0.000107 0.000007 -3 10000 4 1 total 0.000249 0.000017 -4 10000 5 1 total 0.000112 0.000007 -5 10000 6 1 total 0.000046 0.000003 - material delayedgroup group out nuclide mean std. dev. -0 10000 1 1 total 0 0.000000 -1 10000 2 1 total 1 0.869128 -2 10000 3 1 total 1 1.414214 -3 10000 4 1 total 1 0.360359 -4 10000 5 1 total 0 0.000000 -5 10000 6 1 total 0 0.000000 - material delayedgroup group in nuclide mean std. dev. -0 10000 1 1 total 0.000227 0.000020 -1 10000 2 1 total 0.001214 0.000108 -2 10000 3 1 total 0.001184 0.000104 -3 10000 4 1 total 0.002752 0.000240 -4 10000 5 1 total 0.001231 0.000105 -5 10000 6 1 total 0.000512 0.000044 - material delayedgroup group in nuclide mean std. dev. -0 10001 1 1 total 0 0 -1 10001 2 1 total 0 0 -2 10001 3 1 total 0 0 -3 10001 4 1 total 0 0 -4 10001 5 1 total 0 0 -5 10001 6 1 total 0 0 - material delayedgroup group out nuclide mean std. dev. -0 10001 1 1 total 0 0 -1 10001 2 1 total 0 0 -2 10001 3 1 total 0 0 -3 10001 4 1 total 0 0 -4 10001 5 1 total 0 0 -5 10001 6 1 total 0 0 - material delayedgroup group in nuclide mean std. dev. -0 10001 1 1 total 0 0 -1 10001 2 1 total 0 0 -2 10001 3 1 total 0 0 -3 10001 4 1 total 0 0 -4 10001 5 1 total 0 0 -5 10001 6 1 total 0 0 - material delayedgroup group in nuclide mean std. dev. -0 10002 1 1 total 0 0 -1 10002 2 1 total 0 0 -2 10002 3 1 total 0 0 -3 10002 4 1 total 0 0 -4 10002 5 1 total 0 0 -5 10002 6 1 total 0 0 - material delayedgroup group out nuclide mean std. dev. -0 10002 1 1 total 0 0 -1 10002 2 1 total 0 0 -2 10002 3 1 total 0 0 -3 10002 4 1 total 0 0 -4 10002 5 1 total 0 0 -5 10002 6 1 total 0 0 - material delayedgroup group in nuclide mean std. dev. -0 10002 1 1 total 0 0 -1 10002 2 1 total 0 0 -2 10002 3 1 total 0 0 -3 10002 4 1 total 0 0 -4 10002 5 1 total 0 0 -5 10002 6 1 total 0 0 diff --git a/tests/test_mdgxs_library_condense/test_mdgxs_library_condense.py b/tests/test_mdgxs_library_condense/test_mdgxs_library_condense.py deleted file mode 100644 index 75e40be909..0000000000 --- a/tests/test_mdgxs_library_condense/test_mdgxs_library_condense.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import glob -import hashlib -sys.path.insert(0, os.pardir) -from testing_harness import PyAPITestHarness -from input_set import PinCellInputSet -import openmc -import openmc.mgxs - - -class MDGXSTestHarness(PyAPITestHarness): - def _build_inputs(self): - # Set the input set to use the pincell model - self._input_set = PinCellInputSet() - - # Generate inputs using parent class routine - super(MDGXSTestHarness, self)._build_inputs() - - # Initialize a two-group structure - energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6, - 20.]) - delayed_groups = openmc.mgxs.DelayedGroups(range(1,7)) - - # 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 - - # Test all MGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MDGXS_TYPES - self.mgxs_lib.energy_groups = energy_groups - self.mgxs_lib.delayed_groups = delayed_groups - self.mgxs_lib.domain_type = 'material' - self.mgxs_lib.build_library() - - # Initialize a tallies file - self._input_set.tallies = openmc.Tallies() - self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False) - self._input_set.tallies.export_to_xml() - - def _get_results(self, hash_output=False): - """Digest info in the statepoint and return as a string.""" - - # Read the statepoint file. - statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0] - sp = openmc.StatePoint(statepoint) - - # Load the MGXS library from the statepoint - self.mgxs_lib.load_from_statepoint(sp) - - # Build a condensed 1-group MGXS Library - one_group = openmc.mgxs.EnergyGroups([0., 20.]) - condense_lib = self.mgxs_lib.get_condensed_library(one_group) - - # Build a string from Pandas Dataframe for each 1-group MGXS - outstr = '' - for domain in condense_lib.domains: - for mgxs_type in condense_lib.mgxs_types: - mgxs = condense_lib.get_mgxs(domain, mgxs_type) - df = mgxs.get_pandas_dataframe() - outstr += df.to_string() + '\n' - - # Hash the results if necessary - if hash_output: - sha512 = hashlib.sha512() - sha512.update(outstr.encode('utf-8')) - outstr = sha512.hexdigest() - - return outstr - - - def _cleanup(self): - super(MDGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - - -if __name__ == '__main__': - harness = MDGXSTestHarness('statepoint.10.*', True) - harness.main() diff --git a/tests/test_mdgxs_library_distribcell/inputs_true.dat b/tests/test_mdgxs_library_distribcell/inputs_true.dat deleted file mode 100644 index 31a7a7f904..0000000000 --- a/tests/test_mdgxs_library_distribcell/inputs_true.dat +++ /dev/null @@ -1 +0,0 @@ -d3cf661e7fd29b0bbd6e6a464bb3b0b48a798dbd5c701246fd3c904f87c0d07ad995fc07f5b0a6c665449b7f5c92f68968e3947690794a0b743ea38a7f43f95f \ No newline at end of file diff --git a/tests/test_mdgxs_library_distribcell/results_true.dat b/tests/test_mdgxs_library_distribcell/results_true.dat deleted file mode 100644 index 67f65fc301..0000000000 --- a/tests/test_mdgxs_library_distribcell/results_true.dat +++ /dev/null @@ -1,21 +0,0 @@ - avg(distribcell) delayedgroup group in nuclide mean std. dev. -0 (0,) 1 1 total 0.000021 0.000002 -1 (0,) 2 1 total 0.000110 0.000008 -2 (0,) 3 1 total 0.000107 0.000008 -3 (0,) 4 1 total 0.000249 0.000018 -4 (0,) 5 1 total 0.000112 0.000008 -5 (0,) 6 1 total 0.000046 0.000003 - avg(distribcell) delayedgroup group out nuclide mean std. dev. -0 (0,) 1 1 total 0 0.000000 -1 (0,) 2 1 total 1 0.869128 -2 (0,) 3 1 total 1 1.414214 -3 (0,) 4 1 total 1 0.360359 -4 (0,) 5 1 total 0 0.000000 -5 (0,) 6 1 total 0 0.000000 - avg(distribcell) delayedgroup group in nuclide mean std. dev. -0 (0,) 1 1 total 0.000227 0.000022 -1 (0,) 2 1 total 0.001214 0.000115 -2 (0,) 3 1 total 0.001184 0.000111 -3 (0,) 4 1 total 0.002752 0.000257 -4 (0,) 5 1 total 0.001231 0.000113 -5 (0,) 6 1 total 0.000512 0.000047 diff --git a/tests/test_mdgxs_library_distribcell/test_mdgxs_library_distribcell.py b/tests/test_mdgxs_library_distribcell/test_mdgxs_library_distribcell.py deleted file mode 100644 index df4fc184d3..0000000000 --- a/tests/test_mdgxs_library_distribcell/test_mdgxs_library_distribcell.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import glob -import hashlib -sys.path.insert(0, os.pardir) -from testing_harness import PyAPITestHarness -from input_set import PinCellInputSet -import openmc -import openmc.mgxs - - -class MDGXSTestHarness(PyAPITestHarness): - def _build_inputs(self): - # Set the input set to use the pincell model - self._input_set = PinCellInputSet() - - # Generate inputs using parent class routine - super(MDGXSTestHarness, self)._build_inputs() - - # Initialize a one-group structure - energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 20.]) - - # Initialize a six-group structure - delayed_groups = openmc.mgxs.DelayedGroups(range(1,7)) - - # Initialize MGXS Library for a few cross section types - # for one material-filled cell in the geometry - self.mgxs_lib = openmc.mgxs.Library(self._input_set.geometry) - self.mgxs_lib.by_nuclide = False - - # Test all MDGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MDGXS_TYPES - self.mgxs_lib.energy_groups = energy_groups - self.mgxs_lib.delayed_groups = delayed_groups - self.mgxs_lib.domain_type = 'distribcell' - cells = self.mgxs_lib.openmc_geometry.get_all_material_cells() - self.mgxs_lib.domains = [c for c in cells if c.name == 'cell 1'] - self.mgxs_lib.build_library() - - # Initialize a tallies file - self._input_set.tallies = openmc.Tallies() - self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False) - self._input_set.tallies.export_to_xml() - - def _get_results(self, hash_output=False): - """Digest info in the statepoint and return as a string.""" - - # Read the statepoint file. - statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0] - sp = openmc.StatePoint(statepoint) - - # Load the MGXS library from the statepoint - self.mgxs_lib.load_from_statepoint(sp) - - # Average the MGXS across distribcell subdomains - avg_lib = self.mgxs_lib.get_subdomain_avg_library() - - # Build a string from Pandas Dataframe for each 1-group MGXS - outstr = '' - for domain in avg_lib.domains: - for mgxs_type in avg_lib.mgxs_types: - mgxs = avg_lib.get_mgxs(domain, mgxs_type) - df = mgxs.get_pandas_dataframe() - outstr += df.to_string() + '\n' - - # Hash the results if necessary - if hash_output: - sha512 = hashlib.sha512() - sha512.update(outstr.encode('utf-8')) - outstr = sha512.hexdigest() - - return outstr - - def _cleanup(self): - super(MDGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - - -if __name__ == '__main__': - harness = MDGXSTestHarness('statepoint.10.*', True) - harness.main() diff --git a/tests/test_mdgxs_library_hdf5/inputs_true.dat b/tests/test_mdgxs_library_hdf5/inputs_true.dat deleted file mode 100644 index 49fe693ee4..0000000000 --- a/tests/test_mdgxs_library_hdf5/inputs_true.dat +++ /dev/null @@ -1 +0,0 @@ -9e8d8b468bdd81d996956d0d43eef5779b7b7d5ca3f6a1e628f10318748086183e45cf221edf7a274ff2dc6aff34f4411e21952740cdb7652477dfa0a1ffb5f2 \ No newline at end of file diff --git a/tests/test_mdgxs_library_hdf5/results_true.dat b/tests/test_mdgxs_library_hdf5/results_true.dat deleted file mode 100644 index d1b6358716..0000000000 --- a/tests/test_mdgxs_library_hdf5/results_true.dat +++ /dev/null @@ -1,117 +0,0 @@ -domain=10000 type=delayed-nu-fission -[[ 2.29808234e-05 1.06974158e-04] - [ 1.43606337e-04 5.52167907e-04] - [ 1.51382216e-04 5.27147681e-04] - [ 7.42603178e-05 2.22018043e-04] - [ 4.14908454e-05 9.10244403e-05] - [ 1.70016000e-05 3.81298119e-05]] -[[ 1.66363133e-06 9.49156242e-06] - [ 1.05907806e-05 4.89925426e-05] - [ 1.12671238e-05 4.67725567e-05] - [ 5.22610273e-06 1.87563195e-05] - [ 2.99830766e-06 7.68984041e-06] - [ 1.22654684e-06 3.22124663e-06]] -domain=10000 type=chi-delayed -[[ 0. 0.] - [ 1. 0.] - [ 1. 0.] - [ 1. 0.] - [ 0. 0.] - [ 0. 0.]] -[[ 0. 0. ] - [ 0.86912776 0. ] - [ 1.41421356 0. ] - [ 0.36035904 0. ] - [ 0. 0. ] - [ 0. 0. ]] -domain=10000 type=beta -[[ 4.89188107e-05 2.27713711e-04] - [ 3.05691886e-04 1.17538858e-03] - [ 3.22244241e-04 1.12212853e-03] - [ 3.82159891e-03 1.14255357e-02] - [ 2.13520995e-03 4.68431744e-03] - [ 8.74939644e-04 1.96224379e-03]] -[[ 4.67388620e-06 2.46946810e-05] - [ 2.95223877e-05 1.27466393e-04] - [ 3.12885004e-05 1.21690543e-04] - [ 3.21434855e-04 1.09939816e-03] - [ 1.82980497e-04 4.50738567e-04] - [ 7.48899920e-05 1.88812772e-04]] -domain=10001 type=delayed-nu-fission -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -domain=10001 type=chi-delayed -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -domain=10001 type=beta -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -domain=10002 type=delayed-nu-fission -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -domain=10002 type=chi-delayed -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -domain=10002 type=beta -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] -[[ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.] - [ 0. 0.]] diff --git a/tests/test_mdgxs_library_hdf5/test_mdgxs_library_hdf5.py b/tests/test_mdgxs_library_hdf5/test_mdgxs_library_hdf5.py deleted file mode 100644 index 79e0edf7c2..0000000000 --- a/tests/test_mdgxs_library_hdf5/test_mdgxs_library_hdf5.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import glob -import hashlib -import h5py -sys.path.insert(0, os.pardir) -from testing_harness import PyAPITestHarness -from input_set import PinCellInputSet -import openmc -import openmc.mgxs - - -class MDGXSTestHarness(PyAPITestHarness): - def _build_inputs(self): - # Set the input set to use the pincell model - self._input_set = PinCellInputSet() - - # Generate inputs using parent class routine - super(MDGXSTestHarness, self)._build_inputs() - - # Initialize a two-group structure - energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6, - 20.]) - - # Initialize a six-group structure - delayed_groups = openmc.mgxs.DelayedGroups(range(1,7)) - - # 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 - - # Test all MDGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MDGXS_TYPES - self.mgxs_lib.energy_groups = energy_groups - self.mgxs_lib.delayed_groups = delayed_groups - self.mgxs_lib.domain_type = 'material' - self.mgxs_lib.build_library() - - # Initialize a tallies file - self._input_set.tallies = openmc.Tallies() - self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False) - self._input_set.tallies.export_to_xml() - - def _get_results(self, hash_output=False): - """Digest info in the statepoint and return as a string.""" - - # Read the statepoint file. - statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0] - sp = openmc.StatePoint(statepoint) - - # Load the MGXS library from the statepoint - self.mgxs_lib.load_from_statepoint(sp) - - # Export the MGXS Library to an HDF5 file - self.mgxs_lib.build_hdf5_store(directory='.') - - # Open the MGXS HDF5 file - f = h5py.File('mgxs.h5', 'r') - - # Build a string from the datasets in the HDF5 file - outstr = '' - for domain in self.mgxs_lib.domains: - for mgxs_type in self.mgxs_lib.mgxs_types: - outstr += 'domain={0} type={1}\n'.format(domain.id, mgxs_type) - key = 'material/{0}/{1}/average'.format(domain.id, mgxs_type) - outstr += str(f[key][...]) + '\n' - key = 'material/{0}/{1}/std. dev.'.format(domain.id, mgxs_type) - outstr += str(f[key][...]) + '\n' - - # Close the MGXS HDF5 file - f.close() - - # Hash the results if necessary - if hash_output: - sha512 = hashlib.sha512() - sha512.update(outstr.encode('utf-8')) - outstr = sha512.hexdigest() - - return outstr - - def _cleanup(self): - super(MDGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - f = os.path.join(os.getcwd(), 'mgxs.h5') - if os.path.exists(f): os.remove(f) - - -if __name__ == '__main__': - harness = MDGXSTestHarness('statepoint.10.*', True) - harness.main() diff --git a/tests/test_mdgxs_library_mesh/inputs_true.dat b/tests/test_mdgxs_library_mesh/inputs_true.dat deleted file mode 100644 index 02a9147f88..0000000000 --- a/tests/test_mdgxs_library_mesh/inputs_true.dat +++ /dev/null @@ -1 +0,0 @@ -f76b5d0cc2dbadd48d51918d8c82e4457e9ce3eafb191cd51394e420ba3ae80eccdff03098b276f7d3eb87f6a4616f1dd0e39e1892244a29d0f486ff2bf4ddbb \ No newline at end of file diff --git a/tests/test_mdgxs_library_mesh/results_true.dat b/tests/test_mdgxs_library_mesh/results_true.dat deleted file mode 100644 index 82f8014f90..0000000000 --- a/tests/test_mdgxs_library_mesh/results_true.dat +++ /dev/null @@ -1,78 +0,0 @@ - mesh 1 delayedgroup group in nuclide mean std. dev. - x y z -0 1 1 1 1 1 total 0.000004 4.432287e-07 -1 1 1 1 2 1 total 0.000026 2.652890e-06 -2 1 1 1 3 1 total 0.000024 2.402024e-06 -3 1 1 1 4 1 total 0.000054 5.463683e-06 -4 1 1 1 5 1 total 0.000026 2.662762e-06 -5 1 1 1 6 1 total 0.000010 1.037947e-06 -6 1 2 1 1 1 total 0.000005 1.099501e-06 -7 1 2 1 2 1 total 0.000029 6.440339e-06 -8 1 2 1 3 1 total 0.000027 5.929275e-06 -9 1 2 1 4 1 total 0.000061 1.359998e-05 -10 1 2 1 5 1 total 0.000029 6.491514e-06 -11 1 2 1 6 1 total 0.000011 2.575232e-06 -12 2 1 1 1 1 total 0.000004 6.988358e-07 -13 2 1 1 2 1 total 0.000023 4.116310e-06 -14 2 1 1 3 1 total 0.000021 3.817611e-06 -15 2 1 1 4 1 total 0.000049 8.889347e-06 -16 2 1 1 5 1 total 0.000024 4.380665e-06 -17 2 1 1 6 1 total 0.000009 1.746558e-06 -18 2 2 1 1 1 total 0.000004 1.661116e-06 -19 2 2 1 2 1 total 0.000025 9.704053e-06 -20 2 2 1 3 1 total 0.000023 9.007295e-06 -21 2 2 1 4 1 total 0.000054 2.084505e-05 -22 2 2 1 5 1 total 0.000026 9.981347e-06 -23 2 2 1 6 1 total 0.000010 3.988280e-06 - mesh 1 delayedgroup group out nuclide mean std. dev. - x y z -0 1 1 1 1 1 total 0 0.000000 -1 1 1 1 2 1 total 0 0.000000 -2 1 1 1 3 1 total 0 0.000000 -3 1 1 1 4 1 total 1 1.414214 -4 1 1 1 5 1 total 0 0.000000 -5 1 1 1 6 1 total 0 0.000000 -6 1 2 1 1 1 total 0 0.000000 -7 1 2 1 2 1 total 0 0.000000 -8 1 2 1 3 1 total 0 0.000000 -9 1 2 1 4 1 total 0 0.000000 -10 1 2 1 5 1 total 0 0.000000 -11 1 2 1 6 1 total 0 0.000000 -12 2 1 1 1 1 total 0 0.000000 -13 2 1 1 2 1 total 0 0.000000 -14 2 1 1 3 1 total 0 0.000000 -15 2 1 1 4 1 total 0 0.000000 -16 2 1 1 5 1 total 0 0.000000 -17 2 1 1 6 1 total 0 0.000000 -18 2 2 1 1 1 total 0 0.000000 -19 2 2 1 2 1 total 0 0.000000 -20 2 2 1 3 1 total 0 0.000000 -21 2 2 1 4 1 total 0 0.000000 -22 2 2 1 5 1 total 0 0.000000 -23 2 2 1 6 1 total 0 0.000000 - mesh 1 delayedgroup group in nuclide mean std. dev. - x y z -0 1 1 1 1 1 total 0.000166 0.000023 -1 1 1 1 2 1 total 0.000990 0.000136 -2 1 1 1 3 1 total 0.000907 0.000123 -3 1 1 1 4 1 total 0.002088 0.000282 -4 1 1 1 5 1 total 0.001014 0.000137 -5 1 1 1 6 1 total 0.000400 0.000054 -6 1 2 1 1 1 total 0.000171 0.000039 -7 1 2 1 2 1 total 0.001003 0.000226 -8 1 2 1 3 1 total 0.000919 0.000208 -9 1 2 1 4 1 total 0.002101 0.000478 -10 1 2 1 5 1 total 0.000997 0.000228 -11 1 2 1 6 1 total 0.000395 0.000090 -12 2 1 1 1 1 total 0.000168 0.000030 -13 2 1 1 2 1 total 0.001003 0.000178 -14 2 1 1 3 1 total 0.000927 0.000165 -15 2 1 1 4 1 total 0.002150 0.000385 -16 2 1 1 5 1 total 0.001057 0.000190 -17 2 1 1 6 1 total 0.000418 0.000076 -18 2 2 1 1 1 total 0.000171 0.000082 -19 2 2 1 2 1 total 0.001010 0.000481 -20 2 2 1 3 1 total 0.000932 0.000445 -21 2 2 1 4 1 total 0.002151 0.001030 -22 2 2 1 5 1 total 0.001030 0.000493 -23 2 2 1 6 1 total 0.000410 0.000197 diff --git a/tests/test_mdgxs_library_mesh/test_mdgxs_library_mesh.py b/tests/test_mdgxs_library_mesh/test_mdgxs_library_mesh.py deleted file mode 100644 index 88ee7213da..0000000000 --- a/tests/test_mdgxs_library_mesh/test_mdgxs_library_mesh.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import glob -import hashlib -sys.path.insert(0, os.pardir) -from testing_harness import PyAPITestHarness -import openmc -import openmc.mgxs - - -class MDGXSTestHarness(PyAPITestHarness): - def _build_inputs(self): - # Generate inputs using parent class routine - super(MDGXSTestHarness, self)._build_inputs() - - # Initialize a one-group structure - energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 20.]) - - # Initialize a six-group structure - delayed_groups = openmc.mgxs.DelayedGroups(range(1,7)) - - # Initialize MGXS Library for a few cross section types - # for one material-filled cell in the geometry - self.mgxs_lib = openmc.mgxs.Library(self._input_set.geometry) - self.mgxs_lib.by_nuclide = False - - # Test all MDGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MDGXS_TYPES - self.mgxs_lib.energy_groups = energy_groups - self.mgxs_lib.delayed_groups = delayed_groups - self.mgxs_lib.domain_type = 'mesh' - - # Instantiate a tally mesh - mesh = openmc.Mesh(mesh_id=1) - mesh.type = 'regular' - mesh.dimension = [2, 2] - mesh.lower_left = [-100., -100.] - mesh.width = [100., 100.] - - self.mgxs_lib.domains = [mesh] - self.mgxs_lib.build_library() - - # Initialize a tallies file - self._input_set.tallies = openmc.Tallies() - self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False) - self._input_set.tallies.export_to_xml() - - def _get_results(self, hash_output=False): - """Digest info in the statepoint and return as a string.""" - - # Read the statepoint file. - statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0] - sp = openmc.StatePoint(statepoint) - - # Load the MGXS library from the statepoint - self.mgxs_lib.load_from_statepoint(sp) - - # Build a string from Pandas Dataframe for each 1-group MGXS - outstr = '' - for domain in self.mgxs_lib.domains: - for mgxs_type in self.mgxs_lib.mgxs_types: - mgxs = self.mgxs_lib.get_mgxs(domain, mgxs_type) - df = mgxs.get_pandas_dataframe() - outstr += df.to_string() + '\n' - - # Hash the results if necessary - if hash_output: - sha512 = hashlib.sha512() - sha512.update(outstr.encode('utf-8')) - outstr = sha512.hexdigest() - - return outstr - - def _cleanup(self): - super(MDGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - - -if __name__ == '__main__': - harness = MDGXSTestHarness('statepoint.10.*', True) - harness.main() diff --git a/tests/test_mdgxs_library_no_nuclides/inputs_true.dat b/tests/test_mdgxs_library_no_nuclides/inputs_true.dat deleted file mode 100644 index 49fe693ee4..0000000000 --- a/tests/test_mdgxs_library_no_nuclides/inputs_true.dat +++ /dev/null @@ -1 +0,0 @@ -9e8d8b468bdd81d996956d0d43eef5779b7b7d5ca3f6a1e628f10318748086183e45cf221edf7a274ff2dc6aff34f4411e21952740cdb7652477dfa0a1ffb5f2 \ No newline at end of file diff --git a/tests/test_mdgxs_library_no_nuclides/results_true.dat b/tests/test_mdgxs_library_no_nuclides/results_true.dat deleted file mode 100644 index e3afdcdb6d..0000000000 --- a/tests/test_mdgxs_library_no_nuclides/results_true.dat +++ /dev/null @@ -1,117 +0,0 @@ - material delayedgroup group in nuclide mean std. dev. -1 10000 1 1 total 0.000023 0.000002 -3 10000 2 1 total 0.000144 0.000011 -5 10000 3 1 total 0.000151 0.000011 -7 10000 4 1 total 0.000074 0.000005 -9 10000 5 1 total 0.000041 0.000003 -11 10000 6 1 total 0.000017 0.000001 -0 10000 1 2 total 0.000107 0.000009 -2 10000 2 2 total 0.000552 0.000049 -4 10000 3 2 total 0.000527 0.000047 -6 10000 4 2 total 0.000222 0.000019 -8 10000 5 2 total 0.000091 0.000008 -10 10000 6 2 total 0.000038 0.000003 - material delayedgroup group out nuclide mean std. dev. -1 10000 1 1 total 0 0.000000 -3 10000 2 1 total 1 0.869128 -5 10000 3 1 total 1 1.414214 -7 10000 4 1 total 1 0.360359 -9 10000 5 1 total 0 0.000000 -11 10000 6 1 total 0 0.000000 -0 10000 1 2 total 0 0.000000 -2 10000 2 2 total 0 0.000000 -4 10000 3 2 total 0 0.000000 -6 10000 4 2 total 0 0.000000 -8 10000 5 2 total 0 0.000000 -10 10000 6 2 total 0 0.000000 - material delayedgroup group in nuclide mean std. dev. -1 10000 1 1 total 0.000049 0.000005 -3 10000 2 1 total 0.000306 0.000030 -5 10000 3 1 total 0.000322 0.000031 -7 10000 4 1 total 0.003822 0.000321 -9 10000 5 1 total 0.002135 0.000183 -11 10000 6 1 total 0.000875 0.000075 -0 10000 1 2 total 0.000228 0.000025 -2 10000 2 2 total 0.001175 0.000127 -4 10000 3 2 total 0.001122 0.000122 -6 10000 4 2 total 0.011426 0.001099 -8 10000 5 2 total 0.004684 0.000451 -10 10000 6 2 total 0.001962 0.000189 - material delayedgroup group in nuclide mean std. dev. -1 10001 1 1 total 0 0 -3 10001 2 1 total 0 0 -5 10001 3 1 total 0 0 -7 10001 4 1 total 0 0 -9 10001 5 1 total 0 0 -11 10001 6 1 total 0 0 -0 10001 1 2 total 0 0 -2 10001 2 2 total 0 0 -4 10001 3 2 total 0 0 -6 10001 4 2 total 0 0 -8 10001 5 2 total 0 0 -10 10001 6 2 total 0 0 - material delayedgroup group out nuclide mean std. dev. -1 10001 1 1 total 0 0 -3 10001 2 1 total 0 0 -5 10001 3 1 total 0 0 -7 10001 4 1 total 0 0 -9 10001 5 1 total 0 0 -11 10001 6 1 total 0 0 -0 10001 1 2 total 0 0 -2 10001 2 2 total 0 0 -4 10001 3 2 total 0 0 -6 10001 4 2 total 0 0 -8 10001 5 2 total 0 0 -10 10001 6 2 total 0 0 - material delayedgroup group in nuclide mean std. dev. -1 10001 1 1 total 0 0 -3 10001 2 1 total 0 0 -5 10001 3 1 total 0 0 -7 10001 4 1 total 0 0 -9 10001 5 1 total 0 0 -11 10001 6 1 total 0 0 -0 10001 1 2 total 0 0 -2 10001 2 2 total 0 0 -4 10001 3 2 total 0 0 -6 10001 4 2 total 0 0 -8 10001 5 2 total 0 0 -10 10001 6 2 total 0 0 - material delayedgroup group in nuclide mean std. dev. -1 10002 1 1 total 0 0 -3 10002 2 1 total 0 0 -5 10002 3 1 total 0 0 -7 10002 4 1 total 0 0 -9 10002 5 1 total 0 0 -11 10002 6 1 total 0 0 -0 10002 1 2 total 0 0 -2 10002 2 2 total 0 0 -4 10002 3 2 total 0 0 -6 10002 4 2 total 0 0 -8 10002 5 2 total 0 0 -10 10002 6 2 total 0 0 - material delayedgroup group out nuclide mean std. dev. -1 10002 1 1 total 0 0 -3 10002 2 1 total 0 0 -5 10002 3 1 total 0 0 -7 10002 4 1 total 0 0 -9 10002 5 1 total 0 0 -11 10002 6 1 total 0 0 -0 10002 1 2 total 0 0 -2 10002 2 2 total 0 0 -4 10002 3 2 total 0 0 -6 10002 4 2 total 0 0 -8 10002 5 2 total 0 0 -10 10002 6 2 total 0 0 - material delayedgroup group in nuclide mean std. dev. -1 10002 1 1 total 0 0 -3 10002 2 1 total 0 0 -5 10002 3 1 total 0 0 -7 10002 4 1 total 0 0 -9 10002 5 1 total 0 0 -11 10002 6 1 total 0 0 -0 10002 1 2 total 0 0 -2 10002 2 2 total 0 0 -4 10002 3 2 total 0 0 -6 10002 4 2 total 0 0 -8 10002 5 2 total 0 0 -10 10002 6 2 total 0 0 diff --git a/tests/test_mdgxs_library_no_nuclides/test_mdgxs_library_no_nuclides.py b/tests/test_mdgxs_library_no_nuclides/test_mdgxs_library_no_nuclides.py deleted file mode 100644 index 6ee8e9adbe..0000000000 --- a/tests/test_mdgxs_library_no_nuclides/test_mdgxs_library_no_nuclides.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import glob -import hashlib -sys.path.insert(0, os.pardir) -from testing_harness import PyAPITestHarness -from input_set import PinCellInputSet -import openmc -import openmc.mgxs - - -class MDGXSTestHarness(PyAPITestHarness): - def _build_inputs(self): - # Set the input set to use the pincell model - self._input_set = PinCellInputSet() - - # Generate inputs using parent class routine - super(MDGXSTestHarness, self)._build_inputs() - - # Initialize a two-group structure - energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6, - 20.]) - - # Initialize a six-group structure - delayed_groups = openmc.mgxs.DelayedGroups(range(1,7)) - - # 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 - - # Test all MDGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MDGXS_TYPES - self.mgxs_lib.energy_groups = energy_groups - self.mgxs_lib.delayed_groups = delayed_groups - self.mgxs_lib.domain_type = 'material' - self.mgxs_lib.build_library() - - # Initialize a tallies file - self._input_set.tallies = openmc.Tallies() - self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False) - self._input_set.tallies.export_to_xml() - - def _get_results(self, hash_output=False): - """Digest info in the statepoint and return as a string.""" - - # Read the statepoint file. - statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0] - sp = openmc.StatePoint(statepoint) - - # Load the MGXS library from the statepoint - self.mgxs_lib.load_from_statepoint(sp) - - # Build a string from Pandas Dataframe for each MGXS - outstr = '' - for domain in self.mgxs_lib.domains: - for mgxs_type in self.mgxs_lib.mgxs_types: - mgxs = self.mgxs_lib.get_mgxs(domain, mgxs_type) - df = mgxs.get_pandas_dataframe() - outstr += df.to_string() + '\n' - - # Hash the results if necessary - if hash_output: - sha512 = hashlib.sha512() - sha512.update(outstr.encode('utf-8')) - outstr = sha512.hexdigest() - - return outstr - - - def _cleanup(self): - super(MDGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - - -if __name__ == '__main__': - harness = MDGXSTestHarness('statepoint.10.*', True) - harness.main() diff --git a/tests/test_mdgxs_library_nuclides/inputs_true.dat b/tests/test_mdgxs_library_nuclides/inputs_true.dat deleted file mode 100644 index af136e1ec0..0000000000 --- a/tests/test_mdgxs_library_nuclides/inputs_true.dat +++ /dev/null @@ -1 +0,0 @@ -1cf1a4e8f46f3a5e4bb2824b8b3e4f4af5b43f12e0025ef98f7f54e3212305d8ec4334b3dffeab0e0df94de2eedae2d4aa4d0f15649129264a1cc3e3f9d08b58 \ No newline at end of file diff --git a/tests/test_mdgxs_library_nuclides/results_true.dat b/tests/test_mdgxs_library_nuclides/results_true.dat deleted file mode 100644 index d8cb494c74..0000000000 --- a/tests/test_mdgxs_library_nuclides/results_true.dat +++ /dev/null @@ -1 +0,0 @@ -7a6b9ba8f6289f1dac2d474f88003561a0179b45db58eedd671583eced3952f9ed708c1e35248351e469d511a6d99d33e02a9ba5135a0123f7f9c474c4e55a68 \ No newline at end of file diff --git a/tests/test_mdgxs_library_nuclides/test_mdgxs_library_nuclides.py b/tests/test_mdgxs_library_nuclides/test_mdgxs_library_nuclides.py deleted file mode 100644 index 4e67c23c7f..0000000000 --- a/tests/test_mdgxs_library_nuclides/test_mdgxs_library_nuclides.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -import glob -import hashlib -sys.path.insert(0, os.pardir) -from testing_harness import PyAPITestHarness -from input_set import PinCellInputSet -import openmc -import openmc.mgxs - - -class MDGXSTestHarness(PyAPITestHarness): - def _build_inputs(self): - # Set the input set to use the pincell model - self._input_set = PinCellInputSet() - - # Generate inputs using parent class routine - super(MDGXSTestHarness, self)._build_inputs() - - # Initialize a two-group structure - energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6, - 20.]) - - # Initialize a six-group structure - delayed_groups = openmc.mgxs.DelayedGroups(range(1,7)) - - # 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 - - # Test all MDGXS types - self.mgxs_lib.mgxs_types = openmc.mgxs.MDGXS_TYPES - self.mgxs_lib.energy_groups = energy_groups - self.mgxs_lib.delayed_groups = delayed_groups - self.mgxs_lib.domain_type = 'material' - self.mgxs_lib.build_library() - - # Initialize a tallies file - self._input_set.tallies = openmc.Tallies() - self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False) - self._input_set.tallies.export_to_xml() - - def _get_results(self, hash_output=True): - """Digest info in the statepoint and return as a string.""" - - # Read the statepoint file. - statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0] - sp = openmc.StatePoint(statepoint) - - # Load the MGXS library from the statepoint - self.mgxs_lib.load_from_statepoint(sp) - - # Build a string from Pandas Dataframe for each MGXS - outstr = '' - for domain in self.mgxs_lib.domains: - for mgxs_type in self.mgxs_lib.mgxs_types: - mgxs = self.mgxs_lib.get_mgxs(domain, mgxs_type) - df = mgxs.get_pandas_dataframe() - outstr += df.to_string() + '\n' - - # Hash the results if necessary - if hash_output: - sha512 = hashlib.sha512() - sha512.update(outstr.encode('utf-8')) - outstr = sha512.hexdigest() - - return outstr - - - def _cleanup(self): - super(MDGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - - -if __name__ == '__main__': - harness = MDGXSTestHarness('statepoint.10.*', True) - harness.main()