diff --git a/tests/regression_tests/conftest.py b/tests/regression_tests/conftest.py index 00ef247dc..b4a764476 100644 --- a/tests/regression_tests/conftest.py +++ b/tests/regression_tests/conftest.py @@ -1,7 +1,15 @@ +import numpy as np import openmc +from pkg_resources import parse_version import pytest +@pytest.fixture(scope='module', autouse=True) +def numpy_version_requirement(): + assert parse_version(np.__version__) >= parse_version("1.14"), \ + "Regression tests require NumPy 1.14 or greater" + + @pytest.fixture(scope='module', autouse=True) def setup_regression_test(request): # Reset autogenerated IDs assigned to OpenMC objects diff --git a/tests/regression_tests/filter_energyfun/results_true.dat b/tests/regression_tests/filter_energyfun/results_true.dat index 110038edf..8e5577c43 100644 --- a/tests/regression_tests/filter_energyfun/results_true.dat +++ b/tests/regression_tests/filter_energyfun/results_true.dat @@ -1,2 +1,2 @@ energyfunction nuclide score mean std. dev. -0 02180f5f310ee4 Am241 ((n,gamma) / (n,gamma)) 1.00e-01 9.97e-03 +0 d2effa26cb3cf2 Am241 ((n,gamma) / (n,gamma)) 1.00e-01 9.97e-03 diff --git a/tests/regression_tests/mgxs_library_histogram/inputs_true.dat b/tests/regression_tests/mgxs_library_histogram/inputs_true.dat index 799f4796d..d1bd197a7 100644 --- a/tests/regression_tests/mgxs_library_histogram/inputs_true.dat +++ b/tests/regression_tests/mgxs_library_histogram/inputs_true.dat @@ -60,7 +60,7 @@ 0.0 0.625 20000000.0 - -1.0 -0.818181818182 -0.636363636364 -0.454545454545 -0.272727272727 -0.0909090909091 0.0909090909091 0.272727272727 0.454545454545 0.636363636364 0.818181818182 1.0 + -1.0 -0.8181818181818181 -0.6363636363636364 -0.4545454545454546 -0.2727272727272727 -0.09090909090909083 0.09090909090909083 0.2727272727272727 0.4545454545454546 0.6363636363636365 0.8181818181818183 1.0 2 diff --git a/tests/regression_tests/multipole/results_true.dat b/tests/regression_tests/multipole/results_true.dat index d734e67bd..19c34229f 100644 --- a/tests/regression_tests/multipole/results_true.dat +++ b/tests/regression_tests/multipole/results_true.dat @@ -37,5 +37,5 @@ Cell Fill = Material 2 Region = -1 Rotation = None - Temperature = [ 500. 700. 0. 800.] + Temperature = [500. 700. 0. 800.] Translation = None diff --git a/tests/regression_tests/source/inputs_true.dat b/tests/regression_tests/source/inputs_true.dat index 6dd913edc..860a36bc8 100644 --- a/tests/regression_tests/source/inputs_true.dat +++ b/tests/regression_tests/source/inputs_true.dat @@ -48,7 +48,7 @@ - 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 + 1.0 1.3894954943731377 1.93069772888325 2.6826957952797255 3.72759372031494 5.17947467923121 7.196856730011519 10.0 13.894954943731374 19.306977288832496 26.826957952797247 37.2759372031494 51.7947467923121 71.96856730011518 100.0 138.94954943731375 193.06977288832496 268.26957952797244 372.7593720314938 517.9474679231207 719.6856730011514 1000.0 1389.4954943731375 1930.6977288832495 2682.6957952797247 3727.593720314938 5179.474679231207 7196.856730011514 10000.0 13894.95494373136 19306.977288832495 26826.95795279722 37275.93720314938 51794.74679231213 71968.56730011514 100000.0 138949.5494373136 193069.77288832495 268269.5795279722 372759.3720314938 517947.4679231202 719685.6730011514 1000000.0 1389495.494373136 1930697.7288832497 2682695.7952797217 3727593.720314938 5179474.679231202 7196856.730011513 10000000.0 0.0 2.9086439299358713e-08 5.80533561806147e-08 8.67817193689187e-08 1.1515347785771536e-07 1.4305204600565115e-07 1.7036278261198208e-07 1.9697346200185813e-07 2.227747351856934e-07 2.4766057919761985e-07 2.715287327665956e-07 2.9428111652990295e-07 3.1582423606228735e-07 3.360695660646056e-07 3.549339141332686e-07 3.723397626156721e-07 3.882155871468592e-07 4.024961505584776e-07 4.151227709522976e-07 4.260435628367196e-07 4.3521365033538783e-07 4.4259535159179273e-07 4.4815833361210174e-07 4.5187973690993757e-07 4.5374426944091084e-07 4.5374426944091084e-07 4.5187973690993757e-07 4.4815833361210174e-07 4.4259535159179273e-07 4.352136503353879e-07 4.2604356283671966e-07 4.1512277095229767e-07 4.0249615055847764e-07 3.8821558714685926e-07 3.723397626156722e-07 3.5493391413326864e-07 3.360695660646057e-07 3.158242360622874e-07 2.942811165299031e-07 2.715287327665957e-07 2.4766057919762e-07 2.2277473518569352e-07 1.9697346200185819e-07 1.7036278261198226e-07 1.4305204600565126e-07 1.1515347785771556e-07 8.678171936891881e-08 5.805335618061493e-08 2.9086439299358858e-08 5.559621115282002e-23 diff --git a/tests/regression_tests/surface_tally/inputs_true.dat b/tests/regression_tests/surface_tally/inputs_true.dat index fc10110ee..96639a076 100644 --- a/tests/regression_tests/surface_tally/inputs_true.dat +++ b/tests/regression_tests/surface_tally/inputs_true.dat @@ -48,10 +48,10 @@ 0.0 4000000.0 20000000.0 - 0.0 0.785398163397 3.14159265359 + 0.0 0.7853981633974483 3.141592653589793 - 0.0 0.785398163397 3.14159265359 + 0.0 0.7853981633974483 3.141592653589793 1 diff --git a/tests/regression_tests/tally_aggregation/results_true.dat b/tests/regression_tests/tally_aggregation/results_true.dat index 0f0a3d60a..3caeceec9 100644 --- a/tests/regression_tests/tally_aggregation/results_true.dat +++ b/tests/regression_tests/tally_aggregation/results_true.dat @@ -1 +1 @@ -8294c7481b3433a4beb25541ae72c1ea915def0c0d0f393f7585371877187f4a2a25e70bb602232e2bc1e877e78db0e9384591e5c71575659f95abb10fae0af3 \ No newline at end of file +c8fb043c5321e698040544dbb0baa9ce82df0e189738fb6013b4f3ff7e05a989a7a59b9b55034b8c9de6bc604ba9f969dc08ad2752fc74da205c19ff5974c9a2 \ No newline at end of file diff --git a/tests/regression_tests/tally_arithmetic/results_true.dat b/tests/regression_tests/tally_arithmetic/results_true.dat index ef2741cc1..6302095d0 100644 --- a/tests/regression_tests/tally_arithmetic/results_true.dat +++ b/tests/regression_tests/tally_arithmetic/results_true.dat @@ -1,134 +1,139 @@ -[[[ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.]] +[[[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - [[ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - [[ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.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[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - [[ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - [[ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]]][[[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - ..., - [[ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - [[ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - [[ 0. 0. 0. 0.] - [ 0. 0. 0. 0.] - [ 0. 0. 0. 0.]]][[[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + ... - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] - ..., - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]]][[[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]]][[[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + ... - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] - ..., - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]] + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]]][[[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] - [[ 0. 0. 0.] - [ 0. 0. 0.] - [ 0. 0. 0.]]] \ No newline at end of file + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] + + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] + + ... + + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] + + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]] + + [[0. 0. 0.] + [0. 0. 0.] + [0. 0. 0.]]] \ No newline at end of file diff --git a/tests/regression_tests/test_reference.h5 b/tests/regression_tests/test_reference.h5 index 10dc37b51..186eff0d6 100644 Binary files a/tests/regression_tests/test_reference.h5 and b/tests/regression_tests/test_reference.h5 differ diff --git a/tests/regression_tests/triso/inputs_true.dat b/tests/regression_tests/triso/inputs_true.dat index 6d674b450..a13187628 100644 --- a/tests/regression_tests/triso/inputs_true.dat +++ b/tests/regression_tests/triso/inputs_true.dat @@ -6,170 +6,170 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -199,7 +199,7 @@ - 0.333333333333 0.333333333333 0.333333333333 + 0.3333333333333333 0.3333333333333333 0.3333333333333333 38 3 3 3 -0.5 -0.5 -0.5 @@ -226,170 +226,170 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/regression_tests/triso/results_true.dat b/tests/regression_tests/triso/results_true.dat index 3818ba7b1..dfc700c05 100644 --- a/tests/regression_tests/triso/results_true.dat +++ b/tests/regression_tests/triso/results_true.dat @@ -1,2 +1,2 @@ k-combined: -1.681659E+00 7.262745E-02 +1.683226E+00 7.383559E-02 diff --git a/tests/unit_tests/test_deplete_resultslist.py b/tests/unit_tests/test_deplete_resultslist.py index 86896cc15..7de0b1ae8 100644 --- a/tests/unit_tests/test_deplete_resultslist.py +++ b/tests/unit_tests/test_deplete_resultslist.py @@ -19,21 +19,22 @@ def test_get_atoms(res): t, n = res.get_atoms("1", "Xe135") t_ref = [0.0, 1296000.0, 2592000.0, 3888000.0] - n_ref = [6.6747328233649218e+08, 3.5421791038348462e+14, - 3.6208592242443462e+14, 3.3799758969347038e+14] + n_ref = [6.6747328233649218e+08, 3.4589992012016338e+14, + 3.5635060369969225e+14, 3.5195113630100188e+14] np.testing.assert_allclose(t, t_ref) np.testing.assert_allclose(n, n_ref) + def test_get_reaction_rate(res): """Tests evaluating reaction rate.""" t, r = res.get_reaction_rate("1", "Xe135", "(n,gamma)") t_ref = [0.0, 1296000.0, 2592000.0, 3888000.0] - n_ref = np.array([6.6747328233649218e+08, 3.5421791038348462e+14, - 3.6208592242443462e+14, 3.3799758969347038e+14]) - xs_ref = np.array([4.0594392323131994e-05, 3.9249546927524987e-05, - 3.8394587728581798e-05, 4.1521845978371697e-05]) + n_ref = np.array([6.6747328233649218e+08, 3.4589992012016338e+14, + 3.5635060369969225e+14, 3.5195113630100188e+14]) + xs_ref = np.array([4.1340608491478010e-05, 4.1120938620476115e-05, + 4.3341529708654921e-05, 3.8716623651147821e-05]) np.testing.assert_allclose(t, t_ref) np.testing.assert_allclose(r, n_ref * xs_ref) @@ -44,8 +45,8 @@ def test_get_eigenvalue(res): t, k = res.get_eigenvalue() t_ref = [0.0, 1296000.0, 2592000.0, 3888000.0] - k_ref = [1.181281798790367, 1.1798750921988739, 1.1965943696058159, - 1.2207119847790813] + k_ref = [1.1798617938070866, 1.1745713141097096, 1.1732427763487678, + 1.213699703239334] np.testing.assert_allclose(t, t_ref) np.testing.assert_allclose(k, k_ref) diff --git a/tools/ci/travis-install.sh b/tools/ci/travis-install.sh index ecfd4211c..1f80453ad 100755 --- a/tools/ci/travis-install.sh +++ b/tools/ci/travis-install.sh @@ -7,10 +7,8 @@ set -ex # Upgrade pip before doing anything else pip install --upgrade pip -# Running OpenMC's setup.py requires numpy/cython already. NumPy float -# formatting changed in version 1.14, so stick with a lower version until we can -# handle it in our test suite -pip install 'numpy<1.14' +# Running OpenMC's setup.py requires numpy/cython already +pip install numpy pip install cython # pytest installed by default -- make sure we get latest