diff --git a/docs/source/methods/physics.rst b/docs/source/methods/physics.rst index 530d4ac418..67c427bcb8 100644 --- a/docs/source/methods/physics.rst +++ b/docs/source/methods/physics.rst @@ -576,12 +576,12 @@ resulting energies would violate laws governing the kinematics, i.e., the outgoing energy may be outside the range of available energy in the reaction. To avoid this situation, the accepted practice is to use a process known as -scaled interpolation [Doyas]_. First, we find the tabulated incident energies -which bound the actual incoming energy of the particle, i.e., find :math:`i` -such that :math:`E_i < E < E_{i+1}` and calculate the interpolation factor -:math:`f` via :eq:`interpolation-factor`. Then, we interpolate between the -minimum and maximum energies of the outgoing energy distributions corresponding -to :math:`E_i` and :math:`E_{i+1}`: +`scaled interpolation`_. First, we find the tabulated incident energies which +bound the actual incoming energy of the particle, i.e., find :math:`i` such that +:math:`E_i < E < E_{i+1}` and calculate the interpolation factor :math:`f` via +:eq:`interpolation-factor`. Then, we interpolate between the minimum and maximum +energies of the outgoing energy distributions corresponding to :math:`E_i` and +:math:`E_{i+1}`: .. math:: :label: continuous-minmax @@ -721,7 +721,7 @@ higher rejection efficiency than the standard technique, i.e. rule C45 in the Energy-Dependent Watt Spectrum ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The probability distribution for a [Watt]_ fission spectrum can be written in +The probability distribution for a `Watt fission spectrum`_ can be written in the form .. math:: @@ -1007,7 +1007,7 @@ well as secondary angle and energy distributions. For integrated cross sections, it is possible to calculate thermally-averaged cross sections by applying a kernel Doppler broadening algorithm to data at 0 K (or some temperature lower than the desired temperature). The most ubiquitous algorithm for this purpose is -the [SIGMA1]_ method developed by Red Cullen and subsequently refined by +the `SIGMA1 method`_ developed by Red Cullen and subsequently refined by others. This method is used in the NJOY_ and PREPRO_ data processing codes. The effect of thermal motion on secondary angle and energy distributions can be @@ -1507,7 +1507,7 @@ continuous-energy transport. In the unresolved resonance energy range, resonances may be so closely spaced that it is not possible for experimental measurements to resolve all resonances. To properly account for self-shielding in this energy range, OpenMC -uses the probability table method [Levitt]_. For most thermal reactors, the use +uses the `probability table method`_. For most thermal reactors, the use of probability tables will not significantly affect problem results. However, for some fast reactors and other problems with an appreciable flux spectrum in the unresolved resonance range, not using probability tables may lead to @@ -1633,32 +1633,26 @@ another. .. rubric:: References -.. [Doyas] Richard J. Doyas and Sterrett T. Perkins, "Interpolation of Tabular - Secondary Neutron and Photon Energy Distributions," *Nucl. Sci. Eng.*, - **50**, 390-392 (1972). - .. [Gelbard] Ely M. Gelbard, "Epithermal Scattering in VIM," FRA-TM-123, Argonne National Laboratory (1979). -.. [Levitt] Leo B. Levitt, "The Probability Table Method for Treating Unresolved - Neutron Resonances in Monte Carlo Calculations," *Nucl. Sci. Eng.*, **49**, - pp. 450-457 (1972). - -.. [SIGMA1] Dermett E. Cullen and Charles R. Weisbin, "Exact Doppler Broadening - of Tabulated Cross Sections," *Nucl. Sci. Eng.*, **60**, pp. 199-229 (1976). - .. [Squires] G. L. Squires, *Introduction to the Theory of Thermal Neutron Scattering*, Cambridge University Press (1978). -.. [Watt] B. E. Watt, "Energy Spectrum of Neutrons from Thermal Fission of - U235," *Phys. Rev.*, **87** (6), 1037-1041 (1952). - .. [Williams] M. M. R. Williams, *The Slowing Down and Thermalization of Neutrons*, North-Holland Publishing Co., Amsterdam (1966). **Note:** This book can be obtained for free from the OECD_. .. |sab| replace:: S(:math:`\alpha,\beta,T`) +.. _SIGMA1 method: http://dx.doi.org/10.13182/NSE76-1 + +.. _scaled interpolation: http://www.ans.org/pubs/journals/nse/a_26575 + +.. _probability table method: http://dx.doi.org/10.13182/NSE72-3 + +.. _Watt fission spectrum: http://dx.doi.org/10.1103/PhysRev.87.1037 + .. _Foderaro: http://hdl.handle.net/1721.1/1716 .. _OECD: http://www.oecd-nea.org/dbprog/MMRW-BOOKS.html diff --git a/docs/source/methods/random_numbers.rst b/docs/source/methods/random_numbers.rst index e0a974f43b..138a6c75e4 100644 --- a/docs/source/methods/random_numbers.rst +++ b/docs/source/methods/random_numbers.rst @@ -38,7 +38,7 @@ Typically, :math:`M` is chosen to be a power of two as this enables :math:`x \mod M` to be performed using the bitwise AND operator with a bit mask. The constants for the linear congruential generator used by default in OpenMC are :math:`g = 2806196910506780709`, :math:`c = 1`, and :math:`M = 2^{63}` (see -[LEcuyer]_). +`L'Ecuyer`_). Skip-ahead Capability --------------------- @@ -66,9 +66,7 @@ the idea is to determine the new multiplicative and additive constants in .. rubric:: References -.. [LEcuyer] P. L’Ecuyer, "Tables of Linear Congruential Generators of - Different Sizes and Good Lattice Structures," *Math. Comput.*, **68**, 249 - (1999). +.. _L'Ecuyer: http://dx.doi.org/10.1090/S0025-5718-99-00996-5 .. _Brown: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/anl-rn-arb-stride.pdf .. _linear congruential generator: http://en.wikipedia.org/wiki/Linear_congruential_generator diff --git a/docs/source/methods/tallies.rst b/docs/source/methods/tallies.rst index 3b01e03f3d..9e7bd93bb0 100644 --- a/docs/source/methods/tallies.rst +++ b/docs/source/methods/tallies.rst @@ -465,8 +465,7 @@ For degrees of freedom greater than two, it is not possible to obtain an analytical formula for the inverse of the cumulative distribution function. We must resort to either numerically solving for the inverse or to an approximation. Approximations for percentiles of the t-distribution have been -found with high levels of accuracy. OpenMC uses the approximation from -[George]_: +found with high levels of accuracy. OpenMC uses the `following approximation`_: .. math:: :label: percentile-n @@ -485,9 +484,7 @@ improve the estimate of the percentile. .. rubric:: References -.. [George] E. E. Olusegun George and Meenakshi Sivaram, "A modification of the - Fisher-Cornish approximation for the student t percentiles," Communication - in Statistics - Simulation and Computation, 16 (4), pp. 1123-1132 (1987). +.. _following approximation: http://dx.doi.org/10.1080/03610918708812641 .. _Bessel's correction: http://en.wikipedia.org/wiki/Bessel's_correction diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 09eab32621..809e02b916 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -605,13 +605,6 @@ following attributes/sub-elements: *Default*: Last batch only - :interval: - A single integer :math:`n` indicating that a state point should be written - every :math:`n` batches. This option can be given in lieu of listing - batches explicitly. - - *Default*: None - ```` Element -------------------------- @@ -628,15 +621,6 @@ attributes/sub-elements: *Default*: Last batch only - :interval: - A single integer :math:`n` indicating that a state point should be written - every :math:`n` batches. This option can be given in lieu of listing batches - explicitly. It should be noted that if the ``separate`` attribute is not set - to "true", this value should produce a list of batches that is a subset of - state point batches. - - *Default*: None - :separate: If this element is set to "true", a separate binary source point file will be written. Otherwise, the source sites will be written in the state point diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index bc5cbfadf3..91c977ca45 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -275,6 +275,8 @@ can typically be set for a single command, i.e. HDF5_ROOT=/opt/hdf5/1.8.15 cmake /path/to/openmc +.. _compile_linux: + Compiling on Linux and Mac OS X ------------------------------- @@ -299,80 +301,28 @@ OpenMC locally by specifying an install prefix when running cmake: The ``CMAKE_INSTALL_PREFIX`` variable can be changed to any path for which you have write-access. -Compiling on Windows --------------------- +Compiling on Windows 10 +----------------------- -Using Cygwin -++++++++++++ - -One option for compiling OpenMC on a Windows operating system is to use Cygwin_, -a Linux-like environment for Windows. You will need to first `install -Cygwin`_. When you are asked to select packages, make sure the following are -selected: - -* Devel: gcc-core -* Devel: gcc-fortran -* Devel: make -* Devel: cmake - -If you plan on obtaining the source code directly using git, select the -following packages: - -* Devel: git -* Devel: git-completion (Optional) -* Devel: gitk (Optional) - -In order to use the Python scripts provided with OpenMC, you will also need to -install Python. This can be done within Cygwin or directly in Windows. To -install within Cygwin, select the following packages: - -* Python: python (Version > 2.7 recommended) - -Once you have obtained the source code, run the following commands from within -the source code root directory: - -.. code-block:: sh - - mkdir build && cd build - cmake .. - make - -This will build an executable named ``openmc``. - -.. _Cygwin: http://cygwin.com/ -.. _install Cygwin: http://cygwin.com/setup.exe - -Using MinGW -+++++++++++ - -An alternate option for installing OpenMC on Windows is using MinGW_, which -stands for Minimalist GNU for Windows. An executable for installing the MinGW -distribution is available on SourceForge_. When installing MinGW, make sure the -following components are selected: - -* MinGW Compiler Suite: Fortran Compiler -* MSYS Basic System - -Once MinGW is installed, copy the OpenMC source distribution to your MinGW home -directory (usually C:\\MinGW\\msys\\1.0\\home\\YourUsername). Once you have -the source code in place, run the following commands from within the MinGW shell -in the root directory of the OpenMC distribution: - -.. code-block:: sh - - make - -This will build an executable named ``openmc``. - -.. _MinGW: http://www.mingw.org -.. _SourceForge: http://sourceforge.net/projects/mingw +Recent versions of Windows 10 include a subsystem for Linux that allows one to +run Bash within Ubuntu running in Windows. First, follow the installation guide +`here `_ to get +Bash on Ubuntu on Windows setup. Once you are within bash, obtain the necessary +:ref:`prerequisites ` via ``apt-get``. Finally, follow the +:ref:`instructions for compiling on linux `. Compiling for the Intel Xeon Phi -------------------------------- -In order to build OpenMC for the Intel Xeon Phi using the Intel Fortran -compiler, it is necessary to specify that all objects be compiled with the -``-mmic`` flag as follows: +For the second generation Knights Landing architecture, nothing special is +required to compile OpenMC. You may wish to experiment with compiler flags that +control generation of vector instructions to see what configuration gives +optimal performance for your target problem. + +For the first generation Knights Corner architecture, it is necessary to +cross-compile OpenMC. If you are using the Intel Fortran compiler, it is +necessary to specify that all objects be compiled with the ``-mmic`` flag as +follows: .. code-block:: sh @@ -380,9 +330,10 @@ compiler, it is necessary to specify that all objects be compiled with the FC=ifort CC=icc FFLAGS=-mmic cmake -Dopenmp=on .. make -Note that unless an HDF5 build for the Intel Xeon Phi is already on your target -machine, you will need to cross-compile HDF5 for the Xeon Phi. An `example -script`_ to build zlib and HDF5 provides several necessary workarounds. +Note that unless an HDF5 build for the Intel Xeon Phi (Knights Corner) is +already on your target machine, you will need to cross-compile HDF5 for the Xeon +Phi. An `example script`_ to build zlib and HDF5 provides several necessary +workarounds. .. _example script: https://github.com/paulromano/install-scripts/blob/master/install-hdf5-mic @@ -497,7 +448,7 @@ that are to be converted: 1. List each ACE library as a positional argument. This is very useful in conjunction with the usual shell utilities (ls, find, etc.). 2. Use the ``--xml`` option to specify a pre-v0.9 cross_sections.xml file. -3. Use the ``--xsdir` option to specify a MCNP xsdir file. +3. Use the ``--xsdir`` option to specify a MCNP xsdir file. 4. Use the ``--xsdata`` option to specify a Serpent xsdata file. The script does not use any extra information from cross_sections.xml/ xsdir/ diff --git a/examples/python/pincell/build-xml.py b/examples/python/pincell/build-xml.py index 2a550b9d73..cf01ba852e 100644 --- a/examples/python/pincell/build-xml.py +++ b/examples/python/pincell/build-xml.py @@ -163,9 +163,11 @@ bounds = [-0.62992, -0.62992, -1, 0.62992, 0.62992, 1] uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) settings_file.source = openmc.source.Source(space=uniform_dist) -settings_file.entropy_lower_left = [-0.39218, -0.39218, -1.e50] -settings_file.entropy_upper_right = [0.39218, 0.39218, 1.e50] -settings_file.entropy_dimension = [10, 10, 1] +entropy_mesh = openmc.Mesh() +entropy_mesh.lower_left = [-0.39218, -0.39218, -1.e50] +entropy_mesh.upper_right = [0.39218, 0.39218, 1.e50] +entropy_mesh.dimension = [10, 10, 1] +settings_file.entropy_mesh = entropy_mesh settings_file.export_to_xml() diff --git a/openmc/__init__.py b/openmc/__init__.py index 40a4dcae4b..9d8c7cf433 100644 --- a/openmc/__init__.py +++ b/openmc/__init__.py @@ -1,5 +1,6 @@ from openmc.arithmetic import * from openmc.cell import * +from openmc.mesh import * from openmc.lattice import * from openmc.element import * from openmc.geometry import * @@ -13,7 +14,6 @@ from openmc.source import * from openmc.settings import * from openmc.surface import * from openmc.universe import * -from openmc.mesh import * from openmc.filter import * from openmc.trigger import * from openmc.tally_derivative import * diff --git a/openmc/cell.py b/openmc/cell.py index f950963d27..8cd87daf3d 100644 --- a/openmc/cell.py +++ b/openmc/cell.py @@ -547,7 +547,11 @@ class Cell(object): if self.region is not None: # Set the region attribute with the region specification - element.set("region", str(self.region)) + region = str(self.region) + if region.startswith('('): + region = region[1:-1] + if len(region) > 0: + element.set("region", region) # Only surfaces that appear in a region are added to the geometry # file, so the appropriate check is performed here. First we create @@ -557,10 +561,9 @@ class Cell(object): # thus far. def create_surface_elements(node, element): if isinstance(node, Halfspace): - path = './surface[@id=\'{0}\']'.format(node.surface.id) + path = "./surface[@id='{}']".format(node.surface.id) if xml_element.find(path) is None: - surface_subelement = node.surface.create_xml_subelement() - xml_element.append(surface_subelement) + xml_element.append(node.surface.create_xml_subelement()) elif isinstance(node, Complement): create_surface_elements(node.node, element) else: diff --git a/openmc/data/reaction.py b/openmc/data/reaction.py index bb976f9fa5..627f3956cb 100644 --- a/openmc/data/reaction.py +++ b/openmc/data/reaction.py @@ -86,7 +86,7 @@ def _get_products(ev, mt): # Read HEAD record items = get_head_record(file_obj) reference_frame = {1: 'laboratory', 2: 'center-of-mass', - 3: 'light-heavy'}[items[3]] + 3: 'light-heavy', 4: 'breakup'}[items[3]] n_products = items[4] products = [] diff --git a/openmc/geometry.py b/openmc/geometry.py index 4d822cc8ec..70f9c928f6 100644 --- a/openmc/geometry.py +++ b/openmc/geometry.py @@ -73,19 +73,16 @@ class Geometry(object): Path to file to write. Defaults to 'geometry.xml'. """ - # Clear OpenMC written IDs used to optimize XML generation - openmc.universe.WRITTEN_IDS = {} - # Create XML representation - geometry_file = ET.Element("geometry") - self.root_universe.create_xml_subelement(geometry_file) + root_element = ET.Element("geometry") + self.root_universe.create_xml_subelement(root_element) # Clean the indentation in the file to be user-readable - sort_xml_elements(geometry_file) - clean_xml_indentation(geometry_file) + sort_xml_elements(root_element) + clean_xml_indentation(root_element) # Write the XML Tree to the geometry.xml file - tree = ET.ElementTree(geometry_file) + tree = ET.ElementTree(root_element) tree.write(path, xml_declaration=True, encoding='utf-8', method="xml") def find(self, point): diff --git a/openmc/material.py b/openmc/material.py index 08b001e47a..a7a05989bd 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -734,9 +734,14 @@ class Material(object): return xml_elements - def get_material_xml(self, cross_sections): + def to_xml_element(self, cross_sections=None): """Return XML representation of the material + Parameters + ---------- + cross_sections : str + Path to an XML cross sections listing file + Returns ------- element : xml.etree.ElementTree.Element @@ -757,10 +762,14 @@ class Material(object): subelement.text = str(self.temperature) # Create density XML subelement - subelement = ET.SubElement(element, "density") - if self._density_units is not 'sum': - subelement.set("value", str(self._density)) - subelement.set("units", self._density_units) + if self._density is not None: + subelement = ET.SubElement(element, "density") + if self._density_units is not 'sum': + subelement.set("value", str(self._density)) + subelement.set("units", self._density_units) + else: + raise ValueError('Density has not been set for material {}!' + .format(self.id)) if not self._convert_to_distrib_comps: if self._macroscopic is None: @@ -865,8 +874,6 @@ class Materials(cv.CheckedList): def __init__(self, materials=None): super(Materials, self).__init__(Material, 'materials collection') - - self._materials_file = ET.Element("materials") self._cross_sections = None self._multipole_library = None @@ -971,19 +978,18 @@ class Materials(cv.CheckedList): for material in self: material.make_isotropic_in_lab() - def _create_material_subelements(self): + def _create_material_subelements(self, root_element): for material in self: - xml_element = material.get_material_xml(self.cross_sections) - self._materials_file.append(xml_element) + root_element.append(material.to_xml_element(self.cross_sections)) - def _create_cross_sections_subelement(self): + def _create_cross_sections_subelement(self, root_element): if self._cross_sections is not None: - element = ET.SubElement(self._materials_file, "cross_sections") + element = ET.SubElement(root_element, "cross_sections") element.text = str(self._cross_sections) - def _create_multipole_library_subelement(self): + def _create_multipole_library_subelement(self, root_element): if self._multipole_library is not None: - element = ET.SubElement(self._materials_file, "multipole_library") + element = ET.SubElement(root_element, "multipole_library") element.text = str(self._multipole_library) def export_to_xml(self, path='materials.xml'): @@ -996,17 +1002,15 @@ class Materials(cv.CheckedList): """ - # Reset xml element tree - self._materials_file.clear() - - self._create_material_subelements() - self._create_cross_sections_subelement() - self._create_multipole_library_subelement() + root_element = ET.Element("materials") + self._create_material_subelements(root_element) + self._create_cross_sections_subelement(root_element) + self._create_multipole_library_subelement(root_element) # Clean the indentation in the file to be user-readable - sort_xml_elements(self._materials_file) - clean_xml_indentation(self._materials_file) + sort_xml_elements(root_element) + clean_xml_indentation(root_element) # Write the XML Tree to the materials.xml file - tree = ET.ElementTree(self._materials_file) + tree = ET.ElementTree(root_element) tree.write(path, xml_declaration=True, encoding='utf-8', method="xml") diff --git a/openmc/mesh.py b/openmc/mesh.py index d626d728a2..1977af4bb5 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -215,7 +215,7 @@ class Mesh(object): for z in range(self.dimension[2]): yield [x + 1, y + 1, z + 1] - def get_mesh_xml(self): + def to_xml_element(self): """Return XML representation of the mesh Returns diff --git a/openmc/mgxs_library.py b/openmc/mgxs_library.py index 10fda4593a..331d9ed12d 100644 --- a/openmc/mgxs_library.py +++ b/openmc/mgxs_library.py @@ -2135,18 +2135,20 @@ class MGXSLibrary(object): @classmethod def from_hdf5(cls, filename=None): """Generate an MGXS Library from an HDF5 group or file + Parameters ---------- filename : str, optional Name of HDF5 file containing MGXS data. Default is None. If not provided, the value of the OPENMC_MG_CROSS_SECTIONS environmental variable will be used + Returns ------- openmc.MGXSLibrary Multi-group cross section data object. - """ + """ # If filename is None, get the cross sections from the # OPENMC_CROSS_SECTIONS environment variable if filename is None: diff --git a/openmc/region.py b/openmc/region.py index ce970f8120..8fd7e5181d 100644 --- a/openmc/region.py +++ b/openmc/region.py @@ -232,6 +232,11 @@ class Intersection(Region): def __init__(self, *nodes): self.nodes = list(nodes) + def __and__(self, other): + new = Intersection(*self.nodes) + new.nodes.append(other) + return new + def __iter__(self): for n in self.nodes: yield n @@ -304,6 +309,11 @@ class Union(Region): def __init__(self, *nodes): self.nodes = list(nodes) + def __or__(self, other): + new = Union(*self.nodes) + new.nodes.append(other) + return new + def __iter__(self): for n in self.nodes: yield n diff --git a/openmc/settings.py b/openmc/settings.py index bb45e91502..cc3a1fbb09 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -9,7 +9,7 @@ import numpy as np from openmc.clean_xml import clean_xml_indentation import openmc.checkvalue as cv -from openmc import Nuclide, VolumeCalculation, Source +from openmc import Nuclide, VolumeCalculation, Source, Mesh class Settings(object): @@ -17,52 +17,15 @@ class Settings(object): Attributes ---------- - run_mode : {'eigenvalue' or 'fixed source'} - The type of calculation to perform (default is 'eigenvalue') batches : int Number of batches to simulate - generations_per_batch : int - Number of generations per batch - inactive : int - Number of inactive batches - particles : int - Number of particles per generation - keff_trigger : dict - Dictionary defining a trigger on eigenvalue. The dictionary must have - two keys, 'type' and 'threshold'. Acceptable values corresponding to - type are 'variance', 'std_dev', and 'rel_err'. The threshold value - should be a float indicating the variance, standard deviation, or - relative error used. - source : Iterable of openmc.Source - Distribution of source sites in space, angle, and energy - output : dict - Dictionary indicating what files to output. Valid keys are 'summary', - 'cross_sections', 'tallies', and 'distribmats'. Values corresponding to - each key should be given as a boolean value. - output_path : str - Path to write output to - verbosity : int - Verbosity during simulation between 1 and 10 - statepoint_batches : Iterable of int - List of batches at which to write statepoint files - statepoint_interval : int - Number of batches after which a new statepoint file should be written - sourcepoint_batches : Iterable of int - List of batches at which to write source files - sourcepoint_interval : int - Number of batches after which a new source file should be written - sourcepoint_separate : bool - Indicate whether the souce should be written as part of the statepoint - file or on its own - sourcepoint_write : bool - Indicate whether the source should be written at all - sourcepoint_overwrite : bool - Indicate whether to confidence_intervals : bool If True, uncertainties on tally results will be reported as the half-width of the 95% two-sided confidence interval. If False, uncertainties on tally results will be reported as the sample standard deviation. + create_fission_neutrons : bool + Indicate whether fission neutrons should be created or not. cross_sections : str Indicates the path to an XML cross section listing file (usually named cross_sections.xml). If it is not set, the @@ -70,23 +33,6 @@ class Settings(object): continuous-energy calculations and :envvar:`OPENMC_MG_CROSS_SECTIONS` will be used for multi-group calculations to find the path to the XML cross section file. - multipole_library : str - Indicates the path to a directory containing a windowed multipole - cross section library. If it is not set, the - :envvar:`OPENMC_MULTIPOLE_LIBRARY` environment variable will be used. A - multipole library is optional. - energy_mode : {'continuous-energy', 'multi-group'} - Set whether the calculation should be continuous-energy or multi-group. - max_order : int - Maximum scattering order to apply globally when in multi-group mode. - ptables : bool - Determine whether probability tables are used. - run_cmfd : bool - Indicate if coarse mesh finite difference acceleration is to be used - seed : int - Seed for the linear congruential pseudorandom number generator - survival_biasing : bool - Indicate whether survival biasing is to be used cutoff : dict Dictionary defining weight cutoff and energy cutoff. The dictionary may have three keys, 'weight', 'weight_avg' and 'energy'. Value for 'weight' @@ -95,13 +41,66 @@ class Settings(object): weight assigned to particles that are not killed after Russian roulette. Value of energy should be a float indicating energy in eV below which particle will be killed. - entropy_dimension : tuple or list - Number of Shannon entropy mesh cells in the x, y, and z directions, - respectively - entropy_lower_left : tuple or list - Coordinates of the lower-left point of the Shannon entropy mesh - entropy_upper_right : tuple or list - Coordinates of the upper-right point of the Shannon entropy mesh + energy_mode : {'continuous-energy', 'multi-group'} + Set whether the calculation should be continuous-energy or multi-group. + entropy_mesh : openmc.Mesh + Mesh to be used to calculate Shannon entropy. If the mesh dimensions are + not specified. OpenMC assigns a mesh such that 20 source sites per mesh + cell are to be expected on average. + generations_per_batch : int + Number of generations per batch + inactive : int + Number of inactive batches + keff_trigger : dict + Dictionary defining a trigger on eigenvalue. The dictionary must have + two keys, 'type' and 'threshold'. Acceptable values corresponding to + type are 'variance', 'std_dev', and 'rel_err'. The threshold value + should be a float indicating the variance, standard deviation, or + relative error used. + max_order : int + Maximum scattering order to apply globally when in multi-group mode. + multipole_library : str + Indicates the path to a directory containing a windowed multipole + cross section library. If it is not set, the + :envvar:`OPENMC_MULTIPOLE_LIBRARY` environment variable will be used. A + multipole library is optional. + no_reduce : bool + Indicate that all user-defined and global tallies should not be reduced + across processes in a parallel calculation. + output : dict + Dictionary indicating what files to output. Valid keys are 'summary', + 'cross_sections', 'tallies', and 'distribmats'. Values corresponding to + each key should be given as a boolean value. + output_path : str + Path to write output to + particles : int + Number of particles per generation + ptables : bool + Determine whether probability tables are used. + resonance_scattering : ResonanceScattering or iterable of ResonanceScattering + The elastic scattering model to use for resonant isotopes + run_cmfd : bool + Indicate if coarse mesh finite difference acceleration is to be used + run_mode : {'eigenvalue' or 'fixed source'} + The type of calculation to perform (default is 'eigenvalue') + seed : int + Seed for the linear congruential pseudorandom number generator + source : Iterable of openmc.Source + Distribution of source sites in space, angle, and energy + sourcepoint : dict + Options for writing source points. Acceptable keys are: + + :batches: list of batches at which to write source + :overwrite: bool indicating whether to overwrite + :separate: bool indicating whether the source should be written as a + separate file + :write: bool indicating whether or not to write the source + statepoint : dict + Options for writing state points. Acceptable keys are: + + :batches: list of batches at which to write source + survival_biasing : bool + Indicate whether survival biasing is to be used tabular_legendre : dict Determines if a multi-group scattering moment kernel expanded via Legendre polynomials is to be converted to a tabular distribution or @@ -119,17 +118,6 @@ class Settings(object): within which cross sections may be used. 'multipole' is a boolean indicating whether or not the windowed multipole method should be used to evaluate resolved resonance cross sections. - trigger_active : bool - Indicate whether tally triggers are used - trigger_max_batches : int - Maximum number of batches simulated. If this is set, the number of - batches specified via ``batches`` is interpreted as the minimum number - of batches - trigger_batch_interval : int - Number of batches in between convergence checks - no_reduce : bool - Indicate that all user-defined and global tallies should not be reduced - across processes in a parallel calculation. threads : int Number of OpenMP threads trace : tuple or list @@ -139,19 +127,21 @@ class Settings(object): Specify particles for which track files should be written. Each particle is identified by a triplet with the batch number, generation number, and particle number. - ufs_dimension : tuple or list - Number of uniform fission site (UFS) mesh cells in the x, y, and z - directions, respectively - ufs_lower_left : tuple or list - Coordinates of the lower-left point of the UFS mesh - ufs_upper_right : tuple or list - Coordinates of the upper-right point of the UFS mesh - resonance_scattering : ResonanceScattering or iterable of ResonanceScattering - The elastic scattering model to use for resonant isotopes + trigger_active : bool + Indicate whether tally triggers are used + trigger_batch_interval : int + Number of batches in between convergence checks + trigger_max_batches : int + Maximum number of batches simulated. If this is set, the number of + batches specified via ``batches`` is interpreted as the minimum number + of batches + ufs_mesh : openmc.Mesh + Mesh to be used for redistributing source sites via the uniform fision + site (UFS) method. + verbosity : int + Verbosity during simulation between 1 and 10 volume_calculations : VolumeCalculation or iterable of VolumeCalculation Stochastic volume calculation specifications - create_fission_neutrons : bool - Indicate whether fission neutrons should be created or not. """ @@ -180,13 +170,10 @@ class Settings(object): self._seed = None self._survival_biasing = None - # Entropy subelement - self._entropy_dimension = None - self._entropy_lower_left = None - self._entropy_upper_right = None + # Shannon entropy mesh + self._entropy_mesh = None # Trigger subelement - self._trigger_subelement = None self._trigger_active = None self._trigger_max_batches = None self._trigger_batch_interval = None @@ -194,14 +181,9 @@ class Settings(object): self._output = None self._output_path = None - # Statepoint subelement - self._statepoint_batches = None - self._statepoint_interval = None - self._sourcepoint_batches = None - self._sourcepoint_interval = None - self._sourcepoint_separate = None - self._sourcepoint_write = None - self._sourcepoint_overwrite = None + # Output options + self._statepoint = {} + self._sourcepoint = {} self._threads = None self._no_reduce = None @@ -219,9 +201,7 @@ class Settings(object): self._cutoff = None # Uniform fission source subelement - self._ufs_dimension = 1 - self._ufs_lower_left = None - self._ufs_upper_right = None + self._ufs_mesh = None # Domain decomposition subelement self._dd_mesh_dimension = None @@ -231,9 +211,6 @@ class Settings(object): self._dd_allow_leakage = False self._dd_count_interactions = False - self._settings_file = ET.Element("settings") - self._run_mode_subelement = None - self._resonance_scattering = cv.CheckedList( ResonanceScattering, 'resonance scattering models') self._volume_calculations = cv.CheckedList( @@ -306,16 +283,8 @@ class Settings(object): return self._survival_biasing @property - def entropy_dimension(self): - return self._entropy_dimension - - @property - def entropy_lower_left(self): - return self._entropy_lower_left - - @property - def entropy_upper_right(self): - return self._entropy_upper_right + def entropy_mesh(self): + return self._entropy_mesh @property def trigger_active(self): @@ -338,32 +307,12 @@ class Settings(object): return self._output_path @property - def statepoint_batches(self): - return self._statepoint_batches + def sourcepoint(self): + return self._sourcepoint @property - def statepoint_interval(self): - return self._statepoint_interval - - @property - def sourcepoint_batches(self): - return self._sourcepoint_interval - - @property - def sourcepoint_interval(self): - return self._sourcepoint_interval - - @property - def sourcepoint_separate(self): - return self._sourcepoint_separate - - @property - def sourcepoint_write(self): - return self._sourcepoint_write - - @property - def sourcepoint_overwrite(self): - return self._sourcepoint_overwrite + def statepoint(self): + return self._statepoint @property def threads(self): @@ -398,16 +347,8 @@ class Settings(object): return self._cutoff @property - def ufs_dimension(self): - return self._ufs_dimension - - @property - def ufs_lower_left(self): - return self._ufs_lower_left - - @property - def ufs_upper_right(self): - return self._ufs_upper_right + def ufs_mesh(self): + return self._ufs_mesh @property def dd_mesh_dimension(self): @@ -557,44 +498,37 @@ class Settings(object): cv.check_less_than('verbosity', verbosity, 10, True) self._verbosity = verbosity - @statepoint_batches.setter - def statepoint_batches(self, batches): - cv.check_type('statepoint batches', batches, Iterable, Integral) - for batch in batches: - cv.check_greater_than('statepoint batch', batch, 0) - self._statepoint_batches = batches + @sourcepoint.setter + def sourcepoint(self, sourcepoint): + cv.check_type('sourcepoint options', sourcepoint, Mapping) + for key, value in sourcepoint.items(): + if key == 'batches': + cv.check_type('sourcepoint batches', value, Iterable, Integral) + for batch in value: + cv.check_greater_than('sourcepoint batch', batch, 0) + elif key == 'separate': + cv.check_type('sourcepoint separate', value, bool) + elif key == 'write': + cv.check_type('sourcepoint write', value, bool) + elif key == 'overwrite': + cv.check_type('sourcepoint overwrite', value, bool) + else: + raise ValueError("Unknown key '{}' encountered when setting " + "sourcepoint options.".format(key)) + self._sourcepoint = sourcepoint - @statepoint_interval.setter - def statepoint_interval(self, interval): - cv.check_type('statepoint interval', interval, Integral) - self._statepoint_interval = interval - - @sourcepoint_batches.setter - def sourcepoint_batches(self, batches): - cv.check_type('sourcepoint batches', batches, Iterable, Integral) - for batch in batches: - cv.check_greater_than('sourcepoint batch', batch, 0) - self._sourcepoint_batches = batches - - @sourcepoint_interval.setter - def sourcepoint_interval(self, interval): - cv.check_type('sourcepoint interval', interval, Integral) - self._sourcepoint_interval = interval - - @sourcepoint_separate.setter - def sourcepoint_separate(self, source_separate): - cv.check_type('sourcepoint separate', source_separate, bool) - self._sourcepoint_separate = source_separate - - @sourcepoint_write.setter - def sourcepoint_write(self, source_write): - cv.check_type('sourcepoint write', source_write, bool) - self._sourcepoint_write = source_write - - @sourcepoint_overwrite.setter - def sourcepoint_overwrite(self, source_overwrite): - cv.check_type('sourcepoint overwrite', source_overwrite, bool) - self._sourcepoint_overwrite = source_overwrite + @statepoint.setter + def statepoint(self, statepoint): + cv.check_type('statepoint options', statepoint, Mapping) + for key, value in statepoint.items(): + if key == 'batches': + cv.check_type('statepoint batches', value, Iterable, Integral) + for batch in value: + cv.check_greater_than('statepoint batch', batch, 0) + else: + raise ValueError("Unknown key '{}' encountered when setting " + "statepoint options.".format(key)) + self._statepoint = statepoint @confidence_intervals.setter def confidence_intervals(self, confidence_intervals): @@ -663,25 +597,13 @@ class Settings(object): self._cutoff = cutoff - @entropy_dimension.setter - def entropy_dimension(self, dimension): - cv.check_type('entropy mesh dimension', dimension, Iterable, Integral) - cv.check_length('entropy mesh dimension', dimension, 3) - self._entropy_dimension = dimension - - @entropy_lower_left.setter - def entropy_lower_left(self, lower_left): - cv.check_type('entropy mesh lower left corner', lower_left, - Iterable, Real) - cv.check_length('entropy mesh lower left corner', lower_left, 3) - self._entropy_lower_left = lower_left - - @entropy_upper_right.setter - def entropy_upper_right(self, upper_right): - cv.check_type('entropy mesh upper right corner', upper_right, - Iterable, Real) - cv.check_length('entropy mesh upper right corner', upper_right, 3) - self._entropy_upper_right = upper_right + @entropy_mesh.setter + def entropy_mesh(self, entropy): + cv.check_type('entropy mesh', entropy, Mesh) + cv.check_length('entropy mesh dimension', entropy.dimension, 3) + cv.check_length('entropy mesh lower-left corner', entropy.lower_left, 3) + cv.check_length('entropy mesh upper-right corner', entropy.upper_right, 3) + self._entropy_mesh = entropy @trigger_active.setter def trigger_active(self, trigger_active): @@ -764,25 +686,13 @@ class Settings(object): cv.check_greater_than('track particle', t[0], 0) self._track = track - @ufs_dimension.setter - def ufs_dimension(self, dimension): - cv.check_type('UFS mesh dimension', dimension, Iterable, Integral) - cv.check_length('UFS mesh dimension', dimension, 3) - for dim in dimension: - cv.check_greater_than('UFS mesh dimension', dim, 1, True) - self._ufs_dimension = dimension - - @ufs_lower_left.setter - def ufs_lower_left(self, lower_left): - cv.check_type('UFS mesh lower left corner', lower_left, Iterable, Real) - cv.check_length('UFS mesh lower left corner', lower_left, 3) - self._ufs_lower_left = lower_left - - @ufs_upper_right.setter - def ufs_upper_right(self, upper_right): - cv.check_type('UFS mesh upper right corner', upper_right, Iterable, Real) - cv.check_length('UFS mesh upper right corner', upper_right, 3) - self._ufs_upper_right = upper_right + @ufs_mesh.setter + def ufs_mesh(self, ufs_mesh): + cv.check_type('UFS mesh', ufs_mesh, Mesh) + cv.check_length('UFS mesh dimension', ufs_mesh.dimension, 3) + cv.check_length('UFS mesh lower-left corner', ufs_mesh.lower_left, 3) + cv.check_length('UFS mesh upper-right corner', ufs_mesh.upper_right, 3) + self._ufs_mesh = ufs_mesh @dd_mesh_dimension.setter def dd_mesh_dimension(self, dimension): @@ -883,172 +793,152 @@ class Settings(object): create_fission_neutrons, bool) self._create_fission_neutrons = create_fission_neutrons - def _create_run_mode_subelement(self): + def _create_run_mode_subelement(self, root): if self.run_mode == 'eigenvalue': - self._run_mode_subelement = \ - ET.SubElement(self._settings_file, "eigenvalue") - self._create_particles_subelement() - self._create_batches_subelement() - self._create_inactive_subelement() - self._create_generations_per_batch_subelement() - self._create_keff_trigger_subelement() + elem = ET.SubElement(root, "eigenvalue") + self._create_particles_subelement(elem) + self._create_batches_subelement(elem) + self._create_inactive_subelement(elem) + self._create_generations_per_batch_subelement(elem) + self._create_keff_trigger_subelement(elem) else: - if self._run_mode_subelement is None: - self._run_mode_subelement = \ - ET.SubElement(self._settings_file, "fixed_source") - self._create_particles_subelement() - self._create_batches_subelement() + elem = ET.SubElement(root, "fixed_source") + self._create_particles_subelement(elem) + self._create_batches_subelement(elem) - def _create_batches_subelement(self): + def _create_batches_subelement(self, run_mode_element): if self._batches is not None: - element = ET.SubElement(self._run_mode_subelement, "batches") + element = ET.SubElement(run_mode_element, "batches") element.text = str(self._batches) - def _create_generations_per_batch_subelement(self): + def _create_generations_per_batch_subelement(self, run_mode_element): if self._generations_per_batch is not None: - element = ET.SubElement(self._run_mode_subelement, + element = ET.SubElement(run_mode_element, "generations_per_batch") element.text = str(self._generations_per_batch) - def _create_inactive_subelement(self): + def _create_inactive_subelement(self, run_mode_element): if self._inactive is not None: - element = ET.SubElement(self._run_mode_subelement, "inactive") + element = ET.SubElement(run_mode_element, "inactive") element.text = str(self._inactive) - def _create_particles_subelement(self): + def _create_particles_subelement(self, run_mode_element): if self._particles is not None: - element = ET.SubElement(self._run_mode_subelement, "particles") + element = ET.SubElement(run_mode_element, "particles") element.text = str(self._particles) - def _create_keff_trigger_subelement(self): + def _create_keff_trigger_subelement(self, run_mode_element): if self._keff_trigger is not None: - element = ET.SubElement(self._run_mode_subelement, "keff_trigger") + element = ET.SubElement(run_mode_subelement, "keff_trigger") for key in self._keff_trigger: subelement = ET.SubElement(element, key) subelement.text = str(self._keff_trigger[key]).lower() - def _create_energy_mode_subelement(self): + def _create_energy_mode_subelement(self, root): if self._energy_mode is not None: - element = ET.SubElement(self._settings_file, "energy_mode") + element = ET.SubElement(root, "energy_mode") element.text = str(self._energy_mode) - def _create_max_order_subelement(self): + def _create_max_order_subelement(self, root): if self._max_order is not None: - element = ET.SubElement(self._settings_file, "max_order") + element = ET.SubElement(root, "max_order") element.text = str(self._max_order) - def _create_source_subelement(self): + def _create_source_subelement(self, root): for source in self.source: - self._settings_file.append(source.to_xml_element()) + root.append(source.to_xml_element()) - def _create_volume_calcs_subelement(self): + def _create_volume_calcs_subelement(self, root): for calc in self.volume_calculations: - self._settings_file.append(calc.to_xml_element()) + root.append(calc.to_xml_element()) - def _create_output_subelement(self): + def _create_output_subelement(self, root): if self._output is not None: - element = ET.SubElement(self._settings_file, "output") + element = ET.SubElement(root, "output") for key in self._output: subelement = ET.SubElement(element, key) subelement.text = str(self._output[key]).lower() - self._create_output_path_subelement() + if self._output_path is not None: + element = ET.SubElement(root, "output_path") + element.text = self._output_path - def _create_output_path_subelement(self): - if self._output_path is not None: - element = ET.SubElement(self._settings_file, "output_path") - element.text = self._output_path - - def _create_verbosity_subelement(self): + def _create_verbosity_subelement(self, root): if self._verbosity is not None: - element = ET.SubElement(self._settings_file, "verbosity") + element = ET.SubElement(root, "verbosity") element.text = str(self._verbosity) - def _create_statepoint_subelement(self): - # Batches subelement - if self._statepoint_batches is not None: - element = ET.SubElement(self._settings_file, "state_point") - subelement = ET.SubElement(element, "batches") - subelement.text = ' '.join(map(str, self._statepoint_batches)) + def _create_statepoint_subelement(self, root): + if self._statepoint: + element = ET.SubElement(root, "state_point") + if 'batches' in self._statepoint: + subelement = ET.SubElement(element, "batches") + subelement.text = ' '.join( + str(x) for x in self._statepoint['batches']) - # Interval subelement - elif self._statepoint_interval is not None: - element = ET.SubElement(self._settings_file, "state_point") - subelement = ET.SubElement(element, "interval") - subelement.text = str(self._statepoint_interval) + def _create_sourcepoint_subelement(self, root): + if self._sourcepoint: + element = ET.SubElement(root, "source_point") - def _create_sourcepoint_subelement(self): - # Batches subelement - if self._sourcepoint_batches is not None: - element = ET.SubElement(self._settings_file, "source_point") - subelement = ET.SubElement(element, "batches") - subelement.text = ' '.join(map(str, self._sourcepoint_batches)) + if 'batches' in self._sourcepoint: + subelement = ET.SubElement(element, "batches") + subelement.text = ' '.join( + str(x) for x in self._sourcepoint['batches']) - # Interval subelement - elif self._sourcepoint_interval is not None: - element = ET.SubElement(self._settings_file, "source_point") - subelement = ET.SubElement(element, "interval") - subelement.text = str(self._sourcepoint_interval) + if 'separate' in self._sourcepoint: + subelement = ET.SubElement(element, "separate") + subelement.text = str(self._sourcepoint['separate']).lower() - # Separate subelement - if self._sourcepoint_separate is not None: - element = ET.SubElement(self._settings_file, "source_point") - subelement = ET.SubElement(element, "separate") - subelement.text = str(self._sourcepoint_separate).lower() + if 'write' in self._sourcepoint: + subelement = ET.SubElement(element, "write") + subelement.text = str(self._sourcepoint['write']).lower() - # Write subelement - if self._sourcepoint_write is not None: - element = ET.SubElement(self._settings_file, "source_point") - subelement = ET.SubElement(element, "write") - subelement.text = str(self._sourcepoint_write).lower() + # Overwrite latest subelement + if 'overwrite' in self._sourcepoint: + subelement = ET.SubElement(element, "overwrite_latest") + subelement.text = str(self._sourcepoint['overwrite']).lower() - # Overwrite latest subelement - if self._sourcepoint_overwrite is not None: - element = ET.SubElement(self._settings_file, "source_point") - subelement = ET.SubElement(element, "overwrite_latest") - subelement.text = str(self._sourcepoint_overwrite).lower() - - def _create_confidence_intervals(self): + def _create_confidence_intervals(self, root): if self._confidence_intervals is not None: - element = ET.SubElement(self._settings_file, "confidence_intervals") + element = ET.SubElement(root, "confidence_intervals") element.text = str(self._confidence_intervals).lower() - def _create_cross_sections_subelement(self): + def _create_cross_sections_subelement(self, root): if self._cross_sections is not None: - element = ET.SubElement(self._settings_file, "cross_sections") + element = ET.SubElement(root, "cross_sections") element.text = str(self._cross_sections) - def _create_multipole_library_subelement(self): + def _create_multipole_library_subelement(self, root): if self._multipole_library is not None: - element = ET.SubElement(self._settings_file, "multipole_library") + element = ET.SubElement(root, "multipole_library") element.text = str(self._multipole_library) - def _create_ptables_subelement(self): + def _create_ptables_subelement(self, root): if self._ptables is not None: - element = ET.SubElement(self._settings_file, "ptables") + element = ET.SubElement(root, "ptables") element.text = str(self._ptables).lower() - def _create_run_cmfd_subelement(self): + def _create_run_cmfd_subelement(self, root): if self._run_cmfd is not None: - element = ET.SubElement(self._settings_file, "run_cmfd") + element = ET.SubElement(root, "run_cmfd") element.text = str(self._run_cmfd).lower() - def _create_seed_subelement(self): + def _create_seed_subelement(self, root): if self._seed is not None: - element = ET.SubElement(self._settings_file, "seed") + element = ET.SubElement(root, "seed") element.text = str(self._seed) - def _create_survival_biasing_subelement(self): + def _create_survival_biasing_subelement(self, root): if self._survival_biasing is not None: - element = ET.SubElement(self._settings_file, "survival_biasing") + element = ET.SubElement(root, "survival_biasing") element.text = str(self._survival_biasing).lower() - def _create_cutoff_subelement(self): + def _create_cutoff_subelement(self, root): if self._cutoff is not None: - element = ET.SubElement(self._settings_file, "cutoff") + element = ET.SubElement(root, "cutoff") if 'weight' in self._cutoff: subelement = ET.SubElement(element, "weight") subelement.text = str(self._cutoff['weight']) @@ -1061,110 +951,90 @@ class Settings(object): subelement = ET.SubElement(element, "energy") subelement.text = str(self._cutoff['energy']) - def _create_entropy_subelement(self): - if self._entropy_lower_left is not None and \ - self._entropy_upper_right is not None: - - element = ET.SubElement(self._settings_file, "entropy") - - subelement = ET.SubElement(element, "dimension") - subelement.text = ' '.join(map(str, self._entropy_dimension)) + def _create_entropy_subelement(self, root): + if self._entropy_mesh is not None: + element = ET.SubElement(root, "entropy") + if self._entropy_mesh.dimension is not None: + subelement = ET.SubElement(element, "dimension") + subelement.text = ' '.join( + str(x) for x in self._entropy_mesh.dimension) subelement = ET.SubElement(element, "lower_left") - subelement.text = ' '.join(map(str, self._entropy_lower_left)) - + subelement.text = ' '.join( + str(x) for x in self._entropy_mesh.lower_left) subelement = ET.SubElement(element, "upper_right") - subelement.text = ' '.join(map(str, self._entropy_upper_right)) + subelement.text = ' '.join( + str(x) for x in self._entropy_mesh.upper_right) - def _create_trigger_subelement(self): - self._create_trigger_active_subelement() - self._create_trigger_max_batches_subelement() - self._create_trigger_batch_interval_subelement() - - def _create_trigger_active_subelement(self): + def _create_trigger_subelement(self, root): if self._trigger_active is not None: - if self._trigger_subelement is None: - self._trigger_subelement = ET.SubElement(self._settings_file, - "trigger") - - element = ET.SubElement(self._trigger_subelement, "active") + trigger_element = ET.SubElement(root, "trigger") + element = ET.SubElement(trigger_element, "active") element.text = str(self._trigger_active).lower() - def _create_trigger_max_batches_subelement(self): - if self._trigger_max_batches is not None: - if self._trigger_subelement is None: - self._trigger_subelement = ET.SubElement(self._settings_file, - "trigger") + if self._trigger_max_batches is not None: + element = ET.SubElement(trigger_element, "max_batches") + element.text = str(self._trigger_max_batches) - element = ET.SubElement(self._trigger_subelement, "max_batches") - element.text = str(self._trigger_max_batches) + if self._trigger_batch_interval is not None: + element = ET.SubElement(trigger_element, "batch_interval") + element.text = str(self._trigger_batch_interval) - def _create_trigger_batch_interval_subelement(self): - if self._trigger_batch_interval is not None: - if self._trigger_subelement is None: - self._trigger_subelement = ET.SubElement(self._settings_file, - "trigger") - - element = ET.SubElement(self._trigger_subelement, "batch_interval") - element.text = str(self._trigger_batch_interval) - - def _create_no_reduce_subelement(self): + def _create_no_reduce_subelement(self, root): if self._no_reduce is not None: - element = ET.SubElement(self._settings_file, "no_reduce") + element = ET.SubElement(root, "no_reduce") element.text = str(self._no_reduce).lower() - def _create_tabular_legendre_subelements(self): + def _create_tabular_legendre_subelements(self, root): if self.tabular_legendre: - element = ET.SubElement(self._settings_file, "tabular_legendre") + element = ET.SubElement(root, "tabular_legendre") subelement = ET.SubElement(element, "enable") subelement.text = str(self._tabular_legendre['enable']).lower() if 'num_points' in self._tabular_legendre: subelement = ET.SubElement(element, "num_points") subelement.text = str(self._tabular_legendre['num_points']) - def _create_temperature_subelements(self): + def _create_temperature_subelements(self, root): if self.temperature: for key, value in sorted(self.temperature.items()): - element = ET.SubElement(self._settings_file, + element = ET.SubElement(root, "temperature_{}".format(key)) element.text = str(value) - def _create_threads_subelement(self): + def _create_threads_subelement(self, root): if self._threads is not None: - element = ET.SubElement(self._settings_file, "threads") + element = ET.SubElement(root, "threads") element.text = str(self._threads) - def _create_trace_subelement(self): + def _create_trace_subelement(self, root): if self._trace is not None: - element = ET.SubElement(self._settings_file, "trace") + element = ET.SubElement(root, "trace") element.text = ' '.join(map(str, self._trace)) - def _create_track_subelement(self): + def _create_track_subelement(self, root): if self._track is not None: - element = ET.SubElement(self._settings_file, "track") + element = ET.SubElement(root, "track") element.text = ' '.join(map(str, self._track)) - def _create_ufs_subelement(self): - if self._ufs_lower_left is not None and \ - self._ufs_upper_right is not None: - - element = ET.SubElement(self._settings_file, "uniform_fs") - + def _create_ufs_subelement(self, root): + if self._ufs_mesh is not None: + element = ET.SubElement(root, "uniform_fs") subelement = ET.SubElement(element, "dimension") - subelement.text = ' '.join(map(str, self._ufs_dimension)) - + subelement.text = ' '.join(str(x) for x in + self._ufs_mesh.dimension) subelement = ET.SubElement(element, "lower_left") - subelement.text = ' '.join(map(str, self._ufs_lower_left)) - + subelement.text = ' '.join(str(x) for x in + self._ufs_mesh.lower_left) subelement = ET.SubElement(element, "upper_right") - subelement.text = ' '.join(map(str, self._ufs_upper_right)) + subelement.text = ' '.join(str(x) for x in + self._ufs_mesh.upper_right) - def _create_dd_subelement(self): + def _create_dd_subelement(self, root): if self._dd_mesh_lower_left is not None and \ self._dd_mesh_upper_right is not None and \ self._dd_mesh_dimension is not None: - element = ET.SubElement(self._settings_file, "domain_decomposition") + element = ET.SubElement(root, "domain_decomposition") subelement = ET.SubElement(element, "mesh") subsubelement = ET.SubElement(subelement, "dimension") @@ -1186,15 +1056,15 @@ class Settings(object): subelement = ET.SubElement(element, "count_interactions") subelement.text = str(self._dd_count_interactions).lower() - def _create_resonance_scattering_subelement(self): + def _create_resonance_scattering_subelement(self, root): if len(self.resonance_scattering) > 0: - elem = ET.SubElement(self._settings_file, 'resonance_scattering') + elem = ET.SubElement(root, 'resonance_scattering') for r in self.resonance_scattering: elem.append(r.to_xml_element()) - def _create_create_fission_neutrons_subelement(self): + def _create_create_fission_neutrons_subelement(self, root): if self._create_fission_neutrons is not None: - elem = ET.SubElement(self._settings_file, "create_fission_neutrons") + elem = ET.SubElement(root, "create_fission_neutrons") elem.text = str(self._create_fission_neutrons).lower() def export_to_xml(self, path='settings.xml'): @@ -1208,46 +1078,43 @@ class Settings(object): """ # Reset xml element tree - self._settings_file.clear() - self._source_subelement = None - self._trigger_subelement = None - self._run_mode_subelement = None + root_element = ET.Element("settings") - self._create_run_mode_subelement() - self._create_source_subelement() - self._create_output_subelement() - self._create_statepoint_subelement() - self._create_sourcepoint_subelement() - self._create_confidence_intervals() - self._create_cross_sections_subelement() - self._create_multipole_library_subelement() - self._create_energy_mode_subelement() - self._create_max_order_subelement() - self._create_ptables_subelement() - self._create_run_cmfd_subelement() - self._create_seed_subelement() - self._create_survival_biasing_subelement() - self._create_cutoff_subelement() - self._create_entropy_subelement() - self._create_trigger_subelement() - self._create_no_reduce_subelement() - self._create_threads_subelement() - self._create_verbosity_subelement() - self._create_tabular_legendre_subelements() - self._create_temperature_subelements() - self._create_trace_subelement() - self._create_track_subelement() - self._create_ufs_subelement() - self._create_dd_subelement() - self._create_resonance_scattering_subelement() - self._create_volume_calcs_subelement() - self._create_create_fission_neutrons_subelement() + self._create_run_mode_subelement(root_element) + self._create_source_subelement(root_element) + self._create_output_subelement(root_element) + self._create_statepoint_subelement(root_element) + self._create_sourcepoint_subelement(root_element) + self._create_confidence_intervals(root_element) + self._create_cross_sections_subelement(root_element) + self._create_multipole_library_subelement(root_element) + self._create_energy_mode_subelement(root_element) + self._create_max_order_subelement(root_element) + self._create_ptables_subelement(root_element) + self._create_run_cmfd_subelement(root_element) + self._create_seed_subelement(root_element) + self._create_survival_biasing_subelement(root_element) + self._create_cutoff_subelement(root_element) + self._create_entropy_subelement(root_element) + self._create_trigger_subelement(root_element) + self._create_no_reduce_subelement(root_element) + self._create_threads_subelement(root_element) + self._create_verbosity_subelement(root_element) + self._create_tabular_legendre_subelements(root_element) + self._create_temperature_subelements(root_element) + self._create_trace_subelement(root_element) + self._create_track_subelement(root_element) + self._create_ufs_subelement(root_element) + self._create_dd_subelement(root_element) + self._create_resonance_scattering_subelement(root_element) + self._create_volume_calcs_subelement(root_element) + self._create_create_fission_neutrons_subelement(root_element) # Clean the indentation in the file to be user-readable - clean_xml_indentation(self._settings_file) + clean_xml_indentation(root_element) # Write the XML Tree to the settings.xml file - tree = ET.ElementTree(self._settings_file) + tree = ET.ElementTree(root_element) tree.write(path, xml_declaration=True, encoding='utf-8', method="xml") diff --git a/openmc/surface.py b/openmc/surface.py index c88c4ccc7c..da8524a4eb 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -8,7 +8,7 @@ from six import add_metaclass, string_types import numpy as np from openmc.checkvalue import check_type, check_value, check_greater_than -from openmc.region import Region, Intersection +from openmc.region import Region, Intersection, Union # A static variable for auto-generated Surface IDs @@ -1736,6 +1736,18 @@ class Halfspace(Region): self.surface = surface self.side = side + def __and__(self, other): + if isinstance(other, Intersection): + return Intersection(self, *other.nodes) + else: + return Intersection(self, other) + + def __or__(self, other): + if isinstance(other, Union): + return Union(self, *other.nodes) + else: + return Union(self, other) + def __invert__(self): return -self.surface if self.side == '+' else +self.surface diff --git a/openmc/tallies.py b/openmc/tallies.py index a9a1390dfa..af57a1ffd8 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -1015,7 +1015,7 @@ class Tally(object): return merged_tally - def get_tally_xml(self): + def to_xml_element(self): """Return XML representation of the tally Returns @@ -3307,7 +3307,6 @@ class Tallies(cv.CheckedList): def __init__(self, tallies=None): super(Tallies, self).__init__(Tally, 'tallies collection') - self._tallies_file = ET.Element("tallies") if tallies is not None: self += tallies @@ -3459,25 +3458,23 @@ class Tallies(cv.CheckedList): "removed in a future version. Meshes do not need to be " "managed explicitly.", DeprecationWarning) - def _create_tally_subelements(self): + def _create_tally_subelements(self, root_element): for tally in self: - xml_element = tally.get_tally_xml() - self._tallies_file.append(xml_element) + root_element.append(tally.to_xml_element()) - def _create_mesh_subelements(self): + def _create_mesh_subelements(self, root_element): already_written = set() for tally in self: for f in tally.filters: if isinstance(f, openmc.MeshFilter): if f.mesh not in already_written: if len(f.mesh.name) > 0: - self._tallies_file.append(ET.Comment(f.mesh.name)) + root_element.append(ET.Comment(f.mesh.name)) - xml_element = f.mesh.get_mesh_xml() - self._tallies_file.append(xml_element) + root_element.append(f.mesh.to_xml_element()) already_written.add(f.mesh) - def _create_derivative_subelements(self): + def _create_derivative_subelements(self, root_element): # Get a list of all derivatives referenced in a tally. derivs = [] for tally in self: @@ -3487,24 +3484,22 @@ class Tallies(cv.CheckedList): # Add the derivatives to the XML tree. for d in derivs: - self._tallies_file.append(d.to_xml_element()) + root_element.append(d.to_xml_element()) def export_to_xml(self): """Create a tallies.xml file that can be used for a simulation. """ - # Reset xml element tree - self._tallies_file.clear() - - self._create_mesh_subelements() - self._create_tally_subelements() - self._create_derivative_subelements() + root_element = ET.Element("tallies") + self._create_mesh_subelements(root_element) + self._create_tally_subelements(root_element) + self._create_derivative_subelements(root_element) # Clean the indentation in the file to be user-readable - clean_xml_indentation(self._tallies_file) + clean_xml_indentation(root_element) # Write the XML Tree to the tallies.xml file - tree = ET.ElementTree(self._tallies_file) + tree = ET.ElementTree(root_element) tree.write("tallies.xml", xml_declaration=True, encoding='utf-8', method="xml") diff --git a/openmc/universe.py b/openmc/universe.py index b2e7dbb920..b66a20cfe4 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -10,10 +10,6 @@ import openmc import openmc.checkvalue as cv -# A dictionary for storing IDs of cell elements that have already been written, -# used to optimize the writing process -WRITTEN_IDS = {} - # A static variable for auto-generated Lattice (Universe) IDs AUTO_UNIVERSE_ID = 10000 @@ -453,17 +449,15 @@ class Universe(object): return universes def create_xml_subelement(self, xml_element): - # Iterate over all Cells for cell_id, cell in self._cells.items(): + path = "./cell[@id='{}']".format(cell_id) # If the cell was not already written, write it - if cell_id not in WRITTEN_IDS: - WRITTEN_IDS[cell_id] = None - + if xml_element.find(path) is None: # Create XML subelement for this Cell - cell_subelement = cell.create_xml_subelement(xml_element) + cell_element = cell.create_xml_subelement(xml_element) # Append the Universe ID to the subelement and add to Element - cell_subelement.set("universe", str(self._id)) - xml_element.append(cell_subelement) + cell_element.set("universe", str(self._id)) + xml_element.append(cell_element) diff --git a/src/input_xml.F90 b/src/input_xml.F90 index dd8be29ea9..cdb9c253fb 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -814,13 +814,6 @@ contains call statepoint_batch % add(temp_int_array(i)) end do deallocate(temp_int_array) - elseif (check_for_node(node_sp, "interval")) then - ! User gave an interval for writing state points - call get_node_value(node_sp, "interval", temp_int) - n_state_points = n_batches / temp_int - do i = 1, n_state_points - call statepoint_batch % add(temp_int * i) - end do else ! If neither were specified, write state point at last batch n_state_points = 1 @@ -854,13 +847,6 @@ contains call sourcepoint_batch % add(temp_int_array(i)) end do deallocate(temp_int_array) - elseif (check_for_node(node_sp, "interval")) then - ! User gave an interval for writing source points - call get_node_value(node_sp, "interval", temp_int) - n_source_points = n_batches / temp_int - do i = 1, n_source_points - call sourcepoint_batch % add(temp_int * i) - end do else ! If neither were specified, write source points with state points n_source_points = n_state_points diff --git a/tests/test_asymmetric_lattice/inputs_true.dat b/tests/test_asymmetric_lattice/inputs_true.dat index 7e48dcf430..ada4f8f052 100644 --- a/tests/test_asymmetric_lattice/inputs_true.dat +++ b/tests/test_asymmetric_lattice/inputs_true.dat @@ -1 +1,225 @@ -6bcc9cca24d42995bdff9bf9aca5e852c2dbca5cfb42a12ac637def9cf5cac227654182fc9cf9e17d07cf2e9af11fea832e3ae0eb7001cc09856f73d219664f9 \ No newline at end of file + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 3 3 3 4 3 3 4 3 3 4 3 3 3 3 3 +3 3 3 4 3 3 3 3 3 3 3 3 3 4 3 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 4 3 3 4 3 3 4 3 3 4 3 3 4 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 4 3 3 4 3 3 4 3 3 4 3 3 4 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 4 3 3 4 3 3 4 3 3 4 3 3 4 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 3 4 3 3 3 3 3 3 3 3 3 4 3 3 3 +3 3 3 3 3 4 3 3 4 3 3 4 3 3 3 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 + + + 21.42 21.42 + 3 3 + -32.13 -32.13 + +8 7 7 +8 8 8 +7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -32 -32 0 32 32 32 + + + + + + + + nu-fission + + diff --git a/tests/test_asymmetric_lattice/test_asymmetric_lattice.py b/tests/test_asymmetric_lattice/test_asymmetric_lattice.py index c7d76aab3f..45d392ad07 100644 --- a/tests/test_asymmetric_lattice/test_asymmetric_lattice.py +++ b/tests/test_asymmetric_lattice/test_asymmetric_lattice.py @@ -69,7 +69,6 @@ class AsymmetricLatticeTestHarness(PyAPITestHarness): source = openmc.Source(space=openmc.stats.Box([-32, -32, 0], [32, 32, 32])) source.space.only_fissionable = True self._input_set.settings.source = source - self._input_set.settings.output = {'summary': True} # Write input XML files self._input_set.export() @@ -107,11 +106,6 @@ class AsymmetricLatticeTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(AsymmetricLatticeTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - if __name__ == '__main__': harness = AsymmetricLatticeTestHarness('statepoint.10.h5', True) diff --git a/tests/test_create_fission_neutrons/inputs_true.dat b/tests/test_create_fission_neutrons/inputs_true.dat index d2093f8dce..ad2e47f9b3 100644 --- a/tests/test_create_fission_neutrons/inputs_true.dat +++ b/tests/test_create_fission_neutrons/inputs_true.dat @@ -1 +1,38 @@ -2feaef10cd32d90d89bf3f1c10cddcb7b1c2daaf739dfe13427c3453168cef0d9f57d272bab24d4493bdcae6f97e2afdf636f5b966a7a93d1d16edb6728cc2eb \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + + + + -1 -1 -1 1 1 1 + + + + false + + + + + flux + + diff --git a/tests/test_create_fission_neutrons/test_create_fission_neutrons.py b/tests/test_create_fission_neutrons/test_create_fission_neutrons.py index 80da831cc0..4434502d67 100755 --- a/tests/test_create_fission_neutrons/test_create_fission_neutrons.py +++ b/tests/test_create_fission_neutrons/test_create_fission_neutrons.py @@ -62,18 +62,12 @@ class CreateFissionNeutronsTestHarness(PyAPITestHarness): # Write out tally data. outstr = '' t = sp.get_tally() - outstr += 'tally {0}:\n'.format(t.id) - outstr += 'sum = {0:12.6E}\n'.format(t.sum[0, 0, 0]) - outstr += 'sum_sq = {0:12.6E}\n'.format(t.sum_sq[0, 0, 0]) + outstr += 'tally {}:\n'.format(t.id) + outstr += 'sum = {:12.6E}\n'.format(t.sum[0, 0, 0]) + outstr += 'sum_sq = {:12.6E}\n'.format(t.sum_sq[0, 0, 0]) return outstr - def _cleanup(self): - super(CreateFissionNeutronsTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): - os.remove(f) - if __name__ == '__main__': harness = CreateFissionNeutronsTestHarness('statepoint.10.h5', True) diff --git a/tests/test_diff_tally/inputs_true.dat b/tests/test_diff_tally/inputs_true.dat index 9a67475791..0010c6d97f 100644 --- a/tests/test_diff_tally/inputs_true.dat +++ b/tests/test_diff_tally/inputs_true.dat @@ -1 +1,439 @@ -df5a0ee7d353fe25344496058cea42e3244a7ab32c13c34c03b4b2f6adf88579f08a71ec0d22d8d264e50e3663717068ff54308e2d16aed8e085c222a8c2fdbd \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 +1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 +1 1 1 1 1 1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7 7 7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 3 + 0 + + + + -160 -160 -183 160 160 183 + + + True + + + + + + flux + 1 + + + + flux + 2 + + + + flux + 3 + + + + flux + 4 + + + + flux + 5 + + + + total U235 + total absorption scatter fission nu-fission + 1 + + + + total U235 + total absorption scatter fission nu-fission + 2 + + + + total U235 + total absorption scatter fission nu-fission + 3 + + + + total U235 + total absorption scatter fission nu-fission + 4 + + + + total U235 + total absorption scatter fission nu-fission + 5 + + + + absorption + analog + 1 + + + + absorption + analog + 2 + + + + absorption + analog + 3 + + + + absorption + analog + 4 + + + + absorption + analog + 5 + + + + + total U235 + nu-fission scatter + 1 + + + + + total U235 + nu-fission scatter + 2 + + + + + U235 + nu-fission scatter + 3 + + + + + U235 + nu-fission scatter + 4 + + + + + U235 + nu-fission scatter + 5 + + + + + + + diff --git a/tests/test_diff_tally/test_diff_tally.py b/tests/test_diff_tally/test_diff_tally.py index 36287a66ac..84aa181568 100644 --- a/tests/test_diff_tally/test_diff_tally.py +++ b/tests/test_diff_tally/test_diff_tally.py @@ -129,11 +129,6 @@ class DiffTallyTestHarness(PyAPITestHarness): 'std. dev.') return df.to_csv(None, columns=cols, index=False, float_format='%.7e') - def _cleanup(self): - super(DiffTallyTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - if __name__ == '__main__': harness = DiffTallyTestHarness('statepoint.3.h5', True) diff --git a/tests/test_distribmat/inputs_true.dat b/tests/test_distribmat/inputs_true.dat index d21da2f894..d9b32ca841 100644 --- a/tests/test_distribmat/inputs_true.dat +++ b/tests/test_distribmat/inputs_true.dat @@ -1 +1,66 @@ -6ae54c198e7659503d297e40be746a5bd72b35909fceed4b3ef357876b781946c0ea5021342556ef21f4034fa9e42b2c6014077c0efd3459dc063e6da4b12b59 \ No newline at end of file + + + + + + + + 2.0 2.0 + 1 + 2 2 + -2.0 -2.0 + +11 11 +11 11 + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000 + 5 + 0 + + + + -1 -1 -1 1 1 1 + + + + true + + + + + + 0 0 0 + 7 7 + 400 400 + + + 0 0 0 + 7 7 + 400 400 + + diff --git a/tests/test_energy_cutoff/inputs_true.dat b/tests/test_energy_cutoff/inputs_true.dat index ed7b3acfce..eafb2e3895 100644 --- a/tests/test_energy_cutoff/inputs_true.dat +++ b/tests/test_energy_cutoff/inputs_true.dat @@ -1 +1,40 @@ -3c242912caf520c09de59edc2911d886fe77041577c1ab6a57985527f5b9e34d79d74c1fefff13d83462909d37d2318626cc14dcc717ce42f32420a799bd5c58 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + 100 + 10 + + + + -1 -1 -1 1 1 1 + + + + + 4.0 + + + + + + + flux + + diff --git a/tests/test_energy_cutoff/test_energy_cutoff.py b/tests/test_energy_cutoff/test_energy_cutoff.py index 1bcdd0ea33..064e5c4d32 100755 --- a/tests/test_energy_cutoff/test_energy_cutoff.py +++ b/tests/test_energy_cutoff/test_energy_cutoff.py @@ -66,18 +66,12 @@ class EnergyCutoffTestHarness(PyAPITestHarness): # Write out tally data. outstr = '' t = sp.get_tally() - outstr += 'tally {0}:\n'.format(t.id) - outstr += 'sum = {0:12.6E}\n'.format(t.sum[0, 0, 0]) - outstr += 'sum_sq = {0:12.6E}\n'.format(t.sum_sq[0, 0, 0]) + outstr += 'tally {}:\n'.format(t.id) + outstr += 'sum = {:12.6E}\n'.format(t.sum[0, 0, 0]) + outstr += 'sum_sq = {:12.6E}\n'.format(t.sum_sq[0, 0, 0]) return outstr - def _cleanup(self): - super(EnergyCutoffTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): - os.remove(f) - if __name__ == '__main__': harness = EnergyCutoffTestHarness('statepoint.10.h5', True) diff --git a/tests/test_filter_energyfun/inputs_true.dat b/tests/test_filter_energyfun/inputs_true.dat index c9961071ae..df627fa049 100644 --- a/tests/test_filter_energyfun/inputs_true.dat +++ b/tests/test_filter_energyfun/inputs_true.dat @@ -1 +1,323 @@ -2a08e03d9e0f40486fa26ba00800d264f43906a38c851da48f0fd76bacc0b862e8f45f16c970b7c62db03d96e3acb1b58e74179f554a851ccaaf4492e97fc163 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 +1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 +1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 3 3 3 4 3 3 4 3 3 4 3 3 3 3 3 +3 3 3 4 3 3 3 3 3 3 3 3 3 4 3 3 3 +3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +3 3 4 3 3 4 3 3 4 3 3 4 3 3 4 3 3 +3 3 3 3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 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -160 -160 -183 160 160 183 + + + + + + + Am241 + (n,gamma) + + + + Am241 + (n,gamma) + + diff --git a/tests/test_filter_energyfun/test_filter_energyfun.py b/tests/test_filter_energyfun/test_filter_energyfun.py index b7fa68fa4d..fd36e320c4 100644 --- a/tests/test_filter_energyfun/test_filter_energyfun.py +++ b/tests/test_filter_energyfun/test_filter_energyfun.py @@ -53,11 +53,6 @@ class FilterEnergyFunHarness(PyAPITestHarness): # Output the tally in a Pandas DataFrame. return br_tally.get_pandas_dataframe().to_string() + '\n' - def _cleanup(self): - super(FilterEnergyFunHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - if __name__ == '__main__': harness = FilterEnergyFunHarness('statepoint.10.h5', True) diff --git a/tests/test_filter_mesh/inputs_true.dat b/tests/test_filter_mesh/inputs_true.dat index d98e2f6f78..9f1951b56b 100644 --- a/tests/test_filter_mesh/inputs_true.dat +++ b/tests/test_filter_mesh/inputs_true.dat @@ -1 +1,355 @@ -c0882d16048d434219d32ed7b875615e00142b55ab78be5b51e0195e23cb534a3aa5a8e9c212f0bfff96c452177315deb1264421d688438814560b4131c88930 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.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7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -160 -160 -183 160 160 183 + + + + true + + + + + + 17 + -182.07 + 182.07 + + + 17 17 + -182.07 -182.07 + 182.07 182.07 + + + 17 17 17 + -182.07 -182.07 -183.0 + 182.07 182.07 183.0 + + + + total + + + + current + + + + total + + + + current + + + + total + + + + current + + diff --git a/tests/test_filter_mesh/test_filter_mesh.py b/tests/test_filter_mesh/test_filter_mesh.py index cb4beb2f80..a37f5cfe5b 100644 --- a/tests/test_filter_mesh/test_filter_mesh.py +++ b/tests/test_filter_mesh/test_filter_mesh.py @@ -77,12 +77,7 @@ class FilterMeshTestHarness(HashedPyAPITestHarness): self._input_set.tallies = tallies_file super(FilterMeshTestHarness, self)._build_inputs() - def _cleanup(self): - super(FilterMeshTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - if __name__ == '__main__': - harness = FilterMeshTestHarness('statepoint.10.*', True) + harness = FilterMeshTestHarness('statepoint.10.h5', True) harness.main() diff --git a/tests/test_iso_in_lab/inputs_true.dat b/tests/test_iso_in_lab/inputs_true.dat index 454f891cd6..6b4b14c2c4 100644 --- a/tests/test_iso_in_lab/inputs_true.dat +++ b/tests/test_iso_in_lab/inputs_true.dat @@ -1 +1,310 @@ -57d1ece4aa9633e5fc6d2fce9f7bba444d02046e0cdadc6e53efdf591b6e50fd0e5a14b956b7ad10710b4535b10354899e2ffc783fd78de5ccd09a061cb5678d \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +1 1 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 7 7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -160 -160 -183 160 160 183 + + + diff --git a/tests/test_mg_basic/inputs_true.dat b/tests/test_mg_basic/inputs_true.dat index 6834e8e64c..182e5f46d3 100644 --- a/tests/test_mg_basic/inputs_true.dat +++ b/tests/test_mg_basic/inputs_true.dat @@ -1 +1,98 @@ -12abd69924751d1cf2a296ce799bfb2a6a4e744ffc49eef5a5cee8b764254caa3783c406cff71238c5608b454f451953479fb4caad45460a013225ab8de2271e \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ../1d_mgxs.h5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + 0.0 0.0 0.0 10.0 10.0 5.0 + + + multi-group + diff --git a/tests/test_mg_max_order/inputs_true.dat b/tests/test_mg_max_order/inputs_true.dat index ddb555692e..857e95bf55 100644 --- a/tests/test_mg_max_order/inputs_true.dat +++ b/tests/test_mg_max_order/inputs_true.dat @@ -1 +1,45 @@ -1f82e622b36562a0a14536fe24c95ee9c901c428f7f082f245afae5c699ccd647aaf31a49790822ceb7ec136bdb75f8e25c3677642f73702ca2e30b058f6b440 \ No newline at end of file + + + + + + + + + + + + + + + + + ../1d_mgxs.h5 + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + 0.0 0.0 0.0 10.0 10.0 5.0 + + + multi-group + 1 + diff --git a/tests/test_mg_nuclide/inputs_true.dat b/tests/test_mg_nuclide/inputs_true.dat index 95f65c29e0..829b908ffa 100644 --- a/tests/test_mg_nuclide/inputs_true.dat +++ b/tests/test_mg_nuclide/inputs_true.dat @@ -1 +1,98 @@ -ec7f0697d22668dcc4cdaf134c58b9f84137730d52cb44264ee9205369abcf995b2f66847d620715cd609bd2f5f865294374978f8fb89f182962e40801171cba \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ../1d_mgxs.h5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + 0.0 0.0 0.0 10.0 10.0 5.0 + + + multi-group + diff --git a/tests/test_mg_tallies/inputs_true.dat b/tests/test_mg_tallies/inputs_true.dat index 1663d02d53..56d97a394c 100644 --- a/tests/test_mg_tallies/inputs_true.dat +++ b/tests/test_mg_tallies/inputs_true.dat @@ -1 +1,180 @@ -8f9b2d1ba196fc0ad2e70647fb8691c5fc06b64b78f17414149a7fadfe63dd7e431830f73cb239e9c84f01e88896bf3f3d3cad1f57645bd63936dcc7db67e8a9 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ../1d_mgxs.h5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + 0.0 0.0 0.0 10.0 10.0 5.0 + + + multi-group + + + + + 1 1 10 + 0.0 0.0 0.0 + 10 10 5 + + + + total absorption flux fission nu-fission + analog + + + + total absorption flux fission nu-fission + tracklength + + + + + total absorption flux fission nu-fission scatter nu-scatter + analog + + + + + total absorption flux fission nu-fission + collision + + + + + total absorption flux fission nu-fission + tracklength + + + + + + scatter nu-scatter nu-fission + + + + uo2_ang uo2_ang_mu uo2_iso uo2_iso_mu clad_ang clad_ang_mu clad_iso clad_iso_mu lwtr_ang lwtr_ang_mu lwtr_iso lwtr_iso_mu + total absorption fission nu-fission + analog + + + + uo2_ang uo2_ang_mu uo2_iso uo2_iso_mu clad_ang clad_ang_mu clad_iso clad_iso_mu lwtr_ang lwtr_ang_mu lwtr_iso lwtr_iso_mu + total absorption fission nu-fission + tracklength + + + + + uo2_ang uo2_ang_mu uo2_iso uo2_iso_mu clad_ang clad_ang_mu clad_iso clad_iso_mu lwtr_ang lwtr_ang_mu lwtr_iso lwtr_iso_mu + total absorption fission nu-fission scatter nu-scatter + analog + + + + + uo2_ang uo2_ang_mu uo2_iso uo2_iso_mu clad_ang clad_ang_mu clad_iso clad_iso_mu lwtr_ang lwtr_ang_mu lwtr_iso lwtr_iso_mu + total absorption fission nu-fission + collision + + + + + uo2_ang uo2_ang_mu uo2_iso uo2_iso_mu clad_ang clad_ang_mu clad_iso clad_iso_mu lwtr_ang lwtr_ang_mu lwtr_iso lwtr_iso_mu + total absorption fission nu-fission + tracklength + + + + + + uo2_ang uo2_ang_mu uo2_iso uo2_iso_mu clad_ang clad_ang_mu clad_iso clad_iso_mu lwtr_ang lwtr_ang_mu lwtr_iso lwtr_iso_mu + scatter nu-scatter nu-fission + + diff --git a/tests/test_mg_tallies/test_mg_tallies.py b/tests/test_mg_tallies/test_mg_tallies.py index 305b53808e..257accb603 100644 --- a/tests/test_mg_tallies/test_mg_tallies.py +++ b/tests/test_mg_tallies/test_mg_tallies.py @@ -82,12 +82,7 @@ class MGTalliesTestHarness(HashedPyAPITestHarness): self._input_set.export() - def _cleanup(self): - super(MGTalliesTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - if __name__ == '__main__': - harness = MGTalliesTestHarness('statepoint.10.*', True, mg=True) + harness = MGTalliesTestHarness('statepoint.10.h5', True, mg=True) harness.main() diff --git a/tests/test_mgxs_library_ce_to_mg/inputs_true.dat b/tests/test_mgxs_library_ce_to_mg/inputs_true.dat index a4592254f8..920dc4b5ef 100644 --- a/tests/test_mgxs_library_ce_to_mg/inputs_true.dat +++ b/tests/test_mgxs_library_ce_to_mg/inputs_true.dat @@ -1 +1,276 @@ -74f306b40647c6d7125af404234bbd6883ae88a446b00f828fcda9adc8bca5167b544b23d083c802e2c0630f7fcec9052e31bced490cc94b3e3193512359cb96 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -0.63 -0.63 -1 0.63 0.63 1 + + + + + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + diff --git a/tests/test_mgxs_library_condense/inputs_true.dat b/tests/test_mgxs_library_condense/inputs_true.dat index 6b3f5ab3a2..2c9e622f8d 100644 --- a/tests/test_mgxs_library_condense/inputs_true.dat +++ b/tests/test_mgxs_library_condense/inputs_true.dat @@ -1 +1,1167 @@ -4291b40470e7d59383c9e51c4178ca923b698cb1aaea16c1982fe3789ca980df10a65b84fb5021dacd4d290ebc232c2579f99b6c990fb6b8f28f67eef2aabcb2 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -0.63 -0.63 -1 0.63 0.63 1 + + + + + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + diff --git a/tests/test_mgxs_library_condense/test_mgxs_library_condense.py b/tests/test_mgxs_library_condense/test_mgxs_library_condense.py index 0adedac1c6..087e7a07b5 100644 --- a/tests/test_mgxs_library_condense/test_mgxs_library_condense.py +++ b/tests/test_mgxs_library_condense/test_mgxs_library_condense.py @@ -71,12 +71,6 @@ class MGXSTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(MGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - - if __name__ == '__main__': harness = MGXSTestHarness('statepoint.10.*', True) harness.main() diff --git a/tests/test_mgxs_library_distribcell/inputs_true.dat b/tests/test_mgxs_library_distribcell/inputs_true.dat index f00c2133da..682f598f72 100644 --- a/tests/test_mgxs_library_distribcell/inputs_true.dat +++ b/tests/test_mgxs_library_distribcell/inputs_true.dat @@ -1 +1,452 @@ -df187239f7481867cc09138709da90bc28eeb647b4bcbb08b894e7fdf6ff45510341b77e34754c2358f0e0665f8e552bb1eafed8c42cd2c50595b60366320ce4 \ No newline at end of file + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 10000 10000 10000 +10000 10000 10000 10001 10000 10000 10000 10000 10000 10000 10000 10000 10000 10001 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10001 10000 10000 10000 10000 10000 10000 10000 10000 10000 10001 10000 10000 10000 +10000 10000 10000 10000 10000 10001 10000 10000 10001 10000 10000 10001 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 +10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -10.71 -10.71 -1 10.71 10.71 1 + + + + + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + diff --git a/tests/test_mgxs_library_distribcell/test_mgxs_library_distribcell.py b/tests/test_mgxs_library_distribcell/test_mgxs_library_distribcell.py index cb64d9d76a..277e8583e3 100644 --- a/tests/test_mgxs_library_distribcell/test_mgxs_library_distribcell.py +++ b/tests/test_mgxs_library_distribcell/test_mgxs_library_distribcell.py @@ -72,12 +72,7 @@ class MGXSTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(MGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - if __name__ == '__main__': - harness = MGXSTestHarness('statepoint.10.*', True) + harness = MGXSTestHarness('statepoint.10.h5', True) harness.main() diff --git a/tests/test_mgxs_library_hdf5/inputs_true.dat b/tests/test_mgxs_library_hdf5/inputs_true.dat index 6b3f5ab3a2..2c9e622f8d 100644 --- a/tests/test_mgxs_library_hdf5/inputs_true.dat +++ b/tests/test_mgxs_library_hdf5/inputs_true.dat @@ -1 +1,1167 @@ -4291b40470e7d59383c9e51c4178ca923b698cb1aaea16c1982fe3789ca980df10a65b84fb5021dacd4d290ebc232c2579f99b6c990fb6b8f28f67eef2aabcb2 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -0.63 -0.63 -1 0.63 0.63 1 + + + + + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + diff --git a/tests/test_mgxs_library_mesh/inputs_true.dat b/tests/test_mgxs_library_mesh/inputs_true.dat index 70799f1474..675251ad55 100644 --- a/tests/test_mgxs_library_mesh/inputs_true.dat +++ b/tests/test_mgxs_library_mesh/inputs_true.dat @@ -1 +1,689 @@ -03d894a7995ac40f7971b17349b460f4b563cb1c94abaa7e7241e6f7edad7f0cb80d3f80829db14ea6b7d70d18197cb15e308047cd10f699d834178eeb6396be \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 +1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1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7 7 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -160 -160 -183 160 160 183 + + + + + + + 2 2 + -100.0 -100.0 + 100.0 100.0 + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + diff --git a/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py b/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py index f3f62d7f1e..7f67afd659 100644 --- a/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py +++ b/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py @@ -72,12 +72,7 @@ class MGXSTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(MGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - if __name__ == '__main__': - harness = MGXSTestHarness('statepoint.10.*', True) + harness = MGXSTestHarness('statepoint.10.h5', True) harness.main() diff --git a/tests/test_mgxs_library_no_nuclides/inputs_true.dat b/tests/test_mgxs_library_no_nuclides/inputs_true.dat index 6b3f5ab3a2..2c9e622f8d 100644 --- a/tests/test_mgxs_library_no_nuclides/inputs_true.dat +++ b/tests/test_mgxs_library_no_nuclides/inputs_true.dat @@ -1 +1,1167 @@ -4291b40470e7d59383c9e51c4178ca923b698cb1aaea16c1982fe3789ca980df10a65b84fb5021dacd4d290ebc232c2579f99b6c990fb6b8f28f67eef2aabcb2 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -0.63 -0.63 -1 0.63 0.63 1 + + + + + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + total + tracklength + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + scatter-1 + analog + + + + + total + flux + analog + + + + + total + total + analog + + + + + total + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + flux + tracklength + + + + + total + absorption + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + fission + tracklength + + + + + total + flux + tracklength + + + + + total + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + total + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + total + scatter + tracklength + + + + + total + flux + analog + + + + + total + nu-scatter + analog + + + + + total + flux + analog + + + + + + total + scatter-P3 + analog + + + + + total + flux + analog + + + + + + total + nu-scatter-P3 + analog + + + + + + total + nu-scatter + analog + + + + + + total + scatter + analog + + + + + total + flux + analog + + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + total + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + total + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + total + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + delayed-nu-fission + analog + + + + + total + nu-fission + tracklength + + + + + + total + delayed-nu-fission + tracklength + + + + + + total + delayed-nu-fission + analog + + + + + + total + decay-rate + analog + + + + + total + flux + analog + + + + + + + total + delayed-nu-fission + analog + + diff --git a/tests/test_mgxs_library_no_nuclides/test_mgxs_library_no_nuclides.py b/tests/test_mgxs_library_no_nuclides/test_mgxs_library_no_nuclides.py index a5f6d2ccb0..aaad7d32b2 100644 --- a/tests/test_mgxs_library_no_nuclides/test_mgxs_library_no_nuclides.py +++ b/tests/test_mgxs_library_no_nuclides/test_mgxs_library_no_nuclides.py @@ -67,12 +67,6 @@ class MGXSTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(MGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - - if __name__ == '__main__': - harness = MGXSTestHarness('statepoint.10.*', True) + harness = MGXSTestHarness('statepoint.10.h5', True) harness.main() diff --git a/tests/test_mgxs_library_nuclides/inputs_true.dat b/tests/test_mgxs_library_nuclides/inputs_true.dat index ed6f4d4432..05227ca8c6 100644 --- a/tests/test_mgxs_library_nuclides/inputs_true.dat +++ b/tests/test_mgxs_library_nuclides/inputs_true.dat @@ -1 +1,933 @@ -eed0190893105747f0146472dfea86ca58b9fc2e8d039961d9fef8f235f79da32215f9b59b840419e6b69c5a04544b4659f2634b63e3a76b6b0f8c75d05e416c \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -0.63 -0.63 -1 0.63 0.63 1 + + + + + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + total + tracklength + + + + + total + flux + analog + + + + + U234 U235 U238 O16 + total + analog + + + + + U234 U235 U238 O16 + scatter-1 + analog + + + + + total + flux + analog + + + + + U234 U235 U238 O16 + total + analog + + + + + U234 U235 U238 O16 + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + absorption + tracklength + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + absorption + tracklength + + + + + U234 U235 U238 O16 + fission + tracklength + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + fission + tracklength + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + scatter + tracklength + + + + + total + flux + analog + + + + + U234 U235 U238 O16 + nu-scatter + analog + + + + + total + flux + analog + + + + + + U234 U235 U238 O16 + scatter-P3 + analog + + + + + total + flux + analog + + + + + + U234 U235 U238 O16 + nu-scatter-P3 + analog + + + + + + U234 U235 U238 O16 + nu-scatter + analog + + + + + + U234 U235 U238 O16 + scatter + analog + + + + + total + flux + analog + + + + + + U234 U235 U238 O16 + nu-fission + analog + + + + + U234 U235 U238 O16 + nu-fission + analog + + + + + U234 U235 U238 O16 + nu-fission + analog + + + + + U234 U235 U238 O16 + prompt-nu-fission + analog + + + + + U234 U235 U238 O16 + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + U234 U235 U238 O16 + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + U234 U235 U238 O16 + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + total + tracklength + + + + + total + flux + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + total + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + scatter-1 + analog + + + + + total + flux + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + total + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + absorption + tracklength + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + absorption + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + fission + tracklength + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + fission + tracklength + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + scatter + tracklength + + + + + total + flux + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-scatter + analog + + + + + total + flux + analog + + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + scatter-P3 + analog + + + + + total + flux + analog + + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-scatter-P3 + analog + + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-scatter + analog + + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + scatter + analog + + + + + total + flux + analog + + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-fission + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-fission + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + nu-fission + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + prompt-nu-fission + analog + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + Zr90 Zr91 Zr92 Zr94 Zr96 + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + total + tracklength + + + + + total + flux + analog + + + + + H1 O16 B10 B11 + total + analog + + + + + H1 O16 B10 B11 + scatter-1 + analog + + + + + total + flux + analog + + + + + H1 O16 B10 B11 + total + analog + + + + + H1 O16 B10 B11 + nu-scatter-1 + analog + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + absorption + tracklength + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + absorption + tracklength + + + + + H1 O16 B10 B11 + fission + tracklength + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + fission + tracklength + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + nu-fission + tracklength + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + kappa-fission + tracklength + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + scatter + tracklength + + + + + total + flux + analog + + + + + H1 O16 B10 B11 + nu-scatter + analog + + + + + total + flux + analog + + + + + + H1 O16 B10 B11 + scatter-P3 + analog + + + + + total + flux + analog + + + + + + H1 O16 B10 B11 + nu-scatter-P3 + analog + + + + + + H1 O16 B10 B11 + nu-scatter + analog + + + + + + H1 O16 B10 B11 + scatter + analog + + + + + total + flux + analog + + + + + + H1 O16 B10 B11 + nu-fission + analog + + + + + H1 O16 B10 B11 + nu-fission + analog + + + + + H1 O16 B10 B11 + nu-fission + analog + + + + + H1 O16 B10 B11 + prompt-nu-fission + analog + + + + + H1 O16 B10 B11 + prompt-nu-fission + analog + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + inverse-velocity + tracklength + + + + + total + flux + tracklength + + + + + H1 O16 B10 B11 + prompt-nu-fission + tracklength + + + + + total + flux + analog + + + + + + H1 O16 B10 B11 + prompt-nu-fission + analog + + diff --git a/tests/test_mgxs_library_nuclides/test_mgxs_library_nuclides.py b/tests/test_mgxs_library_nuclides/test_mgxs_library_nuclides.py index b23a722b2d..83d0ba05e4 100644 --- a/tests/test_mgxs_library_nuclides/test_mgxs_library_nuclides.py +++ b/tests/test_mgxs_library_nuclides/test_mgxs_library_nuclides.py @@ -64,12 +64,6 @@ class MGXSTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(MGXSTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - - if __name__ == '__main__': - harness = MGXSTestHarness('statepoint.10.*', True) + harness = MGXSTestHarness('statepoint.10.h5', True) harness.main() diff --git a/tests/test_multipole/inputs_true.dat b/tests/test_multipole/inputs_true.dat index 3b2b43ec73..4b158b07c7 100644 --- a/tests/test_multipole/inputs_true.dat +++ b/tests/test_multipole/inputs_true.dat @@ -1 +1,65 @@ -2be927608035759f52a2ac88b2c84e28c06e0f7905187bfd4695fecd80f417e727d8879c52fe03253938f7aa0301061f72dce9b5ae46b8675049b5bc4d9525a0 \ No newline at end of file + + + + + + + + 2.0 2.0 + 1 + 2 2 + -2.0 -2.0 + +11 11 +11 11 + + + + + + + + + + + + + + + + + + + + + + + + 1000 + 5 + 0 + + + + -1 -1 -1 1 1 1 + + + + true + + True + 1000 + + + + + 0 0 0 + 7 7 + 400 400 + + + 0 0 0 + 7 7 + 400 400 + + diff --git a/tests/test_periodic/inputs_true.dat b/tests/test_periodic/inputs_true.dat index ed1bc7d1b4..764fec50db 100644 --- a/tests/test_periodic/inputs_true.dat +++ b/tests/test_periodic/inputs_true.dat @@ -1 +1,38 @@ -259ea7c22920ddea0bc076ee77d35e76f36d2c7043cb8d036b182a11fd7d0f6524e3cbd9c6b0bf4a1af905ebe10b765d3d43e43e899d3edbb601baf6fd172365 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000 + 4 + 0 + + + + -5.0 -5.0 -5.0 5.0 5.0 5.0 + + + diff --git a/tests/test_periodic/tallies.xml b/tests/test_periodic/tallies.xml deleted file mode 100644 index 595d7c0ddd..0000000000 --- a/tests/test_periodic/tallies.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - regular - -200. -1e50 - 200. 1e50 - 50 1 - - - collision - - fission - - diff --git a/tests/test_resonance_scattering/inputs_true.dat b/tests/test_resonance_scattering/inputs_true.dat index 2e12dcbd23..804c6c4f6f 100644 --- a/tests/test_resonance_scattering/inputs_true.dat +++ b/tests/test_resonance_scattering/inputs_true.dat @@ -1 +1,48 @@ -13dde9c81e70ffdbb94f2ef47b64a63d5af0557424748cd224104bc0e1ca3c1078c0c8968ff29953d61dd8ddd8f90905ab945470d296faba18a99bd9ad278af2 \ No newline at end of file + + + + + + + + + + + + + + + + + + + 1000 + 10 + 5 + + + + -4 -4 -4 4 4 4 + + + + + U238 + DBRC + 1.0 + 210.0 + + + U235 + WCM + 1.0 + 210.0 + + + Pu239 + ARES + 1.0 + 210.0 + + + diff --git a/tests/test_source/inputs_true.dat b/tests/test_source/inputs_true.dat index 01a8d4c486..727636c517 100644 --- a/tests/test_source/inputs_true.dat +++ b/tests/test_source/inputs_true.dat @@ -1 +1,55 @@ -d9298c0829bc671a41883023a12caee5cb17eb863f30898f48b60212f646ac8869bd55b66f4dd0157daa053b31b7e6f4f393ed98162952f243565b70a19c249f \ No newline at end of file + + + + + + + + + 294 + + + + + + + + 1000 + 10 + 5 + + + + + + -4.0 -1.0 3.0 0.2 0.3 0.5 + + + -2.0 0.0 2.0 0.2 0.3 0.2 + + + + + -1.0 0.0 1.0 0.5 0.25 0.25 + + + + + + + + -4.0 -4.0 -4.0 4.0 4.0 4.0 + + + + + + + 1.2 -2.3 0.781 + + + + 1.0 1.38949549437 1.93069772888 2.68269579528 3.72759372031 5.17947467923 7.19685673001 10.0 13.8949549437 19.3069772888 26.8269579528 37.2759372031 51.7947467923 71.9685673001 100.0 138.949549437 193.069772888 268.269579528 372.759372031 517.947467923 719.685673001 1000.0 1389.49549437 1930.69772888 2682.69579528 3727.59372031 5179.47467923 7196.85673001 10000.0 13894.9549437 19306.9772888 26826.9579528 37275.9372031 51794.7467923 71968.5673001 100000.0 138949.549437 193069.772888 268269.579528 372759.372031 517947.467923 719685.673001 1000000.0 1389495.49437 1930697.72888 2682695.79528 3727593.72031 5179474.67923 7196856.73001 10000000.0 0.0 2.90864392994e-08 5.80533561806e-08 8.67817193689e-08 1.15153477858e-07 1.43052046006e-07 1.70362782612e-07 1.96973462002e-07 2.22774735186e-07 2.47660579198e-07 2.71528732767e-07 2.9428111653e-07 3.15824236062e-07 3.36069566065e-07 3.54933914133e-07 3.72339762616e-07 3.88215587147e-07 4.02496150558e-07 4.15122770952e-07 4.26043562837e-07 4.35213650335e-07 4.42595351592e-07 4.48158333612e-07 4.5187973691e-07 4.53744269441e-07 4.53744269441e-07 4.5187973691e-07 4.48158333612e-07 4.42595351592e-07 4.35213650335e-07 4.26043562837e-07 4.15122770952e-07 4.02496150558e-07 3.88215587147e-07 3.72339762616e-07 3.54933914133e-07 3.36069566065e-07 3.15824236062e-07 2.9428111653e-07 2.71528732767e-07 2.47660579198e-07 2.22774735186e-07 1.96973462002e-07 1.70362782612e-07 1.43052046006e-07 1.15153477858e-07 8.67817193689e-08 5.80533561806e-08 2.90864392994e-08 5.55962111528e-23 + + + diff --git a/tests/test_sourcepoint_interval/geometry.xml b/tests/test_sourcepoint_interval/geometry.xml deleted file mode 100644 index bc56030e18..0000000000 --- a/tests/test_sourcepoint_interval/geometry.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/tests/test_sourcepoint_interval/materials.xml b/tests/test_sourcepoint_interval/materials.xml deleted file mode 100644 index 2472a74717..0000000000 --- a/tests/test_sourcepoint_interval/materials.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/tests/test_sourcepoint_interval/results_true.dat b/tests/test_sourcepoint_interval/results_true.dat deleted file mode 100644 index 6dd7a8a220..0000000000 --- a/tests/test_sourcepoint_interval/results_true.dat +++ /dev/null @@ -1,3 +0,0 @@ -k-combined: -0.000000E+00 0.000000E+00 -1.892327E+00 -3.385257E+00 6.702634E-01 diff --git a/tests/test_sourcepoint_interval/settings.xml b/tests/test_sourcepoint_interval/settings.xml deleted file mode 100644 index d0b8fa71d3..0000000000 --- a/tests/test_sourcepoint_interval/settings.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - 10 - 5 - 1000 - - - - - -4 -4 -4 4 4 4 - - - - diff --git a/tests/test_sourcepoint_interval/test_sourcepoint_interval.py b/tests/test_sourcepoint_interval/test_sourcepoint_interval.py deleted file mode 100644 index 5db0541344..0000000000 --- a/tests/test_sourcepoint_interval/test_sourcepoint_interval.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python - -import glob -import os -import sys -sys.path.insert(0, os.pardir) -from testing_harness import TestHarness -from openmc.statepoint import StatePoint - - -class SourcepointTestHarness(TestHarness): - def _test_output_created(self): - """Make sure statepoint.* files have been created.""" - statepoint = glob.glob(os.path.join(os.getcwd(), 'statepoint.*')) - assert len(statepoint) == 5, '5 statepoint files must exist.' - assert statepoint[0].endswith('h5'), \ - 'Statepoint file is not a HDF5 file.' - - def _get_results(self): - """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 = StatePoint(statepoint) - - # Get the eigenvalue information. - outstr = TestHarness._get_results(self) - - # Add the source information. - xyz = sp.source[0]['xyz'] - outstr += ' '.join(['{0:12.6E}'.format(x) for x in xyz]) - outstr += "\n" - - return outstr - - -if __name__ == '__main__': - harness = SourcepointTestHarness('statepoint.08.*') - harness.main() diff --git a/tests/test_statepoint_interval/geometry.xml b/tests/test_statepoint_interval/geometry.xml deleted file mode 100644 index bc56030e18..0000000000 --- a/tests/test_statepoint_interval/geometry.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/tests/test_statepoint_interval/materials.xml b/tests/test_statepoint_interval/materials.xml deleted file mode 100644 index 2472a74717..0000000000 --- a/tests/test_statepoint_interval/materials.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/tests/test_statepoint_interval/results_true.dat b/tests/test_statepoint_interval/results_true.dat deleted file mode 100644 index 7b2fbf37f5..0000000000 --- a/tests/test_statepoint_interval/results_true.dat +++ /dev/null @@ -1,2 +0,0 @@ -k-combined: -2.943619E-01 3.309635E-03 diff --git a/tests/test_statepoint_interval/settings.xml b/tests/test_statepoint_interval/settings.xml deleted file mode 100644 index 07608cf873..0000000000 --- a/tests/test_statepoint_interval/settings.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - 10 - 5 - 1000 - - - - - -4 -4 -4 4 4 4 - - - - diff --git a/tests/test_statepoint_interval/test_statepoint_interval.py b/tests/test_statepoint_interval/test_statepoint_interval.py deleted file mode 100644 index 004a830808..0000000000 --- a/tests/test_statepoint_interval/test_statepoint_interval.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -import os -import sys -sys.path.insert(0, os.pardir) -from testing_harness import TestHarness - - -class StatepointTestHarness(TestHarness): - def __init__(self): - super(StatepointTestHarness, self).__init__(None, False) - - def _test_output_created(self): - """Make sure statepoint files have been created.""" - sps = ('statepoint.02.*', 'statepoint.04.*', 'statepoint.06.*', - 'statepoint.08.*', 'statepoint.10.*') - for sp in sps: - self._sp_name = sp - TestHarness._test_output_created(self) - - -if __name__ == '__main__': - harness = StatepointTestHarness() - harness.main() diff --git a/tests/test_tallies/inputs_true.dat b/tests/test_tallies/inputs_true.dat index 3c5b58f80a..c349c3b94a 100644 --- a/tests/test_tallies/inputs_true.dat +++ b/tests/test_tallies/inputs_true.dat @@ -1 +1,476 @@ -c01691348435ace955eb9ba8c6771f4e62cef427d1ce935971683f87bdadb9f4695379d9d664511213e883b6588d341d8e6265a4e36676f40bdbf3be6cc39898 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 +1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 +1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 +1 1 1 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 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 400 + 5 + 0 + + + + -160 -160 -183 160 160 183 + + + + + + + 2 2 + -182.07 -182.07 + 182.07 182.07 + + + + flux + tracklength + + + + flux + analog + + + + + flux + tracklength + + + + total + + + + delayed-nu-fission + + + + total + + + + scatter + + + + + scatter nu-fission + + + + total + + + + scatter nu-scatter + + + + + scatter nu-scatter + + + + flux + tracklength + + + + flux + analog + + + + + flux + tracklength + + + + total + + + + absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable + tracklength + + + + absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable + analog + + + + absorption delayed-nu-fission events fission inverse-velocity kappa-fission (n,2n) (n,n1) (n,gamma) nu-fission scatter elastic total prompt-nu-fission fission-q-prompt fission-q-recoverable + collision + + + + flux + + + + flux-y5 + tracklength + + + + flux-y5 + analog + + + + flux-y5 + collision + + + + scatter scatter-1 scatter-2 scatter-3 scatter-4 nu-scatter nu-scatter-1 nu-scatter-2 nu-scatter-3 nu-scatter-4 + + + + scatter-p4 scatter-y4 nu-scatter-p4 nu-scatter-y3 + + + + total + + + + U235 total + total-y4 + tracklength + + + + U235 total + total-y4 + analog + + + + U235 total + total-y4 + collision + + + + all + total + tracklength + + + + all + total + collision + + + + all + total + tracklength + + + + U235 + total + tracklength + + diff --git a/tests/test_tallies/test_tallies.py b/tests/test_tallies/test_tallies.py index 55c9dfa016..2efea5d3a6 100644 --- a/tests/test_tallies/test_tallies.py +++ b/tests/test_tallies/test_tallies.py @@ -177,12 +177,7 @@ class TalliesTestHarness(PyAPITestHarness): def _get_results(self): return super(TalliesTestHarness, self)._get_results(hash_output=True) - def _cleanup(self): - super(TalliesTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) - if __name__ == '__main__': - harness = TalliesTestHarness('statepoint.5.*', True) + harness = TalliesTestHarness('statepoint.5.h5', True) harness.main() diff --git a/tests/test_tally_aggregation/inputs_true.dat b/tests/test_tally_aggregation/inputs_true.dat index 9511228d9a..23a35ad792 100644 --- a/tests/test_tally_aggregation/inputs_true.dat +++ b/tests/test_tally_aggregation/inputs_true.dat @@ -1 +1,322 @@ -2ca11b519f903c106940ca4095764a5decab2c474f76a13a0869a9527db7e5bb5733b53b18b4dbb2a5e0dd0ae58cf55017491dae94d41b8094c1140d9079beb8 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +1 1 1 1 1 1 1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+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -160 -160 -183 160 160 183 + + + + true + + + + + + + + U234 U235 U238 + nu-fission total + + diff --git a/tests/test_tally_aggregation/test_tally_aggregation.py b/tests/test_tally_aggregation/test_tally_aggregation.py index 6a6ee5e6be..012c2fb73e 100644 --- a/tests/test_tally_aggregation/test_tally_aggregation.py +++ b/tests/test_tally_aggregation/test_tally_aggregation.py @@ -76,10 +76,6 @@ class TallyAggregationTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(TallyAggregationTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) if __name__ == '__main__': harness = TallyAggregationTestHarness('statepoint.10.h5', True) diff --git a/tests/test_tally_arithmetic/inputs_true.dat b/tests/test_tally_arithmetic/inputs_true.dat index 8cf6c4ff5d..323b56e496 100644 --- a/tests/test_tally_arithmetic/inputs_true.dat +++ b/tests/test_tally_arithmetic/inputs_true.dat @@ -1 +1,334 @@ -530c54691a4f2df131627849dd58c5e6f331ede786c1ffff0b1126c4c0fe64929a15113699103a05f2c6178ec90be4a3d6fc12b80c32ec608ed4a59c965ef2e4 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 +1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2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7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -160 -160 -183 160 160 183 + + + + true + + + + + + 2 2 2 + -160.0 -160.0 -183.0 + 160.0 160.0 183.0 + + + + + + U234 U235 + nu-fission total + + + + + U238 U235 + total fission + + diff --git a/tests/test_tally_arithmetic/test_tally_arithmetic.py b/tests/test_tally_arithmetic/test_tally_arithmetic.py index d28db3e959..6f2d2a248a 100644 --- a/tests/test_tally_arithmetic/test_tally_arithmetic.py +++ b/tests/test_tally_arithmetic/test_tally_arithmetic.py @@ -93,10 +93,6 @@ class TallyArithmeticTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(TallyArithmeticTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) if __name__ == '__main__': harness = TallyArithmeticTestHarness('statepoint.10.h5', True) diff --git a/tests/test_tally_slice_merge/inputs_true.dat b/tests/test_tally_slice_merge/inputs_true.dat index 2e6daf4fac..8941737607 100644 --- a/tests/test_tally_slice_merge/inputs_true.dat +++ b/tests/test_tally_slice_merge/inputs_true.dat @@ -1 +1,340 @@ -8ce48c0217ed0e9a151a96307db9bf3b2d897f8f1d36bbc1f96e24cad914bd6eaa0510e70d9c54f222fb5178bfe515eaaa4aebd11cbcd3f6c757749fddee6e9d \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.26 1.26 + 17 17 + -10.71 -10.71 + +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 2 1 1 2 1 1 2 1 1 1 1 1 +1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 +1 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8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 +7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 +7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 +7 7 7 7 7 7 7 8 8 8 8 8 8 8 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 +7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 10 + 5 + + + + -160 -160 -183 160 160 183 + + + + + + + + 2 2 + -50.0 -50.0 + 50.0 50.0 + + + + + U235 U238 + fission nu-fission + tracklength + + + + + U235 U238 + fission nu-fission + tracklength + + + + + U235 U238 + fission nu-fission + tracklength + + diff --git a/tests/test_tally_slice_merge/test_tally_slice_merge.py b/tests/test_tally_slice_merge/test_tally_slice_merge.py index 7bb77fbb06..27b7046c51 100644 --- a/tests/test_tally_slice_merge/test_tally_slice_merge.py +++ b/tests/test_tally_slice_merge/test_tally_slice_merge.py @@ -176,10 +176,6 @@ class TallySliceMergeTestHarness(PyAPITestHarness): return outstr - def _cleanup(self): - super(TallySliceMergeTestHarness, self)._cleanup() - f = os.path.join(os.getcwd(), 'tallies.xml') - if os.path.exists(f): os.remove(f) if __name__ == '__main__': harness = TallySliceMergeTestHarness('statepoint.10.h5', True) diff --git a/tests/test_triso/inputs_true.dat b/tests/test_triso/inputs_true.dat index 0ca3943f42..424af7fd56 100644 --- a/tests/test_triso/inputs_true.dat +++ b/tests/test_triso/inputs_true.dat @@ -1 +1,449 @@ -3a356b5b6d0aaa3db8c601521e1837a6870c5e5f6d1068f4f3e9b896c0107517d99ff9676311221633169b4d79dc1c4076bff84130e6de16df7ace4da5481a60 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.333333333333 0.333333333333 0.333333333333 + 10029 + 3 3 3 + -0.5 -0.5 -0.5 + +10008 10009 10010 +10005 10006 10007 +10002 10003 10004 + +10017 10018 10019 +10014 10015 10016 +10011 10012 10013 + +10026 10027 10028 +10023 10024 10025 +10020 10021 10022 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + 5 + 0 + + + + 0.0 0.0 0.0 + + + + + + + + diff --git a/tests/test_volume_calc/inputs_true.dat b/tests/test_volume_calc/inputs_true.dat index ddfd497de4..af26cf8e7b 100644 --- a/tests/test_volume_calc/inputs_true.dat +++ b/tests/test_volume_calc/inputs_true.dat @@ -1 +1,60 @@ -382404d3061d2c847c87654ab12594ba3fbb7e3a82327da872b5fe2029018ef4d5d3376fceba5c2229ea6f85e1fb63650caf54baed3f3b0304137fde61a98d63 \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000 + 4 + 0 + + + + -1.0 -1.0 -5.0 1.0 1.0 5.0 + + + + cell + 1 2 3 + 100000 + -1.0 -1.0 -6.0 + 1.0 1.0 6.0 + + + material + 1 2 + 100000 + -1.0 -1.0 -6.0 + 1.0 1.0 6.0 + + + universe + 0 + 100000 + -1.0 -1.0 -6.0 + 1.0 1.0 6.0 + + diff --git a/tests/testing_harness.py b/tests/testing_harness.py index 150d124c8c..b833615c79 100644 --- a/tests/testing_harness.py +++ b/tests/testing_harness.py @@ -73,19 +73,19 @@ class TestHarness(object): def _test_output_created(self): """Make sure statepoint.* and tallies.out have been created.""" - statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name)) + statepoint = glob.glob(self._sp_name) assert len(statepoint) == 1, 'Either multiple or no statepoint files' \ ' exist.' assert statepoint[0].endswith('h5'), \ 'Statepoint file is not a HDF5 file.' if self._tallies: - assert os.path.exists(os.path.join(os.getcwd(), 'tallies.out')), \ + assert os.path.exists('tallies.out'), \ 'Tally output file does not exist.' 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] + statepoint = glob.glob(self._sp_name)[0] sp = openmc.StatePoint(statepoint) # Write out k-combined. @@ -133,11 +133,9 @@ class TestHarness(object): def _cleanup(self): """Delete statepoints, tally, and test files.""" - output = glob.glob(os.path.join(os.getcwd(), 'statepoint.*.h5')) - output.append(os.path.join(os.getcwd(), 'tallies.out')) - output.append(os.path.join(os.getcwd(), 'results_test.dat')) - output.append(os.path.join(os.getcwd(), 'summary.h5')) - output += glob.glob(os.path.join(os.getcwd(), 'volume_*.h5')) + output = glob.glob('statepoint.*.h5') + output += ['tallies.out', 'results_test.dat', 'summary.h5'] + output += glob.glob('volume_*.h5') for f in output: if os.path.exists(f): os.remove(f) @@ -157,7 +155,7 @@ class CMFDTestHarness(TestHarness): def _get_results(self): """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] + statepoint = glob.glob(self._sp_name)[0] sp = openmc.StatePoint(statepoint) # Write out the eigenvalue and tallies. @@ -206,7 +204,7 @@ class ParticleRestartTestHarness(TestHarness): def _test_output_created(self): """Make sure the restart file has been created.""" - particle = glob.glob(os.path.join(os.getcwd(), self._sp_name)) + particle = glob.glob(self._sp_name) assert len(particle) == 1, 'Either multiple or no particle restart ' \ 'files exist.' assert particle[0].endswith('h5'), \ @@ -215,7 +213,7 @@ class ParticleRestartTestHarness(TestHarness): def _get_results(self): """Digest info in the statepoint and return as a string.""" # Read the particle restart file. - particle = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0] + particle = glob.glob(self._sp_name)[0] p = openmc.Particle(particle) # Write out the properties. @@ -301,17 +299,10 @@ class PyAPITestHarness(TestHarness): def _get_inputs(self): """Return a hash digest of the input XML files.""" - xmls = ('geometry.xml', 'tallies.xml', 'materials.xml', 'settings.xml', - 'plots.xml') - xmls = [os.path.join(os.getcwd(), fname) for fname in xmls] - outstr = '\n'.join([open(fname).read() for fname in xmls - if os.path.exists(fname)]) - - sha512 = hashlib.sha512() - sha512.update(outstr.encode('utf-8')) - outstr = sha512.hexdigest() - - return outstr + xmls = ['geometry.xml', 'materials.xml', 'settings.xml', + 'tallies.xml', 'plots.xml'] + return ''.join([open(fname).read() for fname in xmls + if os.path.exists(fname)]) def _write_inputs(self, input_digest): """Write the digest of the input XMLs to an ASCII file.""" @@ -336,11 +327,8 @@ class PyAPITestHarness(TestHarness): def _cleanup(self): """Delete XMLs, statepoints, tally, and test files.""" super(PyAPITestHarness, self)._cleanup() - output = [os.path.join(os.getcwd(), 'materials.xml')] - output.append(os.path.join(os.getcwd(), 'geometry.xml')) - output.append(os.path.join(os.getcwd(), 'settings.xml')) - output.append(os.path.join(os.getcwd(), 'inputs_test.dat')) - output.append(os.path.join(os.getcwd(), 'summary.h5')) + output = ['materials.xml', 'geometry.xml', 'settings.xml', + 'tallies.xml', 'inputs_test.dat'] for f in output: if os.path.exists(f): os.remove(f)