From 55b52b7ef3c9415ce045712132bf31c2a013d8c8 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 21 Jun 2024 20:28:56 -0500 Subject: [PATCH] Release of version 0.15.0 (#3050) --- CMakeLists.txt | 4 +- docs/source/conf.py | 4 +- docs/source/io_formats/settings.rst | 4 +- docs/source/methods/random_ray.rst | 4 +- docs/source/releasenotes/0.15.0.rst | 262 ++++++++++++++++++ docs/source/releasenotes/index.rst | 1 + examples/lattice/hexagonal/build_xml.py | 5 +- examples/lattice/nested/build_xml.py | 5 +- examples/lattice/simple/build_xml.py | 5 +- examples/pincell/build_xml.py | 5 +- examples/pincell_multigroup/build_xml.py | 5 +- include/openmc/version.h.in | 2 +- openmc/__init__.py | 2 +- openmc/deplete/abc.py | 4 +- openmc/deplete/microxs.py | 2 +- openmc/lib/mesh.py | 4 +- openmc/mesh.py | 4 +- openmc/plotter.py | 2 +- openmc/region.py | 2 +- openmc/settings.py | 4 +- openmc/source.py | 6 +- openmc/stats/multivariate.py | 4 +- openmc/trigger.py | 2 +- .../filter_cellfrom/inputs_true.dat | 5 +- .../regression_tests/filter_cellfrom/test.py | 5 +- .../case-01/inputs_true.dat | 5 +- .../case-02/inputs_true.dat | 5 +- .../case-03/inputs_true.dat | 5 +- .../case-04/inputs_true.dat | 5 +- .../case-05/inputs_true.dat | 5 +- .../case-06/inputs_true.dat | 5 +- .../case-07/inputs_true.dat | 5 +- .../case-08/inputs_true.dat | 5 +- .../case-09/inputs_true.dat | 5 +- .../case-10/inputs_true.dat | 5 +- .../case-11/inputs_true.dat | 5 +- .../case-12/inputs_true.dat | 5 +- .../case-13/inputs_true.dat | 5 +- .../case-14/inputs_true.dat | 5 +- .../case-15/inputs_true.dat | 5 +- .../case-16/inputs_true.dat | 5 +- .../case-17/inputs_true.dat | 5 +- .../case-18/inputs_true.dat | 5 +- .../case-19/inputs_true.dat | 5 +- .../case-20/inputs_true.dat | 5 +- .../case-21/inputs_true.dat | 5 +- .../case-a01/inputs_true.dat | 5 +- .../case-d01/inputs_true.dat | 5 +- .../case-d02/inputs_true.dat | 5 +- .../case-d03/inputs_true.dat | 5 +- .../case-d04/inputs_true.dat | 5 +- .../case-d05/inputs_true.dat | 5 +- .../case-d06/inputs_true.dat | 5 +- .../case-d07/inputs_true.dat | 5 +- .../case-d08/inputs_true.dat | 5 +- .../case-e01/inputs_true.dat | 5 +- .../case-e02/inputs_true.dat | 5 +- .../case-e03/inputs_true.dat | 5 +- .../surface_source_write/test.py | 30 +- tests/unit_tests/test_tracks.py | 2 +- 60 files changed, 464 insertions(+), 85 deletions(-) create mode 100644 docs/source/releasenotes/0.15.0.rst diff --git a/CMakeLists.txt b/CMakeLists.txt index 98473e492c4..8a000c9b9e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,8 @@ project(openmc C CXX) # Set version numbers set(OPENMC_VERSION_MAJOR 0) -set(OPENMC_VERSION_MINOR 14) -set(OPENMC_VERSION_RELEASE 1) +set(OPENMC_VERSION_MINOR 15) +set(OPENMC_VERSION_RELEASE 0) set(OPENMC_VERSION ${OPENMC_VERSION_MAJOR}.${OPENMC_VERSION_MINOR}.${OPENMC_VERSION_RELEASE}) configure_file(include/openmc/version.h.in "${CMAKE_BINARY_DIR}/include/openmc/version.h" @ONLY) diff --git a/docs/source/conf.py b/docs/source/conf.py index 53d529f3dc0..19c04d98af3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,9 +69,9 @@ # built documents. # # The short X.Y version. -version = "0.14" +version = "0.15" # The full version, including alpha/beta/rc tags. -release = "0.14.1-dev" +release = "0.15.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/io_formats/settings.rst b/docs/source/io_formats/settings.rst index 915f698b60f..e395ada6826 100644 --- a/docs/source/io_formats/settings.rst +++ b/docs/source/io_formats/settings.rst @@ -284,9 +284,9 @@ then, OpenMC will only use up to the :math:`P_1` data. .. note:: This element is not used in the continuous-energy :ref:`energy_mode`. ------------------------- +-------------------------------- ```` Element ------------------------- +-------------------------------- The ```` element indicates the number of times a particle can split during a history. diff --git a/docs/source/methods/random_ray.rst b/docs/source/methods/random_ray.rst index e0fff792e04..427ba11489f 100644 --- a/docs/source/methods/random_ray.rst +++ b/docs/source/methods/random_ray.rst @@ -100,11 +100,11 @@ terms on the right hand side. .. math:: :label: transport - \begin{align*} + \begin{aligned} \mathbf{\Omega} \cdot \mathbf{\nabla} \psi(\mathbf{r},\mathbf{\Omega},E) & + \Sigma_t(\mathbf{r},E) \psi(\mathbf{r},\mathbf{\Omega},E) = \\ & \int_0^\infty d E^\prime \int_{4\pi} d \Omega^{\prime} \Sigma_s(\mathbf{r},\mathbf{\Omega}^\prime \rightarrow \mathbf{\Omega}, E^\prime \rightarrow E) \psi(\mathbf{r},\mathbf{\Omega}^\prime, E^\prime) \\ & + \frac{\chi(\mathbf{r}, E)}{4\pi k_{eff}} \int_0^\infty dE^\prime \nu \Sigma_f(\mathbf{r},E^\prime) \int_{4\pi}d \Omega^\prime \psi(\mathbf{r},\mathbf{\Omega}^\prime,E^\prime) - \end{align*} + \end{aligned} In Equation :eq:`transport`, :math:`\psi` is the angular neutron flux. This parameter represents the total distance traveled by all neutrons in a particular diff --git a/docs/source/releasenotes/0.15.0.rst b/docs/source/releasenotes/0.15.0.rst new file mode 100644 index 00000000000..069bfd78368 --- /dev/null +++ b/docs/source/releasenotes/0.15.0.rst @@ -0,0 +1,262 @@ +==================== +What's New in 0.15.0 +==================== + +.. currentmodule:: openmc + +------- +Summary +------- + +This release of OpenMC includes many bug fixes, performance improvements, and +several notable new features. The major highlight of this release is the +introduction of a new transport solver based on the random ray method, which is +fully described in the :ref:`user's guide `. Other notable additions +include a mesh-based source class (:class:`openmc.MeshSource`), a generalization +of source domain rejection through the notion of "constraints", and new methods +on mesh-based classes for computing material volume fractions and homogenized +materials. + +------------------------------------ +Compatibility Notes and Deprecations +------------------------------------ + +Previously, specifying domain rejection for a source was only possible on the +:class:`~openmc.IndependentSoure` class and worked by specifying a `domains` +argument. This capability has been generalized to all source classes and +expanded as well; specifying a domain to reject on should now be done with the +`constraints` argument as follows:: + + source = openmc.IndependentSource(..., constraints={'domains': [cell]}) + +The `domains` argument is deprecated and will be removed in a future version of +OpenMC. Similarly, the ``only_fissionable`` argument to +:class:`openmc.stats.Box` has been replaced by a `'fissionable'` constraint. +That is, instead of specifying:: + + space = openmc.stats.Box(lower_left, upper_right, only_fissionable=True) + source = openmc.IndependentSource(space=space) + +You should now provide the constraint as:: + + space = openmc.stats.Box(lower_left, upper_right) + source = openmc.IndependentSource(space=space, constraints={'fissionable': True}) + +The :attr:`openmc.Settings.max_splits` attribute was renamed to +``max_history_splits`` and its default value has been changed to 1e7 (`#2954 +`_). + +------------ +New Features +------------ + +- When running OpenMC in volume calculation mode, only atomic weight ratio data + is loaded from data files which reduces initialization time. (`#2741 + `_) +- Introduced a ``GeometryState`` class in C++ to better separate particle and + geometry data. (`#2744 `_)) +- A new :class:`openmc.MaterialFromFilter` class allows filtering tallies by + which material a particle came from. (`#2750 + `_) +- Implemented a :meth:`openmc.deplete.MicroXS.from_multigroup_flux` method that + generates microscopic cross sections for depletion from a predetermined + multigroup flux. (`#2755 `_) +- A new :class:`openmc.MeshSource` class enables the specification of a source + distribution over a mesh, where each mesh element has a different + energy/angle/time distribution. (`#2759 + `_) +- Improve performance of depletion solver by utilizing CSR sparse matrix + representation. (`#2764 `_, + `#2771 `_) +- Added a :meth:`openmc.CylindricalMesh.get_indices_at_coords` method that + provides the mesh element index corresponding to a given point in space. + (`#2782 `_) +- Added a `path` argument to the :meth:`openmc.deplete.Integrator.integrate` + method. (`#2784 `_) +- Added a :meth:`openmc.Geometry.get_all_nuclides` method. (`#2796 + `_) +- A new capability to compute material volume fractions over mesh elements was + added in the :meth:`openmc.lib.Mesh.material_volumes` method. (`#2802 + `_) +- A new transport solver was added based on the `random ray + `_ method. (`#2823 + `_, `#2988 + `_) +- Added a :attr:`openmc.lib.Material.depletable` attribute. (`#2843 + `_) +- Added a :meth:`openmc.lib.Mesh.get_plot_bins` method and corresponding + ``openmc_mesh_get_plot_bins`` C API function that can be utilized to generate + mesh tally visualizations in the plotter application. (`#2854 + `_) +- Introduced a :func:`openmc.read_source_file` function that enables reading a + source file from the Python API. (`#2858 + `_) +- Added a ``bounding_box`` property on the :class:`openmc.RectilinearMesh` and + :class:`openmc.UnstructuredMesh` classes. (`#2861 + `_) +- Added a ``openmc_mesh_get_volumes`` C API function. (`#2869 + `_) +- The :attr:`openmc.Settings.surf_source_write` dictionary now accepts `cell`, + `cellfrom`, or `cellto` keys that limit surface source sites to those entering + or leaving specific cells. (`#2888 + `_) +- Added a :meth:`openmc.Region.plot` method that allows regions to be plotted + directly. (`#2895 `_) +- Implemented "contains" operator for the :class:`openmc.BoundingBox` class. + (`#2906 `_) +- Generalized source rejection via a new ``constraints`` argument to all source + classes. (`#2916 `_) +- Added a new :class:`openmc.MeshBornFilter` class that filters tally events + based on which mesh element a particle was born in. (`#2925 + `_) +- The :class:`openmc.Trigger` class now has a ``ignore_zeros`` argument that + results in any bins with zero score to be ignored when checking the trigger. + (`#2928 `_) +- Introduced a :attr:`openmc.Settings.max_events` attribute that controls the + maximum number of events a particle can undergo. (`#2945 + `_) +- Added support for :class:`openmc.UnstructuredMesh` in the + :class:`openmc.MeshSource` class. (`#2949 + `_) +- Added a :meth:`openmc.MeshBase.get_homogenized_materials` method that computes + homogenized materials over mesh elements. (`#2971 + `_) +- Add an ``options`` argument to :class:`openmc.UnstructuredMesh` that allows + configuring underlying data structures in MOAB. (`#2976 + `_) +- Type hints were added to several classes in the :mod:`openmc.deplete` module. + (`#2866 `_) + +--------- +Bug Fixes +--------- + +- Fix unit conversion in openmc.deplete.Results.get_mass (`#2761 `_) +- Fix Lagrangian interpolation (`#2775 `_) +- Depletion restart with MPI (`#2778 `_) +- Modify depletion transfer rates test to be more robust (`#2779 `_) +- Call simulation_finalize if needed when finalizing OpenMC (`#2790 `_) +- F90_NONE Removal (MGMC tallying optimization) (`#2785 `_) +- Correctly apply volumes to materials when using DAGMC geometries (`#2787 `_) +- Add inline to openmc::interpolate (`#2789 `_) +- Use huge_tree=True in lxml parsing (`#2791 `_) +- OpenMPMutex "Copying" (`#2794 `_) +- Do not link against several transitive dependencies of HDF5 (`#2797 `_) +- Added check to length of input arguments for IndependantOperator (`#2799 `_) +- Pytest Update Documentation (`#2801 `_) +- Move 'import lxml' to third-party block of imports (`#2803 `_) +- Fix creation of meshes when from loading settings from XML (`#2805 `_) +- Avoid high memory use when writing unstructured mesh VTK files (`#2806 `_) +- Consolidating thread information into the openmp interface header (`#2809 `_) +- Prevent underflow in calculation of speed (`#2811 `_) +- Provide error message if a cell path can't be determined (`#2812 `_) +- Fix distribcell labels for lattices used as fill in multiple cells (`#2813 `_) +- Make creation of spatial trees based on usage for unstructured mesh. (`#2815 `_) +- Ensure particle direction is normalized for plotting / volume calculations (`#2816 `_) +- Added missing meshes to documentation (`#2820 `_) +- Reset timers at correct place in deplete (`#2821 `_) +- Fix config change not propagating through to decay energies (`#2825 `_) +- Ensure that implicit complement cells appear last in DAGMC universes (`#2838 `_) +- Export model.tallies to XML in CoupledOperator (`#2840 `_) +- Fix locating h5m files references in DAGMC universes (`#2842 `_) +- Prepare for NumPy 2.0 (`#2845 `_) +- Added missing functions and classes to openmc.lib docs (`#2847 `_) +- Fix compilation on CentOS 7 (missing link to libdl) (`#2849 `_) +- Adding resulting nuclide to cross section plot legend (`#2851 `_) +- Updating file extension for Excel files when exporting MGXS data (`#2852 `_) +- Removed error raising when calling warn (`#2853 `_) +- Setting ``surf_source_`` attribute for DAGMC surfaces. (`#2857 `_) +- Changing y axis label for heating plots (`#2859 `_) +- Removed unused step_index arg from restart (`#2867 `_) +- Fix issue with Cell::get_contained_cells() utility function (`#2873 `_) +- Adding energy axis units to plot xs (`#2876 `_) +- Set OpenMCOperator materials when diff_burnable_mats = True (`#2877 `_) +- Fix expansion filter merging (`#2882 `_) +- Added checks that tolerance value is between 0 and 1 (`#2884 `_) +- Statepoint file loading refactor and CAPI function (`#2886 `_) +- Added check for length of value passed into EnergyFilter (`#2887 `_) +- Ensure that Model.run() works when specifying a custom XML path (`#2889 `_) +- Updating docker file base to bookworm (`#2890 `_) +- Clarifying documentation for cones (`#2892 `_) +- Abort on cmake config if openmp requested but not found (`#2893 `_) +- Tiny updates from experience building on Mac (`#2894 `_) +- Added damage-energy as optional reaction for micro (`#2903 `_) +- docs: add missing max_splits in settings specification (`#2910 `_) +- Changed CI to use latest actions to get away from the Node 16 deprecation. (`#2912 `_) +- Mkdir to always allow parents and exist ok (`#2914 `_) +- Fixed small sphinx typo (`#2915 `_) +- Hexagonal lattice iterators (`#2921 `_) +- Fix Chain.form_matrix to work with scipy 1.12 (`#2922 `_) +- Allow get_microxs_and_flux to use OPENMC_CHAIN_FILE environment variable (`#2934 `_) +- Polygon fix to better handle colinear points (`#2935 `_) +- Fix CMFD to work with scipy 1.13 (`#2936 `_) +- Print warning if no natural isotopes when using add_element (`#2938 `_) +- Update xtl and xtensor submodules (`#2941 `_) +- Ensure two surfaces with different boundary type are not considered redundant (`#2942 `_) +- Updated package versions in Dockerfile (`#2946 `_) +- Add MPI calls to DAGMC external test (`#2948 `_) +- Eliminate deprecation warnings from scipy and pandas (`#2951 `_) +- Update math function unit test with catch2 (`#2955 `_) +- Support track file writing for particle restart runs. (`#2957 `_) +- Make UWUW optional (`#2965 `_) +- Allow pure decay IndependentOperator (`#2966 `_) +- Added fix to cfloat_endf for length 11 endf floats (`#2967 `_) +- Moved apt get to optional CI parts (`#2970 `_) +- Update bounding_box docstrings (`#2972 `_) +- Added extra error checking on spherical mesh creation (`#2973 `_) +- Update CODEOWNERS file (`#2974 `_) +- Added error checking on cylindrical mesh (`#2977 `_) +- Correction for histogram interpolation of Tabular distributions (`#2981 `_) +- Enforce lower_left in lattice geometry (`#2982 `_) +- Update random_dist.h comment to be less specific (`#2991 `_) +- Apply memoization in get_all_universes (`#2995 `_) +- Make sure skewed dataset is cast to bool properly (`#3001 `_) +- Hexagonal lattice roundtrip (`#3003 `_) +- Fix CylinderSector and IsogonalOctagon translations (`#3018 `_) +- Sets used instead of lists when membership testing (`#3021 `_) +- Fixing plot xs for when plotting element string reaction (`#3029 `_) +- Fix shannon entropy broken link (`#3034 `_) +- Only add png or h5 extension if not present in plots.py (`#3036 `_) +- Fix non-existent path causing segmentation fault when saving plot (`#3038 `_) +- Resolve warnings related to numpy 2.0 (`#3044 `_) +- Update IsogonalOctagon to use xz basis (`#3045 `_) +- Determine whether nuclides are fissionable in volume calc mode (`#3047 `_) +- Avoiding more numpy 2.0 deprecation warnings (`#3049 `_) +- Set DAGMC cell instances on surface crossing (`#3052 `_) + +------------ +Contributors +------------ + +- `Aidan Crilly `_ +- `April Novak `_ +- `Davide Mancusi `_ +- `Baptiste Mouginot `_ +- `Chris Wagner `_ +- `Lorenzo Chierici `_ +- `Catherine Yu `_ +- `Erik Knudsen `_ +- `Ethan Peterson `_ +- `Gavin Ridley `_ +- `hsameer481 `_ +- `Hunter Belanger `_ +- `Isaac Meyer `_ +- `Jin Whan Bae `_ +- `Joffrey Dorville `_ +- `John Tramm `_ +- `Yue Jin `_ +- `Sigfrid Stjärnholm `_ +- `Kimberly Meagher `_ +- `lhchg `_ +- `Luke Labrie-Cleary `_ +- `Micah Gale `_ +- `Nicholas Linden `_ +- `pitkajuh `_ +- `Rosie Barker `_ +- `Paul Romano `_ +- `Patrick Shriwise `_ +- `Jonathan Shimwell `_ +- `Travis Labossiere-Hickman `_ +- `Vanessa Lulla `_ +- `Olek Yardas `_ +- `Perry Young `_ diff --git a/docs/source/releasenotes/index.rst b/docs/source/releasenotes/index.rst index 6923101cc43..bde1205891e 100644 --- a/docs/source/releasenotes/index.rst +++ b/docs/source/releasenotes/index.rst @@ -7,6 +7,7 @@ Release Notes .. toctree:: :maxdepth: 1 + 0.15.0 0.14.0 0.13.3 0.13.2 diff --git a/examples/lattice/hexagonal/build_xml.py b/examples/lattice/hexagonal/build_xml.py index 96ff3f34a11..9485d0aa45f 100644 --- a/examples/lattice/hexagonal/build_xml.py +++ b/examples/lattice/hexagonal/build_xml.py @@ -114,8 +114,9 @@ # Create an initial uniform spatial source distribution over fissionable zones bounds = [-1, -1, -1, 1, 1, 1] -uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) -settings_file.source = openmc.IndependentSource(space=uniform_dist) +uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:]) +settings_file.source = openmc.IndependentSource( + space=uniform_dist, constraints={'fissionable': True}) settings_file.keff_trigger = {'type' : 'std_dev', 'threshold' : 5E-4} settings_file.trigger_active = True diff --git a/examples/lattice/nested/build_xml.py b/examples/lattice/nested/build_xml.py index 407a53a2327..2db23a46b33 100644 --- a/examples/lattice/nested/build_xml.py +++ b/examples/lattice/nested/build_xml.py @@ -124,8 +124,9 @@ # Create an initial uniform spatial source distribution over fissionable zones bounds = [-1, -1, -1, 1, 1, 1] -uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) -settings_file.source = openmc.IndependentSource(space=uniform_dist) +uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:]) +settings_file.source = openmc.IndependentSource( + space=uniform_dist, constraints={'fissionable': True}) settings_file.export_to_xml() diff --git a/examples/lattice/simple/build_xml.py b/examples/lattice/simple/build_xml.py index 0da8d8cf086..56c46612169 100644 --- a/examples/lattice/simple/build_xml.py +++ b/examples/lattice/simple/build_xml.py @@ -115,8 +115,9 @@ # Create an initial uniform spatial source distribution over fissionable zones bounds = [-1, -1, -1, 1, 1, 1] -uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) -settings_file.source = openmc.IndependentSource(space=uniform_dist) +uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:]) +settings_file.source = openmc.IndependentSource( + space=uniform_dist, constraints={'fissionable': True}) settings_file.trigger_active = True settings_file.trigger_max_batches = 100 diff --git a/examples/pincell/build_xml.py b/examples/pincell/build_xml.py index d008c882237..aed0c790f10 100644 --- a/examples/pincell/build_xml.py +++ b/examples/pincell/build_xml.py @@ -67,8 +67,9 @@ # Create an initial uniform spatial source distribution over fissionable zones lower_left = (-pitch/2, -pitch/2, -1) upper_right = (pitch/2, pitch/2, 1) -uniform_dist = openmc.stats.Box(lower_left, upper_right, only_fissionable=True) -settings.source = openmc.IndependentSource(space=uniform_dist) +uniform_dist = openmc.stats.Box(lower_left, upper_right) +settings.source = openmc.IndependentSource( + space=uniform_dist, constraints={'fissionable': True}) # For source convergence checks, add a mesh that can be used to calculate the # Shannon entropy diff --git a/examples/pincell_multigroup/build_xml.py b/examples/pincell_multigroup/build_xml.py index 019ae6a113f..0971e5de639 100644 --- a/examples/pincell_multigroup/build_xml.py +++ b/examples/pincell_multigroup/build_xml.py @@ -113,8 +113,9 @@ # Create an initial uniform spatial source distribution over fissionable zones lower_left = (-pitch/2, -pitch/2, -1) upper_right = (pitch/2, pitch/2, 1) -uniform_dist = openmc.stats.Box(lower_left, upper_right, only_fissionable=True) -settings.source = openmc.IndependentSource(space=uniform_dist) +uniform_dist = openmc.stats.Box(lower_left, upper_right) +settings.source = openmc.IndependentSource( + space=uniform_dist, constraints={'fissionable': True}) settings.export_to_xml() ############################################################################### diff --git a/include/openmc/version.h.in b/include/openmc/version.h.in index e1c2b0541a5..a518e0d63b0 100644 --- a/include/openmc/version.h.in +++ b/include/openmc/version.h.in @@ -10,7 +10,7 @@ namespace openmc { constexpr int VERSION_MAJOR {@OPENMC_VERSION_MAJOR@}; constexpr int VERSION_MINOR {@OPENMC_VERSION_MINOR@}; constexpr int VERSION_RELEASE {@OPENMC_VERSION_RELEASE@}; -constexpr bool VERSION_DEV {true}; +constexpr bool VERSION_DEV {false}; constexpr std::array VERSION {VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE}; // clang-format on diff --git a/openmc/__init__.py b/openmc/__init__.py index 17b0abe2f69..12a3c87d381 100644 --- a/openmc/__init__.py +++ b/openmc/__init__.py @@ -39,4 +39,4 @@ from openmc.model import Model -__version__ = '0.14.1-dev' +__version__ = '0.15.0' diff --git a/openmc/deplete/abc.py b/openmc/deplete/abc.py index 5d9b8a2403b..7bf7f1086a7 100644 --- a/openmc/deplete/abc.py +++ b/openmc/deplete/abc.py @@ -786,7 +786,7 @@ def integrate( path : PathLike Path to file to write. Defaults to 'depletion_results.h5'. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 """ with change_directory(self.operator.output_dir): n = self.operator.initial_condition() @@ -993,7 +993,7 @@ def integrate( path : PathLike Path to file to write. Defaults to 'depletion_results.h5'. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 """ with change_directory(self.operator.output_dir): n = self.operator.initial_condition() diff --git a/openmc/deplete/microxs.py b/openmc/deplete/microxs.py index 497a5284a1d..b2ae9f6c7f1 100644 --- a/openmc/deplete/microxs.py +++ b/openmc/deplete/microxs.py @@ -219,7 +219,7 @@ def from_multigroup_flux( sections available. MicroXS entry will be 0 if the nuclide cross section is not found. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Parameters ---------- diff --git a/openmc/lib/mesh.py b/openmc/lib/mesh.py index 4da7baba771..3546112b54d 100644 --- a/openmc/lib/mesh.py +++ b/openmc/lib/mesh.py @@ -174,7 +174,7 @@ def material_volumes( ) -> List[List[Tuple[Material, float]]]: """Determine volume of materials in each mesh element - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Parameters ---------- @@ -231,7 +231,7 @@ def get_plot_bins( ) -> np.ndarray: """Get mesh bin indices for a rasterized plot. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Parameters ---------- diff --git a/openmc/mesh.py b/openmc/mesh.py index 5456abd1aed..ee58ec3b8c3 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -157,7 +157,7 @@ def get_homogenized_materials( ) -> List[openmc.Material]: """Generate homogenized materials over each element in a mesh. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Parameters ---------- @@ -1487,6 +1487,8 @@ def get_indices_at_coords( ) -> Tuple[int, int, int]: """Finds the index of the mesh voxel at the specified x,y,z coordinates. + .. versionadded:: 0.15.0 + Parameters ---------- coords : Sequence[float] diff --git a/openmc/plotter.py b/openmc/plotter.py index 8a9a331d804..8b205b79d8b 100644 --- a/openmc/plotter.py +++ b/openmc/plotter.py @@ -169,7 +169,7 @@ def plot_xs(reactions, divisor_types=None, temperature=294., axis=None, energy_axis_units : {'eV', 'keV', 'MeV'} Units used on the plot energy axis - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Returns ------- diff --git a/openmc/region.py b/openmc/region.py index f679129c1fc..e509b152805 100644 --- a/openmc/region.py +++ b/openmc/region.py @@ -344,7 +344,7 @@ def rotate(self, rotation, pivot=(0., 0., 0.), order='xyz', inplace=False, def plot(self, *args, **kwargs): """Display a slice plot of the region. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Parameters ---------- diff --git a/openmc/settings.py b/openmc/settings.py index 80d766ab149..fae6f638364 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -113,7 +113,7 @@ class Settings: max_particle_events : int Maximum number of allowed particle events per source particle. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 max_order : None or int Maximum scattering order to apply globally when in multi-group mode. max_history_splits : int @@ -158,7 +158,7 @@ class Settings: Starting ray distribution (must be uniform in space and angle) as specified by a :class:`openmc.SourceBase` object. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 resonance_scattering : dict Settings for resonance elastic scattering. Accepted keys are 'enable' (bool), 'method' (str), 'energy_min' (float), 'energy_max' (float), and diff --git a/openmc/source.py b/openmc/source.py index 91318f8e9ad..51ed74de3c6 100644 --- a/openmc/source.py +++ b/openmc/source.py @@ -264,7 +264,7 @@ class IndependentSource(SourceBase): Domains to reject based on, i.e., if a sampled spatial location is not within one of these domains, it will be rejected. - .. deprecated:: 0.14.1 + .. deprecated:: 0.15.0 Use the `constraints` argument instead. constraints : dict Constraints on sampled source particles. Valid keys include 'domains', @@ -482,7 +482,7 @@ class MeshSource(SourceBase): strength of the mesh source as a whole is the sum of all source strengths applied to the elements. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Parameters ---------- @@ -1049,7 +1049,7 @@ def write_source_file( def read_source_file(filename: PathLike) -> typing.List[SourceParticle]: """Read a source file and return a list of source particles. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Parameters ---------- diff --git a/openmc/stats/multivariate.py b/openmc/stats/multivariate.py index 212083c3cff..ce9740ad212 100644 --- a/openmc/stats/multivariate.py +++ b/openmc/stats/multivariate.py @@ -769,7 +769,7 @@ class Box(Spatial): Whether spatial sites should only be accepted if they occur in fissionable materials - .. deprecated:: 0.14.1 + .. deprecated:: 0.15.0 Use the `constraints` argument when defining a source object instead. Attributes @@ -782,7 +782,7 @@ class Box(Spatial): Whether spatial sites should only be accepted if they occur in fissionable materials - .. deprecated:: 0.14.1 + .. deprecated:: 0.15.0 Use the `constraints` argument when defining a source object instead. """ diff --git a/openmc/trigger.py b/openmc/trigger.py index 79f5ea5af89..be2537e3ac8 100644 --- a/openmc/trigger.py +++ b/openmc/trigger.py @@ -22,7 +22,7 @@ class Trigger(EqualityMixin): can cause the trigger to fire prematurely if there are zero scores in any bin at the first evaluation. - .. versionadded:: 0.14.1 + .. versionadded:: 0.15.0 Attributes ---------- diff --git a/tests/regression_tests/filter_cellfrom/inputs_true.dat b/tests/regression_tests/filter_cellfrom/inputs_true.dat index 8a37e8286f0..b85f63c6e18 100644 --- a/tests/regression_tests/filter_cellfrom/inputs_true.dat +++ b/tests/regression_tests/filter_cellfrom/inputs_true.dat @@ -49,9 +49,12 @@ 15 5 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 1 diff --git a/tests/regression_tests/filter_cellfrom/test.py b/tests/regression_tests/filter_cellfrom/test.py index 8fb7509cbe8..5559b4c8171 100644 --- a/tests/regression_tests/filter_cellfrom/test.py +++ b/tests/regression_tests/filter_cellfrom/test.py @@ -142,8 +142,9 @@ def model(): core_radius, core_height / 2.0, ] - distribution = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) - model.settings.source = openmc.IndependentSource(space=distribution) + distribution = openmc.stats.Box(bounds[:3], bounds[3:]) + model.settings.source = openmc.IndependentSource( + space=distribution, constraints={'fissionable': True}) # ============================================================================= # Tallies diff --git a/tests/regression_tests/surface_source_write/case-01/inputs_true.dat b/tests/regression_tests/surface_source_write/case-01/inputs_true.dat index ecca3a9f86c..7368debd5f7 100644 --- a/tests/regression_tests/surface_source_write/case-01/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-01/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-02/inputs_true.dat b/tests/regression_tests/surface_source_write/case-02/inputs_true.dat index 8be841ad6d7..12f15499f20 100644 --- a/tests/regression_tests/surface_source_write/case-02/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-02/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 8 diff --git a/tests/regression_tests/surface_source_write/case-03/inputs_true.dat b/tests/regression_tests/surface_source_write/case-03/inputs_true.dat index 38faa2a7844..cd0f7deda59 100644 --- a/tests/regression_tests/surface_source_write/case-03/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-03/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-04/inputs_true.dat b/tests/regression_tests/surface_source_write/case-04/inputs_true.dat index 99a5a289929..ac3c03e37e0 100644 --- a/tests/regression_tests/surface_source_write/case-04/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-04/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-05/inputs_true.dat b/tests/regression_tests/surface_source_write/case-05/inputs_true.dat index 49eedb7cfb8..143e8520074 100644 --- a/tests/regression_tests/surface_source_write/case-05/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-05/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-06/inputs_true.dat b/tests/regression_tests/surface_source_write/case-06/inputs_true.dat index cdb9726d65f..f2dc7ea35d6 100644 --- a/tests/regression_tests/surface_source_write/case-06/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-06/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-07/inputs_true.dat b/tests/regression_tests/surface_source_write/case-07/inputs_true.dat index ff73358ca89..a6107d16faa 100644 --- a/tests/regression_tests/surface_source_write/case-07/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-07/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-08/inputs_true.dat b/tests/regression_tests/surface_source_write/case-08/inputs_true.dat index 8bda9795d39..b87e2b2076d 100644 --- a/tests/regression_tests/surface_source_write/case-08/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-08/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-09/inputs_true.dat b/tests/regression_tests/surface_source_write/case-09/inputs_true.dat index 4e893fffa82..f4f6ebd87cf 100644 --- a/tests/regression_tests/surface_source_write/case-09/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-09/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-10/inputs_true.dat b/tests/regression_tests/surface_source_write/case-10/inputs_true.dat index 2d8f1ce6450..372e5c0116f 100644 --- a/tests/regression_tests/surface_source_write/case-10/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-10/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-11/inputs_true.dat b/tests/regression_tests/surface_source_write/case-11/inputs_true.dat index 307dec54789..d5401dc873f 100644 --- a/tests/regression_tests/surface_source_write/case-11/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-11/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-12/inputs_true.dat b/tests/regression_tests/surface_source_write/case-12/inputs_true.dat index 087024695b6..cb8f877416c 100644 --- a/tests/regression_tests/surface_source_write/case-12/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-12/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-13/inputs_true.dat b/tests/regression_tests/surface_source_write/case-13/inputs_true.dat index a3421298b94..23bbf0455eb 100644 --- a/tests/regression_tests/surface_source_write/case-13/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-13/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-14/inputs_true.dat b/tests/regression_tests/surface_source_write/case-14/inputs_true.dat index b4c141b5d53..29acd94f250 100644 --- a/tests/regression_tests/surface_source_write/case-14/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-14/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-15/inputs_true.dat b/tests/regression_tests/surface_source_write/case-15/inputs_true.dat index 9244d839d13..c775f2f5276 100644 --- a/tests/regression_tests/surface_source_write/case-15/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-15/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-16/inputs_true.dat b/tests/regression_tests/surface_source_write/case-16/inputs_true.dat index b3139928aa6..969a8f31ea8 100644 --- a/tests/regression_tests/surface_source_write/case-16/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-16/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-17/inputs_true.dat b/tests/regression_tests/surface_source_write/case-17/inputs_true.dat index 8fcb01e4502..0a65db51008 100644 --- a/tests/regression_tests/surface_source_write/case-17/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-17/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-18/inputs_true.dat b/tests/regression_tests/surface_source_write/case-18/inputs_true.dat index 80d6253a16c..89df27b475b 100644 --- a/tests/regression_tests/surface_source_write/case-18/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-18/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-19/inputs_true.dat b/tests/regression_tests/surface_source_write/case-19/inputs_true.dat index 5355675fec2..3ea7dbffe38 100644 --- a/tests/regression_tests/surface_source_write/case-19/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-19/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-20/inputs_true.dat b/tests/regression_tests/surface_source_write/case-20/inputs_true.dat index 44f0d72c732..c3c768a3da9 100644 --- a/tests/regression_tests/surface_source_write/case-20/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-20/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 diff --git a/tests/regression_tests/surface_source_write/case-21/inputs_true.dat b/tests/regression_tests/surface_source_write/case-21/inputs_true.dat index 893b8b5b975..5dae8374d27 100644 --- a/tests/regression_tests/surface_source_write/case-21/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-21/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 diff --git a/tests/regression_tests/surface_source_write/case-a01/inputs_true.dat b/tests/regression_tests/surface_source_write/case-a01/inputs_true.dat index a65c9f770eb..5cec1b76f73 100644 --- a/tests/regression_tests/surface_source_write/case-a01/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-a01/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 1 2 3 diff --git a/tests/regression_tests/surface_source_write/case-d01/inputs_true.dat b/tests/regression_tests/surface_source_write/case-d01/inputs_true.dat index b6157ba9b50..b5452080c23 100644 --- a/tests/regression_tests/surface_source_write/case-d01/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-d01/inputs_true.dat @@ -21,9 +21,12 @@ 5 1 - + -4 -4 -20 4 4 20 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-d02/inputs_true.dat b/tests/regression_tests/surface_source_write/case-d02/inputs_true.dat index 6877634f12c..d6ca4143c62 100644 --- a/tests/regression_tests/surface_source_write/case-d02/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-d02/inputs_true.dat @@ -21,9 +21,12 @@ 5 1 - + -4 -4 -20 4 4 20 + + true + 1 diff --git a/tests/regression_tests/surface_source_write/case-d03/inputs_true.dat b/tests/regression_tests/surface_source_write/case-d03/inputs_true.dat index ddcde89e4d4..ba326c978fc 100644 --- a/tests/regression_tests/surface_source_write/case-d03/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-d03/inputs_true.dat @@ -21,9 +21,12 @@ 5 1 - + -4 -4 -20 4 4 20 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-d04/inputs_true.dat b/tests/regression_tests/surface_source_write/case-d04/inputs_true.dat index 7695ecc7970..c309dd1552b 100644 --- a/tests/regression_tests/surface_source_write/case-d04/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-d04/inputs_true.dat @@ -21,9 +21,12 @@ 5 1 - + -4 -4 -20 4 4 20 + + true + 1 diff --git a/tests/regression_tests/surface_source_write/case-d05/inputs_true.dat b/tests/regression_tests/surface_source_write/case-d05/inputs_true.dat index 865633fbb8c..c49703f831a 100644 --- a/tests/regression_tests/surface_source_write/case-d05/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-d05/inputs_true.dat @@ -21,9 +21,12 @@ 5 1 - + -4 -4 -20 4 4 20 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-d06/inputs_true.dat b/tests/regression_tests/surface_source_write/case-d06/inputs_true.dat index 4226707369d..48db2c30dd2 100644 --- a/tests/regression_tests/surface_source_write/case-d06/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-d06/inputs_true.dat @@ -21,9 +21,12 @@ 5 1 - + -4 -4 -20 4 4 20 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-d07/inputs_true.dat b/tests/regression_tests/surface_source_write/case-d07/inputs_true.dat index 77498b64db3..e2897125b40 100644 --- a/tests/regression_tests/surface_source_write/case-d07/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-d07/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -4 -4 -20 4 4 20 + + true + 101 102 103 104 105 106 diff --git a/tests/regression_tests/surface_source_write/case-d08/inputs_true.dat b/tests/regression_tests/surface_source_write/case-d08/inputs_true.dat index 561a3833736..185b8629b90 100644 --- a/tests/regression_tests/surface_source_write/case-d08/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-d08/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -4 -4 -20 4 4 20 + + true + 101 102 103 104 105 106 diff --git a/tests/regression_tests/surface_source_write/case-e01/inputs_true.dat b/tests/regression_tests/surface_source_write/case-e01/inputs_true.dat index 99a5a289929..ac3c03e37e0 100644 --- a/tests/regression_tests/surface_source_write/case-e01/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-e01/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/case-e02/inputs_true.dat b/tests/regression_tests/surface_source_write/case-e02/inputs_true.dat index ff73358ca89..a6107d16faa 100644 --- a/tests/regression_tests/surface_source_write/case-e02/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-e02/inputs_true.dat @@ -42,9 +42,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 300 diff --git a/tests/regression_tests/surface_source_write/case-e03/inputs_true.dat b/tests/regression_tests/surface_source_write/case-e03/inputs_true.dat index a3421298b94..23bbf0455eb 100644 --- a/tests/regression_tests/surface_source_write/case-e03/inputs_true.dat +++ b/tests/regression_tests/surface_source_write/case-e03/inputs_true.dat @@ -35,9 +35,12 @@ 5 1 - + -2.0 -2.0 -2.0 2.0 2.0 2.0 + + true + 4 5 6 7 8 9 diff --git a/tests/regression_tests/surface_source_write/test.py b/tests/regression_tests/surface_source_write/test.py index f949d808503..38581736ec4 100644 --- a/tests/regression_tests/surface_source_write/test.py +++ b/tests/regression_tests/surface_source_write/test.py @@ -277,8 +277,9 @@ def model_1(): core_radius, core_height / 2.0, ] - distribution = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) - model.settings.source = openmc.IndependentSource(space=distribution) + distribution = openmc.stats.Box(bounds[:3], bounds[3:]) + model.settings.source = openmc.IndependentSource( + space=distribution, constraints={'fissionable': True}) return model @@ -379,8 +380,9 @@ def model_2(): core_radius, core_height / 2.0, ] - distribution = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) - model.settings.source = openmc.IndependentSource(space=distribution) + distribution = openmc.stats.Box(bounds[:3], bounds[3:]) + model.settings.source = openmc.IndependentSource( + space=distribution, constraints={'fissionable': True}) return model @@ -481,8 +483,9 @@ def model_3(): core_radius, core_height / 2.0, ] - distribution = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) - model.settings.source = openmc.IndependentSource(space=distribution) + distribution = openmc.stats.Box(bounds[:3], bounds[3:]) + model.settings.source = openmc.IndependentSource( + space=distribution, constraints={'fissionable': True}) return model @@ -594,8 +597,9 @@ def model_4(): core_radius, core_height / 2.0, ] - distribution = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True) - model.settings.source = openmc.IndependentSource(space=distribution) + distribution = openmc.stats.Box(bounds[:3], bounds[3:]) + model.settings.source = openmc.IndependentSource( + space=distribution, constraints={'fissionable': True}) return model @@ -935,8 +939,9 @@ def model_dagmc_1(): model.settings.inactive = 1 model.settings.seed = 1 - source_box = openmc.stats.Box([-4, -4, -20], [4, 4, 20], only_fissionable=True) - model.settings.source = openmc.IndependentSource(space=source_box) + source_box = openmc.stats.Box([-4, -4, -20], [4, 4, 20]) + model.settings.source = openmc.IndependentSource( + space=source_box, constraints={'fissionable': True}) return model @@ -1069,8 +1074,9 @@ def model_dagmc_2(): model.settings.inactive = 1 model.settings.seed = 1 - source_box = openmc.stats.Box([-4, -4, -20], [4, 4, 20], only_fissionable=True) - model.settings.source = openmc.IndependentSource(space=source_box) + source_box = openmc.stats.Box([-4, -4, -20], [4, 4, 20]) + model.settings.source = openmc.IndependentSource( + space=source_box, constraints={'fissionable': True}) return model diff --git a/tests/unit_tests/test_tracks.py b/tests/unit_tests/test_tracks.py index 3951a72c63c..fa866415984 100644 --- a/tests/unit_tests/test_tracks.py +++ b/tests/unit_tests/test_tracks.py @@ -168,7 +168,7 @@ def test_restart_track(run_in_tmpdir, sphere_model): # generate lost particle files with pytest.raises(RuntimeError, match='Maximum number of lost particles has been reached.'): - sphere_model.run(output=False) + sphere_model.run(output=False, threads=1) lost_particle_files = list(Path.cwd().glob('particle_*.h5')) assert len(lost_particle_files) > 0