diff --git a/MANIFEST.in b/MANIFEST.in
index be82928a1..5715bfb44 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,10 @@
include CMakeLists.txt
include LICENSE
+include CODE_OF_CONDUCT.md
+include CONTRIBUTING.md
include schemas.xml
include pyproject.toml
+include pytest.ini
include openmc/data/reconstruct.pyx
include docs/source/_templates/layout.html
include docs/sphinxext/LICENSE
@@ -33,4 +36,11 @@ recursive-include tests *.dat
recursive-include tests *.h5
recursive-include tests *.py
recursive-include tests *.xml
+recursive-include vendor CMakeLists.txt
+recursive-include vendor *.cmake.in
+recursive-include vendor *.cc
+recursive-include vendor *.cpp
+recursive-include vendor *.hh
+recursive-include vendor *.hpp
prune docs/build
+prune docs/source/pythonapi/generated/
diff --git a/docs/source/methods/neutron_physics.rst b/docs/source/methods/neutron_physics.rst
index 3451ae83f..465929ba0 100644
--- a/docs/source/methods/neutron_physics.rst
+++ b/docs/source/methods/neutron_physics.rst
@@ -86,7 +86,7 @@ Elastic Scattering
------------------
Note that the multi-group mode makes no distinction between elastic or
-inelastic scattering reactions. The spceific multi-group scattering
+inelastic scattering reactions. The specific multi-group scattering
implementation is discussed in the :ref:`multi-group-scatter` section.
Elastic scattering refers to the process by which a neutron scatters off a
diff --git a/setup.py b/setup.py
index 38ee57f71..712244efb 100755
--- a/setup.py
+++ b/setup.py
@@ -39,7 +39,13 @@ kwargs = {
'author': 'The OpenMC Development Team',
'author_email': 'openmc-dev@googlegroups.com',
'description': 'OpenMC',
- 'url': 'https://github.com/openmc-dev/openmc',
+ 'url': 'https://openmc.org',
+ 'download_url': 'https://github.com/openmc-dev/openmc/releases',
+ 'project_urls': {
+ 'Issue Tracker': 'https://github.com/openmc-dev/openmc/issues',
+ 'Documentation': 'https://openmc.readthedocs.io',
+ 'Source Code': 'https://github.com/openmc-dev/openmc',
+ },
'classifiers': [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
@@ -48,6 +54,7 @@ kwargs = {
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Topic :: Scientific/Engineering'
+ 'Programming Language :: C++',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
@@ -55,13 +62,12 @@ kwargs = {
'Programming Language :: Python :: 3.7',
],
- # Required dependencies
+ # Dependencies
+ 'python_requires': '>=3.4',
'install_requires': [
'numpy>=1.9', 'h5py', 'scipy', 'ipython', 'matplotlib',
'pandas', 'lxml', 'uncertainties'
],
-
- # Optional dependencies
'extras_require': {
'test': ['pytest', 'pytest-cov'],
'vtk': ['vtk'],
diff --git a/src/settings.cpp b/src/settings.cpp
index 4c041a080..32032ed2a 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -400,7 +400,7 @@ void read_settings_xml()
SourceDistribution source {
UPtrSpace{new SpatialPoint({0.0, 0.0, 0.0})},
UPtrAngle{new Isotropic()},
- UPtrDist{new Watt(0.988, 2.249e-6)}
+ UPtrDist{new Watt(0.988e6, 2.249e-6)}
};
model::external_sources.push_back(std::move(source));
}
diff --git a/src/thermal.cpp b/src/thermal.cpp
index 3c2d9ba43..40bb19e89 100644
--- a/src/thermal.cpp
+++ b/src/thermal.cpp
@@ -199,10 +199,10 @@ ThermalScattering::calculate_xs(double E, double sqrtkT, int* i_temp,
// Calculate S(a,b) inelastic scattering cross section
auto& xs = sab.inelastic_sigma_;
- *inelastic = (1.0 - f) * xs[i_grid] + f * xs[i_grid + 1];
+ *inelastic = xs[i_grid] + f * (xs[i_grid + 1] - xs[i_grid]);
// Check for elastic data
- if (E < sab.threshold_elastic_) {
+ if (!sab.elastic_e_in_.empty()) {
// Determine whether elastic scattering is given in the coherent or
// incoherent approximation. For coherent, the cross section is
// represented as P/E whereas for incoherent, it is simply P
@@ -231,7 +231,7 @@ ThermalScattering::calculate_xs(double E, double sqrtkT, int* i_temp,
// Calculate S(a,b) elastic scattering cross section
auto& xs = sab.elastic_P_;
- *elastic = (1.0 - f) * xs[i_grid] + f * xs[i_grid + 1];
+ *elastic = xs[i_grid] + f*(xs[i_grid + 1] - xs[i_grid]);
}
} else {
// No elastic data
diff --git a/tests/regression_tests/asymmetric_lattice/results_true.dat b/tests/regression_tests/asymmetric_lattice/results_true.dat
index ecc30a056..43f59aa5d 100644
--- a/tests/regression_tests/asymmetric_lattice/results_true.dat
+++ b/tests/regression_tests/asymmetric_lattice/results_true.dat
@@ -1 +1 @@
-4b75e203d06d0fc1b4c4dfcb8c180d6f3df8fa2bc44e9775b59bbfd8f7a3785f956f9a9f301526f69c0f8a963ce2e553e0c62c7f6c696656ce1d47b415af6076
\ No newline at end of file
+4401f503237c94e9d9cfc9f60e0269d5ae5bb67be3225e18c5510ed08616482964e2962a06268751f66a455fac3ddd5faf91555638dfb56fcd09eee60219edff
\ No newline at end of file
diff --git a/tests/regression_tests/cmfd_feed_2g/results_true.dat b/tests/regression_tests/cmfd_feed_2g/results_true.dat
index 8161b2645..4b3dc3c96 100644
--- a/tests/regression_tests/cmfd_feed_2g/results_true.dat
+++ b/tests/regression_tests/cmfd_feed_2g/results_true.dat
@@ -1,5 +1,5 @@
k-combined:
-1.038883E+00 1.017026E-02
+1.038883E+00 1.017030E-02
tally 1:
1.167304E+02
1.362680E+03
@@ -49,7 +49,7 @@ tally 3:
0.000000E+00
2.033842E-02
4.375294E-05
-4.296338E+00
+4.296339E+00
9.280716E-01
3.493776E+00
6.157094E-01
@@ -74,7 +74,7 @@ tally 3:
9.717439E+01
4.724254E+02
8.435691E-01
-3.666151E-02
+3.666152E-02
6.192881E+01
1.924016E+02
0.000000E+00
@@ -82,7 +82,7 @@ tally 3:
1.796382E-02
3.190854E-05
4.343238E+00
-9.514039E-01
+9.514040E-01
3.504683E+00
6.157615E-01
0.000000E+00
@@ -106,7 +106,7 @@ tally 3:
9.885292E+01
4.888720E+02
9.509199E-01
-4.670951E-02
+4.670952E-02
tally 4:
0.000000E+00
0.000000E+00
@@ -383,7 +383,7 @@ cmfd balance
1.08402E-03
1.09178E-03
5.45977E-04
-4.45554E-04
+4.45555E-04
4.01147E-04
3.71025E-04
3.57715E-04
diff --git a/tests/regression_tests/cmfd_feed_ng/results_true.dat b/tests/regression_tests/cmfd_feed_ng/results_true.dat
index 8308e8634..707411459 100644
--- a/tests/regression_tests/cmfd_feed_ng/results_true.dat
+++ b/tests/regression_tests/cmfd_feed_ng/results_true.dat
@@ -1,5 +1,5 @@
k-combined:
-1.029540E+00 1.765356E-02
+1.029540E+00 1.765357E-02
tally 1:
1.144958E+02
1.311468E+03
@@ -93,7 +93,7 @@ tally 3:
0.000000E+00
6.939496E+01
3.014077E+02
-6.294738E-01
+6.294737E-01
2.532146E-02
4.991526E+01
1.566280E+02
@@ -129,7 +129,7 @@ tally 3:
0.000000E+00
6.885265E+01
2.965191E+02
-6.537576E-01
+6.537575E-01
2.783733E-02
4.958341E+01
1.546656E+02
diff --git a/tests/regression_tests/lattice_hex_coincident/inputs_true.dat b/tests/regression_tests/lattice_hex_coincident/inputs_true.dat
index 8d73f6374..0388a4f55 100644
--- a/tests/regression_tests/lattice_hex_coincident/inputs_true.dat
+++ b/tests/regression_tests/lattice_hex_coincident/inputs_true.dat
@@ -39,7 +39,7 @@
-
+
@@ -67,8 +67,8 @@
eigenvalue
1000
- 10
- 5
+ 5
+ 2
-0.9899494936611666 -0.9899494936611666 0.0 0.9899494936611666 0.9899494936611666 10.0
diff --git a/tests/regression_tests/lattice_hex_coincident/results_true.dat b/tests/regression_tests/lattice_hex_coincident/results_true.dat
index ba047f674..1f95edaf8 100644
--- a/tests/regression_tests/lattice_hex_coincident/results_true.dat
+++ b/tests/regression_tests/lattice_hex_coincident/results_true.dat
@@ -1,2 +1,2 @@
k-combined:
-1.741370E+00 1.384609E-03
+1.910374E+00 2.685991E-02
diff --git a/tests/regression_tests/lattice_hex_coincident/test.py b/tests/regression_tests/lattice_hex_coincident/test.py
index 65786e2ec..eaea74b19 100644
--- a/tests/regression_tests/lattice_hex_coincident/test.py
+++ b/tests/regression_tests/lattice_hex_coincident/test.py
@@ -1,4 +1,5 @@
-import numpy as np
+from math import sqrt
+
import openmc
from tests.testing_harness import PyAPITestHarness
@@ -13,7 +14,7 @@ class HexLatticeCoincidentTestHarness(PyAPITestHarness):
materials.append(fuel_mat)
matrix = openmc.Material()
- matrix.set_density('atom/b-cm', 8.7742E-02)
+ matrix.set_density('atom/b-cm', 1.7742E-02)
matrix.add_element('C', 1.0, 'ao')
matrix.add_s_alpha_beta('c_Graphite')
materials.append(matrix)
@@ -94,7 +95,7 @@ class HexLatticeCoincidentTestHarness(PyAPITestHarness):
coolant_univ.add_cells(coolant_channel)
half_width = assembly_pitch # cm
- edge_length = (2./np.sqrt(3.0)) * half_width
+ edge_length = (2./sqrt(3.0)) * half_width
inf_mat = openmc.Cell()
inf_mat.fill = matrix
@@ -132,19 +133,19 @@ class HexLatticeCoincidentTestHarness(PyAPITestHarness):
settings.run_mode = 'eigenvalue'
source = openmc.Source()
- corner_dist = np.sqrt(2) * pin_rad
+ corner_dist = sqrt(2) * pin_rad
ll = [-corner_dist, -corner_dist, 0.0]
ur = [corner_dist, corner_dist, 10.0]
source.space = openmc.stats.Box(ll, ur)
source.strength = 1.0
settings.source = source
settings.output = {'summary' : False}
- settings.batches = 10
- settings.inactive = 5
+ settings.batches = 5
+ settings.inactive = 2
settings.particles = 1000
settings.seed = 22
settings.export_to_xml()
def test_lattice_hex_coincident_surf():
- harness = HexLatticeCoincidentTestHarness('statepoint.10.h5')
+ harness = HexLatticeCoincidentTestHarness('statepoint.5.h5')
harness.main()
diff --git a/tests/regression_tests/salphabeta/inputs_true.dat b/tests/regression_tests/salphabeta/inputs_true.dat
index ede96d376..29d8065cf 100644
--- a/tests/regression_tests/salphabeta/inputs_true.dat
+++ b/tests/regression_tests/salphabeta/inputs_true.dat
@@ -49,7 +49,7 @@
eigenvalue
- 1000
+ 400
5
0
diff --git a/tests/regression_tests/salphabeta/results_true.dat b/tests/regression_tests/salphabeta/results_true.dat
index e1121bce5..708e6e726 100644
--- a/tests/regression_tests/salphabeta/results_true.dat
+++ b/tests/regression_tests/salphabeta/results_true.dat
@@ -1,2 +1,2 @@
k-combined:
-8.403447E-01 2.461538E-02
+8.474822E-01 1.767966E-02
diff --git a/tests/regression_tests/salphabeta/test.py b/tests/regression_tests/salphabeta/test.py
index e69ada5ba..ab5305126 100644
--- a/tests/regression_tests/salphabeta/test.py
+++ b/tests/regression_tests/salphabeta/test.py
@@ -66,7 +66,7 @@ def make_model():
# Settings
model.settings.batches = 5
model.settings.inactive = 0
- model.settings.particles = 1000
+ model.settings.particles = 400
model.settings.source = openmc.Source(space=openmc.stats.Box(
[-4, -4, -4], [4, 4, 4]))
diff --git a/tests/regression_tests/triso/results_true.dat b/tests/regression_tests/triso/results_true.dat
index eb06a771c..c8e683234 100644
--- a/tests/regression_tests/triso/results_true.dat
+++ b/tests/regression_tests/triso/results_true.dat
@@ -1,2 +1,2 @@
k-combined:
-1.707485E+00 9.795497E-02
+1.701412E+00 3.180881E-02
diff --git a/tests/regression_tests/void/results_true.dat b/tests/regression_tests/void/results_true.dat
index 48be2778a..c0e8184b6 100644
--- a/tests/regression_tests/void/results_true.dat
+++ b/tests/regression_tests/void/results_true.dat
@@ -1,2 +1,2 @@
k-combined:
-1.062505E+00 2.674375E-02
+9.612556E-01 1.990135E-02