diff --git a/docs/source/pythonapi/examples/multi-group-cross-sections.ipynb b/docs/source/pythonapi/examples/multi-group-cross-sections.ipynb
index 3996543e1..0c0250437 100644
--- a/docs/source/pythonapi/examples/multi-group-cross-sections.ipynb
+++ b/docs/source/pythonapi/examples/multi-group-cross-sections.ipynb
@@ -13,15 +13,30 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
- "collapsed": true
+ "collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/usr/lib/pymodules/python2.7/matplotlib/__init__.py:1173: UserWarning: This call to matplotlib.use() has no effect\n",
+ "because the backend has already been chosen;\n",
+ "matplotlib.use() must be called *before* pylab, matplotlib.pyplot,\n",
+ "or matplotlib.backends is imported for the first time.\n",
+ "\n",
+ " warnings.warn(_use_error_msg)\n"
+ ]
+ }
+ ],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"\n",
"import openmc\n",
"import openmc.mgxs as mgxs\n",
+ "import openmoc\n",
+ "from openmoc.compatible import get_openmoc_geometry\n",
"\n",
"%matplotlib inline"
]
@@ -463,7 +478,7 @@
" License: http://mit-crpg.github.io/openmc/license.html\n",
" Version: 0.7.0\n",
" Git SHA1: 23535afa1c69644bb299bde18a094c3b99d53ae0\n",
- " Date/Time: 2015-10-08 19:56:45\n",
+ " Date/Time: 2015-10-09 00:44:07\n",
" MPI Processes: 1\n",
"\n",
" ===========================================================================\n",
@@ -548,20 +563,20 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
- " Total time for initialization = 4.5500E-01 seconds\n",
- " Reading cross sections = 9.0000E-02 seconds\n",
- " Total time in simulation = 1.3254E+01 seconds\n",
- " Time in transport only = 1.3238E+01 seconds\n",
- " Time in inactive batches = 1.8670E+00 seconds\n",
- " Time in active batches = 1.1387E+01 seconds\n",
- " Time synchronizing fission bank = 8.0000E-03 seconds\n",
- " Sampling source sites = 7.0000E-03 seconds\n",
+ " Total time for initialization = 4.1300E-01 seconds\n",
+ " Reading cross sections = 1.0500E-01 seconds\n",
+ " Total time in simulation = 1.3459E+01 seconds\n",
+ " Time in transport only = 1.3445E+01 seconds\n",
+ " Time in inactive batches = 2.1740E+00 seconds\n",
+ " Time in active batches = 1.1285E+01 seconds\n",
+ " Time synchronizing fission bank = 4.0000E-03 seconds\n",
+ " Sampling source sites = 3.0000E-03 seconds\n",
" SEND/RECV source sites = 1.0000E-03 seconds\n",
- " Time accumulating tallies = 0.0000E+00 seconds\n",
+ " Time accumulating tallies = 1.0000E-03 seconds\n",
" Total time for finalization = 2.0000E-03 seconds\n",
- " Total time elapsed = 1.3719E+01 seconds\n",
- " Calculation Rate (inactive) = 13390.5 neutrons/second\n",
- " Calculation Rate (active) = 8781.94 neutrons/second\n",
+ " Total time elapsed = 1.3882E+01 seconds\n",
+ " Calculation Rate (inactive) = 11499.5 neutrons/second\n",
+ " Calculation Rate (active) = 8861.32 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
@@ -950,25 +965,8 @@
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "/usr/lib/pymodules/python2.7/matplotlib/__init__.py:1173: UserWarning: This call to matplotlib.use() has no effect\n",
- "because the backend has already been chosen;\n",
- "matplotlib.use() must be called *before* pylab, matplotlib.pyplot,\n",
- "or matplotlib.backends is imported for the first time.\n",
- "\n",
- " warnings.warn(_use_error_msg)\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
- "# Import OpenMOC and the OpenMOC/OpenCG compatibility module\n",
- "import openmoc\n",
- "from openmoc.compatible import get_openmoc_geometry\n",
- "\n",
"# Create an OpenCG Geometry from the OpenMC Geometry stored in the summary\n",
"su.make_opencg_geometry()\n",
"\n",
@@ -1028,8 +1026,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "[ NORMAL ] Ray tracing for track segmentation...\n",
- "[ NORMAL ] Dumping tracks to file...\n",
+ "[ NORMAL ] Importing ray tracing data from file...\n",
"[ NORMAL ] Computing the eigenvalue...\n",
"[ NORMAL ] Iteration 0:\tk_eff = 0.685185\tres = 0.000E+00\n",
"[ NORMAL ] Iteration 1:\tk_eff = 0.785642\tres = 3.148E-01\n",
@@ -1386,29 +1383,13 @@
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:223: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:223: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:223: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:223: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"# Create root Cell\n",
"root_cell = openmc.Cell(name='root cell')\n",
+ "root_cell.region = +min_x & -max_x & +min_y & -max_y\n",
"root_cell.fill = pin_cell_universe\n",
"\n",
- "# Add boundary planes\n",
- "root_cell.add_surface(min_x, halfspace=+1)\n",
- "root_cell.add_surface(max_x, halfspace=-1)\n",
- "root_cell.add_surface(min_y, halfspace=+1)\n",
- "root_cell.add_surface(max_y, halfspace=-1)\n",
- "\n",
"# Create root Universe\n",
"root_universe = openmc.Universe(universe_id=0, name='root universe')\n",
"root_universe.add_cell(root_cell)"
@@ -1480,7 +1461,7 @@
},
{
"cell_type": "code",
- "execution_count": 35,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
@@ -1520,22 +1501,11 @@
},
{
"cell_type": "code",
- "execution_count": 36,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "0"
- ]
- },
- "execution_count": 36,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"# Delete old HDF5 files\n",
"!rm *.h5\n",
@@ -1561,7 +1531,7 @@
},
{
"cell_type": "code",
- "execution_count": 37,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
@@ -1582,7 +1552,7 @@
},
{
"cell_type": "code",
- "execution_count": 38,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
@@ -1618,46 +1588,11 @@
},
{
"cell_type": "code",
- "execution_count": 39,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Multi-Group XS\n",
- "\tReaction Type =\tnu-fission\n",
- "\tDomain Type =\tcell\n",
- "\tDomain ID =\t10000\n",
- "\tNuclide =\tU-235\n",
- "\tCross Sections [barns]:\n",
- " Group 1 [0.821 - 20.0 MeV]:\t3.30e+00 +/- 5.91e-01%\n",
- " Group 2 [0.00553 - 0.821 MeV]:\t3.97e+00 +/- 4.03e-01%\n",
- " Group 3 [4e-06 - 0.00553 MeV]:\t5.48e+01 +/- 5.56e-01%\n",
- " Group 4 [6.25e-07 - 4e-06 MeV]:\t8.84e+01 +/- 8.48e-01%\n",
- " Group 5 [2.8e-07 - 6.25e-07 MeV]:\t2.89e+02 +/- 1.25e+00%\n",
- " Group 6 [1.4e-07 - 2.8e-07 MeV]:\t4.49e+02 +/- 1.09e+00%\n",
- " Group 7 [5.8e-08 - 1.4e-07 MeV]:\t6.87e+02 +/- 7.98e-01%\n",
- " Group 8 [0.0 - 5.8e-08 MeV]:\t1.44e+03 +/- 5.73e-01%\n",
- "\n",
- "\tNuclide =\tU-238\n",
- "\tCross Sections [barns]:\n",
- " Group 1 [0.821 - 20.0 MeV]:\t1.06e+00 +/- 6.74e-01%\n",
- " Group 2 [0.00553 - 0.821 MeV]:\t1.22e-03 +/- 8.28e-01%\n",
- " Group 3 [4e-06 - 0.00553 MeV]:\t4.75e-04 +/- 7.97e+00%\n",
- " Group 4 [6.25e-07 - 4e-06 MeV]:\t6.53e-06 +/- 7.56e-01%\n",
- " Group 5 [2.8e-07 - 6.25e-07 MeV]:\t1.07e-05 +/- 1.22e+00%\n",
- " Group 6 [1.4e-07 - 2.8e-07 MeV]:\t1.55e-05 +/- 1.09e+00%\n",
- " Group 7 [5.8e-08 - 1.4e-07 MeV]:\t2.30e-05 +/- 7.97e-01%\n",
- " Group 8 [0.0 - 5.8e-08 MeV]:\t4.25e-05 +/- 5.72e-01%\n",
- "\n",
- "\n",
- "\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"nufission = xs_library[fuel_cell.id]['nu-fission']\n",
"nufission.print_xs(xs_type='micro', nuclides=['U-235', 'U-238'])"
@@ -1672,34 +1607,11 @@
},
{
"cell_type": "code",
- "execution_count": 40,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Multi-Group XS\n",
- "\tReaction Type =\tnu-fission\n",
- "\tDomain Type =\tcell\n",
- "\tDomain ID =\t10000\n",
- "\tCross Sections [cm^-1]:\n",
- " Group 1 [0.821 - 20.0 MeV]:\t2.52e-02 +/- 6.42e-01%\n",
- " Group 2 [0.00553 - 0.821 MeV]:\t1.52e-03 +/- 3.96e-01%\n",
- " Group 3 [4e-06 - 0.00553 MeV]:\t2.06e-02 +/- 5.56e-01%\n",
- " Group 4 [6.25e-07 - 4e-06 MeV]:\t3.32e-02 +/- 8.48e-01%\n",
- " Group 5 [2.8e-07 - 6.25e-07 MeV]:\t1.09e-01 +/- 1.25e+00%\n",
- " Group 6 [1.4e-07 - 2.8e-07 MeV]:\t1.69e-01 +/- 1.09e+00%\n",
- " Group 7 [5.8e-08 - 1.4e-07 MeV]:\t2.58e-01 +/- 7.98e-01%\n",
- " Group 8 [0.0 - 5.8e-08 MeV]:\t5.41e-01 +/- 5.73e-01%\n",
- "\n",
- "\n",
- "\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"nufission = xs_library[fuel_cell.id]['nu-fission']\n",
"nufission.print_xs(xs_type='macro', nuclides='sum')"
@@ -1714,141 +1626,11 @@
},
{
"cell_type": "code",
- "execution_count": 41,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "data": {
- "text/html": [
- "
\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " cell | \n",
- " group in | \n",
- " group out | \n",
- " nuclide | \n",
- " mean | \n",
- " std. dev. | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " | 126 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 1 | \n",
- " O-16 | \n",
- " 1.560098 | \n",
- " 0.017801 | \n",
- "
\n",
- " \n",
- " | 127 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 1 | \n",
- " H-1 | \n",
- " 0.234877 | \n",
- " 0.010096 | \n",
- "
\n",
- " \n",
- " | 124 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 2 | \n",
- " O-16 | \n",
- " 0.288236 | \n",
- " 0.004397 | \n",
- "
\n",
- " \n",
- " | 125 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 2 | \n",
- " H-1 | \n",
- " 1.587815 | \n",
- " 0.007847 | \n",
- "
\n",
- " \n",
- " | 122 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 3 | \n",
- " O-16 | \n",
- " 0.000000 | \n",
- " 0.000000 | \n",
- "
\n",
- " \n",
- " | 123 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 3 | \n",
- " H-1 | \n",
- " 0.010122 | \n",
- " 0.000513 | \n",
- "
\n",
- " \n",
- " | 120 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 4 | \n",
- " O-16 | \n",
- " 0.000000 | \n",
- " 0.000000 | \n",
- "
\n",
- " \n",
- " | 121 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 4 | \n",
- " H-1 | \n",
- " 0.000000 | \n",
- " 0.000000 | \n",
- "
\n",
- " \n",
- " | 118 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 5 | \n",
- " O-16 | \n",
- " 0.000000 | \n",
- " 0.000000 | \n",
- "
\n",
- " \n",
- " | 119 | \n",
- " 10002 | \n",
- " 1 | \n",
- " 5 | \n",
- " H-1 | \n",
- " 0.000000 | \n",
- " 0.000000 | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " cell group in group out nuclide mean std. dev.\n",
- "126 10002 1 1 O-16 1.560098 0.017801\n",
- "127 10002 1 1 H-1 0.234877 0.010096\n",
- "124 10002 1 2 O-16 0.288236 0.004397\n",
- "125 10002 1 2 H-1 1.587815 0.007847\n",
- "122 10002 1 3 O-16 0.000000 0.000000\n",
- "123 10002 1 3 H-1 0.010122 0.000513\n",
- "120 10002 1 4 O-16 0.000000 0.000000\n",
- "121 10002 1 4 H-1 0.000000 0.000000\n",
- "118 10002 1 5 O-16 0.000000 0.000000\n",
- "119 10002 1 5 H-1 0.000000 0.000000"
- ]
- },
- "execution_count": 41,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"nuscatter = xs_library[moderator_cell.id]['nu-scatter']\n",
"df = nuscatter.get_pandas_dataframe(xs_type='micro')\n",
@@ -1864,7 +1646,7 @@
},
{
"cell_type": "code",
- "execution_count": 42,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
@@ -1892,22 +1674,11 @@
},
{
"cell_type": "code",
- "execution_count": 43,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWYAAADDCAYAAACxgLv/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFxZJREFUeJzt3XmYVNWZx/FvAyIKCijGBRiaxA0VRVTcp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5XYvCnKrBa1SjBza+dDrW\nw6jUCmwXsh+wF5Wdn3gQ8CE2PhWqt7w7tnLuD5yC9Q4q0QUYClzn/n4OnFdl29Kzh9xdZZx6UF6X\nJ3Rud+i8rkVhfp+24yz9sd5FDNYA7sEmE7gvUMylwEPAjhU8dzfgYGz87C7ge8CtVbZnnvv7ETYL\n9LAK48x1l5fc9fFYIlejxOwhUVNelyd0biuvq9QFG2tpxLYk1RwkwcUJcZCkAUuMywPE6oMd2QVY\nC3gK2LvKmMOp/sj12sA67v/uwN+A/aqI9xSwufu/Gbi0ilhg47LHVhmjXpTXlas2t5XXgeyPHR1+\nG/hFFXHuAj4A/oGN742sItYe2G7adDKnt4yoMNZgbHxqOnYKz9lVtCttONUfuR6ItWk6dupUNe89\n2JRlL2E/njWB6o5edwcWklnB2iPldWWqzW3ltYiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiHRs/w9e\ned7lsJ91IAAAAABJRU5ErkJggg==\n",
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"# Create plot of the H-1 scattering matrix\n",
"fig = plt.subplot(121)\n",
@@ -1932,7 +1703,7 @@
},
{
"cell_type": "code",
- "execution_count": 44,
+ "execution_count": null,
"metadata": {
"collapsed": true
},
@@ -1954,133 +1725,22 @@
},
{
"cell_type": "code",
- "execution_count": 45,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Multi-Group XS\n",
- "\tReaction Type =\ttransport\n",
- "\tDomain Type =\tcell\n",
- "\tDomain ID =\t10000\n",
- "\tNuclide =\tU-238\n",
- "\tCross Sections [cm^-1]:\n",
- " Group 1 [6.25e-07 - 20.0 MeV]:\t2.17e-01 +/- 4.04e-01%\n",
- " Group 2 [0.0 - 6.25e-07 MeV]:\t2.53e-01 +/- 5.85e-01%\n",
- "\n",
- "\tNuclide =\tO-16\n",
- "\tCross Sections [cm^-1]:\n",
- " Group 1 [6.25e-07 - 20.0 MeV]:\t1.45e-01 +/- 4.10e-01%\n",
- " Group 2 [0.0 - 6.25e-07 MeV]:\t1.75e-01 +/- 6.46e-01%\n",
- "\n",
- "\tNuclide =\tU-235\n",
- "\tCross Sections [cm^-1]:\n",
- " Group 1 [6.25e-07 - 20.0 MeV]:\t7.91e-03 +/- 1.22e+00%\n",
- " Group 2 [0.0 - 6.25e-07 MeV]:\t1.82e-01 +/- 4.98e-01%\n",
- "\n",
- "\n",
- "\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"condense_xs.print_xs()"
]
},
{
"cell_type": "code",
- "execution_count": 46,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "data": {
- "text/html": [
- "\n",
- "
\n",
- " \n",
- " \n",
- " | \n",
- " cell | \n",
- " group in | \n",
- " nuclide | \n",
- " mean | \n",
- " std. dev. | \n",
- "
\n",
- " \n",
- " \n",
- " \n",
- " | 3 | \n",
- " 10000 | \n",
- " 1 | \n",
- " U-238 | \n",
- " 9.589323 | \n",
- " 0.038756 | \n",
- "
\n",
- " \n",
- " | 4 | \n",
- " 10000 | \n",
- " 1 | \n",
- " O-16 | \n",
- " 3.159101 | \n",
- " 0.012939 | \n",
- "
\n",
- " \n",
- " | 5 | \n",
- " 10000 | \n",
- " 1 | \n",
- " U-235 | \n",
- " 21.095256 | \n",
- " 0.257787 | \n",
- "
\n",
- " \n",
- " | 0 | \n",
- " 10000 | \n",
- " 2 | \n",
- " U-238 | \n",
- " 11.178844 | \n",
- " 0.065428 | \n",
- "
\n",
- " \n",
- " | 1 | \n",
- " 10000 | \n",
- " 2 | \n",
- " O-16 | \n",
- " 3.800027 | \n",
- " 0.024538 | \n",
- "
\n",
- " \n",
- " | 2 | \n",
- " 10000 | \n",
- " 2 | \n",
- " U-235 | \n",
- " 485.513530 | \n",
- " 2.418761 | \n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " cell group in nuclide mean std. dev.\n",
- "3 10000 1 U-238 9.589323 0.038756\n",
- "4 10000 1 O-16 3.159101 0.012939\n",
- "5 10000 1 U-235 21.095256 0.257787\n",
- "0 10000 2 U-238 11.178844 0.065428\n",
- "1 10000 2 O-16 3.800027 0.024538\n",
- "2 10000 2 U-235 485.513530 2.418761"
- ]
- },
- "execution_count": 46,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"df = condense_xs.get_pandas_dataframe(xs_type='micro')\n",
"df"
@@ -2102,9 +1762,9 @@
},
{
"cell_type": "code",
- "execution_count": 47,
+ "execution_count": null,
"metadata": {
- "collapsed": true
+ "collapsed": false
},
"outputs": [],
"source": [
@@ -2124,7 +1784,7 @@
},
{
"cell_type": "code",
- "execution_count": 48,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
@@ -2172,7 +1832,7 @@
},
{
"cell_type": "code",
- "execution_count": 49,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
@@ -2200,21 +1860,11 @@
},
{
"cell_type": "code",
- "execution_count": 50,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "openmc keff = 1.227616\n",
- "openmoc keff = 1.225325\n",
- "bias [pcm]: -229.1\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"# Print report of keff and bias with OpenMC\n",
"openmoc_keff = solver.getKeff()\n",
@@ -2235,27 +1885,11 @@
},
{
"cell_type": "code",
- "execution_count": 51,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n",
- "/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/mgxs/mgxs.py:711: DeprecationWarning: elementwise comparison failed; this will raise the error in the future.\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"su.make_opencg_geometry()\n",
"openmoc_geometry = get_openmoc_geometry(su.opencg_geometry)\n",
@@ -2292,7 +1926,7 @@
},
{
"cell_type": "code",
- "execution_count": 52,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
@@ -2310,21 +1944,11 @@
},
{
"cell_type": "code",
- "execution_count": 53,
+ "execution_count": null,
"metadata": {
"collapsed": false
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "openmc keff = 1.227616\n",
- "openmoc keff = 1.227096\n",
- "bias [pcm]: -52.0\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"# Print report of keff and bias with OpenMC\n",
"openmoc_keff = solver.getKeff()\n",
diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py
index 07d0e10ab..940586f32 100644
--- a/openmc/mgxs/mgxs.py
+++ b/openmc/mgxs/mgxs.py
@@ -703,7 +703,13 @@ class MGXS(object):
# Sum across all applicable fine energy group filters
for i, filter in enumerate(tally.filters):
- if 'energy' in filter.type and np.all(filter.bins == fine_edges):
+ if 'energy' not in filter.type:
+ continue
+ elif len(filter.bins) != len(fine_edges):
+ continue
+ elif not np.allclose(filter.bins, fine_edges):
+ continue
+ else:
filter.bins = coarse_groups.group_edges
mean = np.add.reduceat(mean, energy_indices, axis=i)
std_dev = np.add.reduceat(std_dev**2, energy_indices, axis=i)