diff --git a/.gitignore b/.gitignore
index eb7d7df34..a58bf032e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,6 @@ src/templates/*.f90
# Test results error file
results_error.dat
+
+# HDF5 files
+*.h5
diff --git a/data/cross_sections_nndc.xml b/data/cross_sections_nndc.xml
new file mode 100644
index 000000000..2e421d7ab
--- /dev/null
+++ b/data/cross_sections_nndc.xml
@@ -0,0 +1,1716 @@
+
+
+ ascii
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/data/get_nndc_data.py b/data/get_nndc_data.py
new file mode 100755
index 000000000..2e76401a4
--- /dev/null
+++ b/data/get_nndc_data.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+
+from __future__ import print_function
+import os
+import shutil
+import subprocess
+import sys
+import tarfile
+
+try:
+ from urllib.request import urlopen
+except ImportError:
+ from urllib2 import urlopen
+
+baseUrl = 'http://www.nndc.bnl.gov/endf/b7.1/aceFiles/'
+files = ['ENDF-B-VII.1-neutron-293.6K.tar.gz',
+ 'ENDF-B-VII.1-neutron-300K.tar.gz',
+ 'ENDF-B-VII.1-neutron-900K.tar.gz',
+ 'ENDF-B-VII.1-neutron-1500K.tar.gz',
+ 'ENDF-B-VII.1-tsl.tar.gz']
+block_size = 16384
+
+# ==============================================================================
+# DOWNLOAD FILES FROM NNDC SITE
+
+filesComplete = []
+for f in files:
+ # Establish connection to URL
+ url = baseUrl + f
+ req = urlopen(url)
+
+ # Get file size from header
+ file_size = int(req.info().getheaders('Content-Length')[0])
+ downloaded = 0
+
+ # Check if file already downloaded
+ if os.path.exists(f):
+ if os.path.getsize(f) == file_size:
+ print('Skipping ' + f)
+ filesComplete.append(f)
+ continue
+ else:
+ if sys.version_info[0] < 3:
+ overwrite = raw_input('Overwrite {0}? ([y]/n) '.format(f))
+ else:
+ overwrite = input('Overwrite {0}? ([y]/n) '.format(f))
+ if overwrite.lower().startswith('n'):
+ continue
+
+ # Copy file to disk
+ print('Downloading {0}... '.format(f), end='')
+ with open(f, 'wb') as fh:
+ while True:
+ chunk = req.read(block_size)
+ if not chunk: break
+ fh.write(chunk)
+ downloaded += len(chunk)
+ status = '{0:10} [{1:3.2f}%]'.format(downloaded, downloaded * 100. / file_size)
+ print(status + chr(8)*len(status), end='')
+ print('')
+ filesComplete.append(f)
+
+# ==============================================================================
+# EXTRACT FILES FROM TGZ
+
+for f in files:
+ if not f in filesComplete:
+ continue
+
+ # Extract files
+ suffix = f[f.rindex('-') + 1:].rstrip('.tar.gz')
+ with tarfile.open(f, 'r') as tgz:
+ print('Extracting {0}...'.format(f))
+ tgz.extractall(path='nndc/' + suffix)
+
+# ==============================================================================
+# COPY CROSS_SECTIONS.XML
+
+print('Copying cross_sections_nndc.xml...')
+shutil.copyfile('cross_sections_nndc.xml', 'nndc/cross_sections.xml')
+
+# ==============================================================================
+# PROMPT USER TO DELETE .TAR.GZ FILES
+
+# Ask user to delete
+if sys.version_info[0] < 3:
+ response = raw_input('Delete *.tar.gz files? ([y]/n) ')
+else:
+ response = input('Delete *.tar.gz files? ([y]/n) ')
+
+# Delete files if requested
+if not response or response.lower().startswith('y'):
+ for f in files:
+ if os.path.exists(f):
+ print('Removing {0}...'.format(f))
+ os.remove(f)
diff --git a/data/readme.rst b/data/readme.rst
index d975723b5..03685491d 100644
--- a/data/readme.rst
+++ b/data/readme.rst
@@ -15,6 +15,9 @@ work with a few common cross section sources.
- **cross_sections_ascii.xml** -- This file matches ENDF/B-VII.0 cross sections
distributed with MCNP5 / MCNP6 beta.
+- **cross_sections_nndc.xml** -- This file matches ENDF/B-VII.1 cross sections
+ distributed from the `NNDC website`_.
+
- **cross_sections_serpent.xml** -- This file matches ENDF/B-VII.0 cross
sections distributed with Serpent 1.1.7.
@@ -31,3 +34,4 @@ element in your settings.xml, or set the CROSS_SECTIONS environment variable to
the full path of the cross_sections.xml file.
.. _user's guide: http://mit-crpg.github.io/openmc/usersguide/install.html#cross-section-configuration
+.. _NNDC website: http://www.nndc.bnl.gov/endf/b7.1/acefiles.html
diff --git a/docs/source/_images/3dba.png b/docs/source/_images/3dba.png
new file mode 100644
index 000000000..69de65414
Binary files /dev/null and b/docs/source/_images/3dba.png differ
diff --git a/docs/source/publications.rst b/docs/source/publications.rst
index c17e652c7..df7ca639b 100644
--- a/docs/source/publications.rst
+++ b/docs/source/publications.rst
@@ -48,8 +48,8 @@ Publications
- Andrew R. Siegel, Kord Smith, Paul K. Romano, Benoit Forget, and Kyle Felker,
"Multi-core performance studies of a Monte Carlo neutron transport code,"
- *Int. J. High Perform. Comput. Appl.*
- (2013). ``_
+ *Int. J. High Perform. Comput. Appl.*, **28** (1), 87--96
+ (2014). ``_
- Paul K. Romano, Andrew R. Siegel, Benoit Forget, and Kord Smith, "Data
decomposition of Monte Carlo particle transport simulations via tally
diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst
index 2cee56987..ccbfabebe 100644
--- a/docs/source/quickinstall.rst
+++ b/docs/source/quickinstall.rst
@@ -48,7 +48,12 @@ following commands in a terminal:
sudo make install
This will build an executable named ``openmc`` and install it (by default in
-/usr/local/bin).
+/usr/local/bin). If you do not have administrator privileges, the last command
+can be replaced with a local install, e.g.
+
+.. code-block:: sh
+
+ make install -e prefix=$HOME/.local
.. _GitHub: https://github.com/mit-crpg/openmc
.. _git: http://git-scm.com
diff --git a/docs/source/releasenotes/index.rst b/docs/source/releasenotes/index.rst
index 9164fa594..d649b1403 100644
--- a/docs/source/releasenotes/index.rst
+++ b/docs/source/releasenotes/index.rst
@@ -10,6 +10,7 @@ bugs fixed, and known issues for each successive release.
.. toctree::
:maxdepth: 1
+ notes_0.5.4
notes_0.5.3
notes_0.5.2
notes_0.5.1
diff --git a/docs/source/releasenotes/notes_0.5.4.rst b/docs/source/releasenotes/notes_0.5.4.rst
new file mode 100644
index 000000000..174064e35
--- /dev/null
+++ b/docs/source/releasenotes/notes_0.5.4.rst
@@ -0,0 +1,63 @@
+.. _notes_0.5.4:
+
+==============================
+Release Notes for OpenMC 0.5.4
+==============================
+
+.. note::
+ These release notes are for an upcoming release of OpenMC and are still
+ subject to change.
+
+-------------------
+System Requirements
+-------------------
+
+There are no special requirements for running the OpenMC code. As of this
+release, OpenMC has been tested on a variety of Linux distributions, Mac OS X,
+and Microsoft Windows 7. Memory requirements will vary depending on the size of
+the problem at hand (mostly on the number of nuclides in the problem).
+
+------------
+New Features
+------------
+
+- New XML parsing backend (FoX)
+- Ability to write particle track files
+- Handle lost particles more gracefully (via particle track files)
+- Source sites outside geometry are resampled
+- Multiple random number generator streams
+- plot_mesh_tally.py utility converted to use Tkinter rather than PyQt
+- Script added to download ACE data from NNDC
+- Mixed ASCII/binary cross_sections.xml now allowed
+- Expanded options for writing source bank
+- Re-enabled ability to use source file as starting source
+
+---------
+Bug Fixes
+---------
+
+- 32c03c_: Check for valid data in cross_sections.xml
+- c71ef5_: Fix bug in statepoint.py
+- 8884fb_: Check for all ZAIDs for S(a,b) tables
+- b38af0_: Fix XML reading on multiple levels of input
+- d28750_: Fix bug in convert_xsdir.py
+
+.. _32c03c: https://github.com/mit-crpg/openmc/commit/32c03c
+.. _c71ef5: https://github.com/mit-crpg/openmc/commit/c71ef5
+.. _8884fb: https://github.com/mit-crpg/openmc/commit/8884fb
+.. _b38af0: https://github.com/mit-crpg/openmc/commit/b38af0
+.. _d28750: https://github.com/mit-crpg/openmc/commit/d28750
+
+------------
+Contributors
+------------
+
+This release contains new contributions from the following people:
+
+- `Sterling Harper `_
+- `Bryan Herman `_
+- `Nick Horelik `_
+- `Adam Nelson `_
+- `Paul Romano `_
+- `Tuomas Viitanen `_
+- `Jon Walsh `_
diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst
index de6d2577a..83eb2a3d8 100644
--- a/docs/source/usersguide/input.rst
+++ b/docs/source/usersguide/input.rst
@@ -264,7 +264,9 @@ attributes/sub-elements:
:file:
If this attribute is given, it indicates that the source is to be read from
- a binary source file whose path is given by the value of this element
+ a binary source file whose path is given by the value of this element. Note,
+ the number of source sites needs to be the same as the number of particles
+ simulated in a fission source generation.
*Default*: None
@@ -348,8 +350,10 @@ attributes/sub-elements:
The ```` element indicates at what batches a state point file
should be written. A state point file can be used to restart a run or to get
-tally results at any batch. This element has the following
-attributes/sub-elements:
+tally results at any batch. The default behavior when using this tag is to
+write out the source bank in the state_point file. This behavior can be
+customized by using the ```` element. This element has the
+following attributes/sub-elements:
:batches:
A list of integers separated by spaces indicating at what batches a state
@@ -364,19 +368,52 @@ attributes/sub-elements:
*Default*: None
+```` Element
+--------------------------
+
+The ```` element indicates at what batches the source bank
+should be written. The source bank can be either written out within a state
+point file or separately in a source point file. This element has the following
+attributes/sub-elements:
+
+ :batches:
+ A list of integers separated by spaces indicating at what batches a state
+ point file should be written. It should be noted that if source_separate
+ tag is not set to "true", this list must be a subset of state point batches.
+
+ *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 source_separate tag is not
+ set to "true", this value should produce a list of batches that is a subset
+ of state point batches.
+
+ *Default*: None
+
:source_separate:
- If this element is set to "true", a separate binary source file will be
+ 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
directly.
*Default*: false
- :source_write: If this element is set to "false", source sites are not written
- to the state point file. This can substantially reduce the size of state
- points if large numbers of particles per batch are used.
+ :source_write:
+ If this element is set to "false", source sites are not written
+ to the state point or source point file. This can substantially reduce the
+ size of state points if large numbers of particles per batch are used.
*Default*: true
+ :overwrite_latest:
+ If this element is set to "true", a source point file containing
+ the source bank will be written out to a separate file named
+ ``source.binary`` or ``source.h5`` depending on if HDF5 is enabled.
+ This file will be overwritten at every single batch so that the latest
+ source bank will be available. It should be noted that a user can set both
+ this element to "true" and specify batches to write a permanent source bank.
+
```` Element
------------------------------
@@ -1052,7 +1089,7 @@ sub-elements:
the PNG format can often times reduce the file size by orders of
magnitude without any loss of image quality. Likewise,
high-resolution voxel files produced by OpenMC can be quite large,
- but the equivalent SILO files will by significantly smaller.
+ but the equivalent SILO files will be significantly smaller.
*Default*: "slice"
diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst
index 30eaa5a32..53bfbe401 100644
--- a/docs/source/usersguide/install.rst
+++ b/docs/source/usersguide/install.rst
@@ -244,7 +244,15 @@ the root directory of the source code:
sudo make install
This will build an executable named ``openmc`` and install it (by default in
-/usr/local/bin).
+/usr/local/bin). If you do not have administrative privileges, you can install
+OpenMC locally by replacing the last command with:
+
+.. code-block:: sh
+
+ make install -e prefix=$HOME/.local
+
+The ``prefix`` variable can be changed to any path for which you have
+write-access.
Compiling on Windows
--------------------
@@ -320,10 +328,27 @@ Cross Section Configuration
In order to run a simulation with OpenMC, you will need cross section data for
each nuclide in your problem. Since OpenMC uses ACE format cross sections, you
-can use nuclear data that was processed with NJOY, such as that distributed with
-MCNP_ or Serpent_. The TALYS-based evaluated nuclear data library, TENDL_, is
+can use nuclear data that was processed with NJOY_, such as that distributed
+with MCNP_ or Serpent_. Several sources provide free processed ACE data as
+described below. The TALYS-based evaluated nuclear data library, TENDL_, is also
openly available in ACE format.
+Using ENDF/B-VII.1 Cross Sections from NNDC
+-------------------------------------------
+
+The NNDC_ provides ACE data from the ENDF/B-VII.1 neutron and thermal scattering
+sublibraries at four temperatures processed using NJOY_. To use this data with
+OpenMC, a script is provided with OpenMC that will automatically download,
+extract, and set up a confiuration file:
+
+.. code-block:: sh
+
+ cd openmc/data
+ python get_nndc_data.py
+
+At this point, you should set the :envvar:`CROSS_SECTIONS` environment variable
+to the absolute path of the file ``openmc/data/nndc/cross_sections.xml``.
+
Using JEFF Cross Sections from OECD/NEA
---------------------------------------
@@ -370,6 +395,8 @@ distribution to the location of the Serpent cross sections. Then, either set the
environment variable to the absolute path of the ``cross_sections_serpent.xml``
file.
+.. _NJOY: http://t2.lanl.gov/nis/codes.shtml
+.. _NNDC: http://www.nndc.bnl.gov/endf/b7.1/acefiles.html
.. _NEA: http://www.oecd-nea.org
.. _JEFF: http://www.oecd-nea.org/dbdata/jeff/
.. _here: http://www.oecd-nea.org/dbdata/pubs/jeff312-cd.html
diff --git a/docs/source/usersguide/processing.rst b/docs/source/usersguide/processing.rst
index fc426ba2f..c3a1ccaca 100644
--- a/docs/source/usersguide/processing.rst
+++ b/docs/source/usersguide/processing.rst
@@ -5,11 +5,11 @@ Data Processing and Visualization
=================================
This section is intended to explain in detail the recommended procedures for
-carrying out common tasks with OpenMC. While several utilities of varying
-complexity are provided to help automate the process, in many cases it will be
-extremely beneficial to do some coding in Python to quickly obtain results. In
-these cases, and for many of the provided utilities, it is necessary for your
-Python installation to contain:
+carrying out common post-processing tasks with OpenMC. While several utilities
+of varying complexity are provided to help automate the process, in many cases
+it will be extremely beneficial to do some coding in Python to quickly obtain
+results. In these cases, and for many of the provided utilities, it is necessary
+for your Python installation to contain:
* [1]_ `Numpy `_
* [1]_ `Scipy `_
@@ -41,6 +41,55 @@ Plotting in 2D
.. image:: ../_images/atr.png
:height: 200px
+See below for a simple example of a plots xml file that demonstrates the
+capabilities of 2D slice plots. Here we assume that there is a ``geometry.xml``
+file containing 7 cells.
+
+.. code-block:: xml
+
+
+
+
+
+ myplot
+ 0 0
+ 10 10
+ 2000 2000
+ 0 0 0
+
+
+
+
+
+
+ 1 3 4 5 6
+
+
+
+
+
+
+In this example, OpenMC will produce a plot named ``myplot.ppm`` when run in
+plotting mode. The picture will be on the xy-plane, depicting the rectangle
+between points (-5,-5) and (5,5) with 2000 pixels along each dimension. The
+color of each pixel is determined by placing a particle at the center of that
+pixel and using OpenMC's internal ``find_cell`` routine (the same one used for
+particle tracking during simulation) to determine the cell and material at that
+location. In this example, pixels are 10/2000=0.005 cm wide, so points will be
+at (-4.9975,-4.9975), (-4.9950,-4.9975), (-4.9925,-4.9975), etc. This is pointed
+out to demonstrate that this plot may miss any features smaller than 0.005 cm,
+since they could exist between pixel centers. More pixels can be used to resolve
+finer features, but could result in larger files.
+
+The ``background``, ``col_spec``, and ``mask`` elements define how to set pixel
+colors based on the cell ids at each pixel center. In this example, RGB colors
+are specified for cells 1,2,3,4, and 7, a random color will be assigned to cells
+5 and 6, and a black background color (``rgb="0 0 0"``) will be applied to
+locations where no cell is defined. However, the ``mask`` element here says that
+only cells 1,3,4,5, and 6 should be displayed, with other cells taking a white
+color (``rgb="255 255 255"``), which overrides the ``col_spec`` for cell 2 and
+the random color assigned to cell 7.
+
After running OpenMC to obtain PPM files, images should be saved to another
format before using them elsewhere. This cuts down the size of the file by
orders of magnitude. Most image viewers and editors that can view PPM images
@@ -53,7 +102,7 @@ Ubuntu: ``sudo apt-get install imagemagick``). Images are then converted like:
.. code-block:: sh
- convert plot.ppm plot.png
+ convert myplot.ppm myplot.png
Plotting in 3D
--------------
@@ -61,10 +110,37 @@ Plotting in 3D
.. image:: ../_images/3dgeomplot.png
:height: 200px
+See below for a simple example of a plots xml file that demonstrates the
+capabilities of 3D voxel plots.
+
+.. code-block:: xml
+
+
+
+
+
+ myplot
+ 0 0 0
+ 10 10 10
+ 500 500 500
+
+
+
+
+Voxel plots are built the same way 2D slice plots are, by determining the cell
+or material id of a particle at the center of each voxel. In this example, the
+space covered is the cube between the points (-5,-5,-5) and (5,5,5), with voxel
+centers 10/500 = 0.02 cm apart. The binary VOXEL files that are produced do not
+specify any color - instead containing only material or cell ids (material id
+in this example) - and thus the ``background``, ``col_spec``, and ``mask``
+elements are not used. If no cell is found at a voxel center, an id of -1 is
+stored.
+
The binary VOXEL files output by OpenMC can not be viewed directly by any
existing viewers. In order to view them, they must be converted into a standard
-mesh format that can be viewed in ParaView, Visit, etc. The provided utility
-voxel.py accomplishes this for SILO:
+mesh format that can be viewed in ParaView, Visit, etc. This typically will
+compress the size of the file significantly. The provided utility voxel.py
+accomplishes this for SILO:
.. code-block:: sh
@@ -88,13 +164,21 @@ or
Users can process the binary into any other format if desired by following the
example of voxel.py. For the binary file structure, see :ref:`devguide_voxel`.
+Once processed into a standard 3D file format, colors and masks can be defined
+using the stored id numbers to better explore the geometry. The process for
+doing this will depend on the 3D viewer, but should be straightforward.
+
+.. image:: ../_images/3dba.png
+ :height: 200px
+
.. note:: 3D voxel plotting can be very computer intensive for the viewing
program (Visit, Paraview, etc.) if the number of voxels is large (>10
million or so). Thus if you want an accurate picture that renders
smoothly, consider using only one voxel in a certain direction. For
- instance, the 3D pin lattice figure above was generated with a
- 500x500x1 voxel mesh, which allows for resolution of the cylinders
- without wasting too many voxels on the axial dimension.
+ instance, the 3D pin lattice figure at the beginning of this section
+ was generated with a 500x500x1 voxel mesh, which allows for resolution
+ of the cylinders without wasting too many voxels on the axial
+ dimension.
-------------------
diff --git a/docs/source/usersguide/troubleshoot.rst b/docs/source/usersguide/troubleshoot.rst
index a13272aa6..ba7e4405c 100644
--- a/docs/source/usersguide/troubleshoot.rst
+++ b/docs/source/usersguide/troubleshoot.rst
@@ -79,6 +79,14 @@ with the :envvar:`CROSS_SECTIONS` environment variable. It is recommended to add
a line in your ``.profile`` or ``.bash_profile`` setting the
:envvar:`CROSS_SECTIONS` environment variable.
+ERROR: Invalid usage of L(I) in ACE data; Consider using more recent data set.
+******************************************************************************
+
+The cross-sections requested in ``materials.xml`` do not conform to the current
+standard format. This typically happens with fissionable nuclides in a ``.6*c``
+library as distributed with MCNP. Please try a newer library such as any from
+the ``.7*c`` set.
+
Geometry Debugging
******************
@@ -107,8 +115,8 @@ have many particles travelling through them there will not be many locations
where overlaps are checked for in that region. The user should refer to the
output after a geometry debug run to see how many checks were performed in each
cell, and then adjust the number of starting particles or starting source
-distributions accordingly to achieve good coverage.
-
+distributions accordingly to achieve good coverage.
+
ERROR: After particle __ crossed surface __ it could not be located in any cell and it did not leak.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/DEPENDENCIES b/src/DEPENDENCIES
deleted file mode 100644
index 579bf26fb..000000000
--- a/src/DEPENDENCIES
+++ /dev/null
@@ -1,396 +0,0 @@
-ace.o: ace_header.o
-ace.o: constants.o
-ace.o: endf.o
-ace.o: error.o
-ace.o: fission.o
-ace.o: global.o
-ace.o: material_header.o
-ace.o: output.o
-ace.o: set_header.o
-ace.o: string.o
-
-ace_header.o: constants.o
-ace_header.o: endf_header.o
-
-cmfd_data.o: cmfd_header.o
-cmfd_data.o: constants.o
-cmfd_data.o: error.o
-cmfd_data.o: global.o
-cmfd_data.o: mesh.o
-cmfd_data.o: mesh_header.o
-cmfd_data.o: string.o
-cmfd_data.o: tally_header.o
-
-cmfd_execute.o: cmfd_data.o
-cmfd_execute.o: cmfd_jfnk_solver.o
-cmfd_execute.o: cmfd_power_solver.o
-cmfd_execute.o: constants.o
-cmfd_execute.o: error.o
-cmfd_execute.o: global.o
-cmfd_execute.o: mesh.o
-cmfd_execute.o: mesh_header.o
-cmfd_execute.o: output.o
-cmfd_execute.o: search.o
-cmfd_execute.o: tally.o
-
-cmfd_header.o: constants.o
-
-cmfd_input.o: cmfd_header.o
-cmfd_input.o: constants.o
-cmfd_input.o: error.o
-cmfd_input.o: global.o
-cmfd_input.o: mesh_header.o
-cmfd_input.o: output.o
-cmfd_input.o: string.o
-cmfd_input.o: tally.o
-cmfd_input.o: tally_header.o
-cmfd_input.o: tally_initialize.o
-cmfd_input.o: xml_interface.o
-
-cmfd_jfnk_solver.o: cmfd_loss_operator.o
-cmfd_jfnk_solver.o: cmfd_power_solver.o
-cmfd_jfnk_solver.o: cmfd_prod_operator.o
-cmfd_jfnk_solver.o: constants.o
-cmfd_jfnk_solver.o: global.o
-cmfd_jfnk_solver.o: matrix_header.o
-cmfd_jfnk_solver.o: solver_interface.o
-cmfd_jfnk_solver.o: vector_header.o
-
-cmfd_loss_operator.o: constants.o
-cmfd_loss_operator.o: global.o
-cmfd_loss_operator.o: matrix_header.o
-
-cmfd_power_solver.o: cmfd_loss_operator.o
-cmfd_power_solver.o: cmfd_prod_operator.o
-cmfd_power_solver.o: constants.o
-cmfd_power_solver.o: global.o
-cmfd_power_solver.o: matrix_header.o
-cmfd_power_solver.o: solver_interface.o
-cmfd_power_solver.o: vector_header.o
-
-cmfd_prod_operator.o: constants.o
-cmfd_prod_operator.o: global.o
-cmfd_prod_operator.o: matrix_header.o
-
-cmfd_slepc_solver.o: cmfd_loss_operator.o
-cmfd_slepc_solver.o: cmfd_prod_operator.o
-cmfd_slepc_solver.o: constants.o
-cmfd_slepc_solver.o: global.o
-
-cross_section.o: ace_header.o
-cross_section.o: constants.o
-cross_section.o: error.o
-cross_section.o: fission.o
-cross_section.o: global.o
-cross_section.o: material_header.o
-cross_section.o: particle_header.o
-cross_section.o: random_lcg.o
-cross_section.o: search.o
-
-doppler.o: constants.o
-
-eigenvalue.o: cmfd_execute.o
-eigenvalue.o: constants.o
-eigenvalue.o: error.o
-eigenvalue.o: global.o
-eigenvalue.o: math.o
-eigenvalue.o: mesh.o
-eigenvalue.o: mesh_header.o
-eigenvalue.o: output.o
-eigenvalue.o: particle_header.o
-eigenvalue.o: random_lcg.o
-eigenvalue.o: search.o
-eigenvalue.o: source.o
-eigenvalue.o: state_point.o
-eigenvalue.o: string.o
-eigenvalue.o: tally.o
-eigenvalue.o: tracking.o
-
-endf.o: constants.o
-endf.o: string.o
-
-energy_grid.o: constants.o
-energy_grid.o: global.o
-energy_grid.o: list_header.o
-energy_grid.o: output.o
-
-error.o: global.o
-
-finalize.o: global.o
-finalize.o: hdf5_interface.o
-finalize.o: output.o
-finalize.o: tally.o
-
-fission.o: ace_header.o
-fission.o: constants.o
-fission.o: error.o
-fission.o: global.o
-fission.o: interpolation.o
-fission.o: search.o
-
-fixed_source.o: constants.o
-fixed_source.o: global.o
-fixed_source.o: output.o
-fixed_source.o: particle_header.o
-fixed_source.o: random_lcg.o
-fixed_source.o: source.o
-fixed_source.o: state_point.o
-fixed_source.o: string.o
-fixed_source.o: tally.o
-fixed_source.o: tracking.o
-
-geometry.o: constants.o
-geometry.o: error.o
-geometry.o: geometry_header.o
-geometry.o: global.o
-geometry.o: output.o
-geometry.o: particle_header.o
-geometry.o: particle_restart_write.o
-geometry.o: string.o
-geometry.o: tally.o
-
-global.o: ace_header.o
-global.o: bank_header.o
-global.o: cmfd_header.o
-global.o: constants.o
-global.o: dict_header.o
-global.o: geometry_header.o
-global.o: hdf5_interface.o
-global.o: material_header.o
-global.o: mesh_header.o
-global.o: plot_header.o
-global.o: set_header.o
-global.o: source_header.o
-global.o: tally_header.o
-global.o: timer_header.o
-
-hdf5_summary.o: ace_header.o
-hdf5_summary.o: constants.o
-hdf5_summary.o: endf.o
-hdf5_summary.o: geometry_header.o
-hdf5_summary.o: global.o
-hdf5_summary.o: material_header.o
-hdf5_summary.o: mesh_header.o
-hdf5_summary.o: output.o
-hdf5_summary.o: output_interface.o
-hdf5_summary.o: string.o
-hdf5_summary.o: tally_header.o
-
-initialize.o: ace.o
-initialize.o: bank_header.o
-initialize.o: constants.o
-initialize.o: dict_header.o
-initialize.o: energy_grid.o
-initialize.o: error.o
-initialize.o: geometry.o
-initialize.o: geometry_header.o
-initialize.o: global.o
-initialize.o: hdf5_interface.o
-initialize.o: hdf5_summary.o
-initialize.o: input_xml.o
-initialize.o: output.o
-initialize.o: output_interface.o
-initialize.o: random_lcg.o
-initialize.o: source.o
-initialize.o: state_point.o
-initialize.o: string.o
-initialize.o: tally_header.o
-initialize.o: tally_initialize.o
-
-input_xml.o: cmfd_input.o
-input_xml.o: constants.o
-input_xml.o: dict_header.o
-input_xml.o: error.o
-input_xml.o: geometry_header.o
-input_xml.o: global.o
-input_xml.o: list_header.o
-input_xml.o: mesh_header.o
-input_xml.o: output.o
-input_xml.o: plot_header.o
-input_xml.o: random_lcg.o
-input_xml.o: string.o
-input_xml.o: tally_header.o
-input_xml.o: tally_initialize.o
-input_xml.o: xml_interface.o
-
-interpolation.o: constants.o
-interpolation.o: endf_header.o
-interpolation.o: error.o
-interpolation.o: global.o
-interpolation.o: search.o
-interpolation.o: string.o
-
-list_header.o: constants.o
-
-main.o: constants.o
-main.o: eigenvalue.o
-main.o: finalize.o
-main.o: fixed_source.o
-main.o: global.o
-main.o: initialize.o
-main.o: particle_restart.o
-main.o: plot.o
-
-math.o: constants.o
-math.o: random_lcg.o
-
-matrix_header.o: constants.o
-matrix_header.o: vector_header.o
-
-mesh.o: constants.o
-mesh.o: global.o
-mesh.o: mesh_header.o
-mesh.o: particle_header.o
-mesh.o: search.o
-
-output.o: ace_header.o
-output.o: constants.o
-output.o: endf.o
-output.o: error.o
-output.o: geometry_header.o
-output.o: global.o
-output.o: math.o
-output.o: mesh.o
-output.o: mesh_header.o
-output.o: particle_header.o
-output.o: plot_header.o
-output.o: string.o
-output.o: tally_header.o
-
-output_interface.o: constants.o
-output_interface.o: error.o
-output_interface.o: global.o
-output_interface.o: hdf5_interface.o
-output_interface.o: mpiio_interface.o
-output_interface.o: tally_header.o
-
-particle_header.o: constants.o
-particle_header.o: geometry_header.o
-
-particle_restart.o: bank_header.o
-particle_restart.o: constants.o
-particle_restart.o: geometry_header.o
-particle_restart.o: global.o
-particle_restart.o: output.o
-particle_restart.o: output_interface.o
-particle_restart.o: particle_header.o
-particle_restart.o: random_lcg.o
-particle_restart.o: tracking.o
-
-particle_restart_write.o: bank_header.o
-particle_restart_write.o: global.o
-particle_restart_write.o: output_interface.o
-particle_restart_write.o: particle_header.o
-particle_restart_write.o: string.o
-
-physics.o: ace_header.o
-physics.o: constants.o
-physics.o: endf.o
-physics.o: error.o
-physics.o: fission.o
-physics.o: global.o
-physics.o: interpolation.o
-physics.o: material_header.o
-physics.o: math.o
-physics.o: mesh.o
-physics.o: output.o
-physics.o: particle_header.o
-physics.o: particle_restart_write.o
-physics.o: random_lcg.o
-physics.o: search.o
-physics.o: string.o
-
-plot.o: constants.o
-plot.o: error.o
-plot.o: geometry.o
-plot.o: geometry_header.o
-plot.o: global.o
-plot.o: output.o
-plot.o: particle_header.o
-plot.o: plot_header.o
-plot.o: ppmlib.o
-plot.o: string.o
-
-plot_header.o: constants.o
-
-random_lcg.o: global.o
-
-search.o: error.o
-search.o: global.o
-
-set_header.o: constants.o
-set_header.o: list_header.o
-
-solver_interface.o: error.o
-solver_interface.o: global.o
-solver_interface.o: matrix_header.o
-solver_interface.o: vector_header.o
-
-source.o: bank_header.o
-source.o: constants.o
-source.o: error.o
-source.o: geometry.o
-source.o: geometry_header.o
-source.o: global.o
-source.o: math.o
-source.o: output.o
-source.o: particle_header.o
-source.o: random_lcg.o
-source.o: string.o
-
-state_point.o: constants.o
-state_point.o: error.o
-state_point.o: global.o
-state_point.o: output.o
-state_point.o: output_interface.o
-state_point.o: string.o
-state_point.o: tally_header.o
-
-string.o: constants.o
-string.o: error.o
-string.o: global.o
-
-tally.o: ace_header.o
-tally.o: constants.o
-tally.o: error.o
-tally.o: global.o
-tally.o: math.o
-tally.o: mesh.o
-tally.o: mesh_header.o
-tally.o: output.o
-tally.o: particle_header.o
-tally.o: search.o
-tally.o: string.o
-tally.o: tally_header.o
-
-tally_header.o: constants.o
-
-tally_initialize.o: constants.o
-tally_initialize.o: global.o
-tally_initialize.o: tally_header.o
-
-timer_header.o: constants.o
-
-track_output.o: global.o
-track_output.o: output_interface.o
-track_output.o: particle_header.o
-track_output.o: string.o
-
-tracking.o: cross_section.o
-tracking.o: error.o
-tracking.o: geometry.o
-tracking.o: geometry_header.o
-tracking.o: global.o
-tracking.o: output.o
-tracking.o: particle_header.o
-tracking.o: physics.o
-tracking.o: random_lcg.o
-tracking.o: string.o
-tracking.o: tally.o
-tracking.o: track_output.o
-
-vector_header.o: constants.o
-
-xml_interface.o: constants.o
-xml_interface.o: error.o
-xml_interface.o: global.o
diff --git a/src/ace.F90 b/src/ace.F90
index aa6de5ab6..ea97c80be 100644
--- a/src/ace.F90
+++ b/src/ace.F90
@@ -942,6 +942,7 @@ contains
integer :: NEa ! number of energies for Watt 'a'
integer :: NRb ! number of interpolation regions for Watt 'b'
integer :: NEb ! number of energies for Watt 'b'
+ real(8), allocatable :: L(:) ! locations of distributions for each Ein
! initialize length
length = 0
@@ -966,6 +967,22 @@ contains
! Continuous tabular distribution
NR = int(XSS(lc + 1))
NE = int(XSS(lc + 2 + 2*NR))
+ ! Before progressing, check to see if data set uses L(I) values
+ ! in a way inconsistent with the current form of the ACE Format Guide
+ ! (MCNP5 Manual, Vol 3)
+ allocate(L(NE))
+ L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1))
+ do i = 1,NE
+ ! Now check to see if L(i) is equal to any other entries
+ ! If so, then we must exit
+ if (count(L == L(i)) > 1) then
+ message = "Invalid usage of L(I) in ACE data; &
+ &Consider using more recent data set."
+ call fatal_error()
+ end if
+ end do
+ deallocate(L)
+ ! Continue with finding data length
length = length + 2 + 2*NR + 2*NE
do i = 1,NE
! determine length
@@ -1008,6 +1025,22 @@ contains
! Kalbach-Mann correlated scattering
NR = int(XSS(lc + 1))
NE = int(XSS(lc + 2 + 2*NR))
+ ! Before progressing, check to see if data set uses L(I) values
+ ! in a way inconsistent with the current form of the ACE Format Guide
+ ! (MCNP5 Manual, Vol 3)
+ allocate(L(NE))
+ L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1))
+ do i = 1,NE
+ ! Now check to see if L(i) is equal to any other entries
+ ! If so, then we must exit
+ if (count(L == L(i)) > 1) then
+ message = "Invalid usage of L(I) in ACE data; &
+ &Consider using more recent data set."
+ call fatal_error()
+ end if
+ end do
+ deallocate(L)
+ ! Continue with finding data length
length = length + 2 + 2*NR + 2*NE
do i = 1,NE
NP = int(XSS(lc + length + 2))
@@ -1022,6 +1055,22 @@ contains
! Correlated energy and angle distribution
NR = int(XSS(lc + 1))
NE = int(XSS(lc + 2 + 2*NR))
+ ! Before progressing, check to see if data set uses L(I) values
+ ! in a way inconsistent with the current form of the ACE Format Guide
+ ! (MCNP5 Manual, Vol 3)
+ allocate(L(NE))
+ L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1))
+ do i = 1,NE
+ ! Now check to see if L(i) is equal to any other entries
+ ! If so, then we must exit
+ if (count(L == L(i)) > 1) then
+ message = "Invalid usage of L(I) in ACE data; &
+ &Consider using more recent data set."
+ call fatal_error()
+ end if
+ end do
+ deallocate(L)
+ ! Continue with finding data length
length = length + 2 + 2*NR + 2*NE
do i = 1,NE
! outgoing energy distribution
@@ -1054,6 +1103,22 @@ contains
! Laboratory energy-angle law
NR = int(XSS(lc + 1))
NE = int(XSS(lc + 2 + 2*NR))
+ ! Before progressing, check to see if data set uses L(I) values
+ ! in a way inconsistent with the current form of the ACE Format Guide
+ ! (MCNP5 Manual, Vol 3)
+ allocate(L(NE))
+ L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1))
+ do i = 1,NE
+ ! Now check to see if L(i) is equal to any other entries
+ ! If so, then we must exit
+ if (count(L == L(i)) > 1) then
+ message = "Invalid usage of L(I) in ACE data; &
+ &Consider using more recent data set."
+ call fatal_error()
+ end if
+ end do
+ deallocate(L)
+ ! Continue with finding data length
NMU = int(XSS(lc + 4 + 2*NR + 2*NE))
length = 4 + 2*(NR + NE + NMU)
diff --git a/src/constants.F90 b/src/constants.F90
index 6fea8cbc1..909146014 100644
--- a/src/constants.F90
+++ b/src/constants.F90
@@ -11,13 +11,14 @@ module constants
integer, parameter :: VERSION_RELEASE = 3
! Revision numbers for binary files
- integer, parameter :: REVISION_STATEPOINT = 10
+ integer, parameter :: REVISION_STATEPOINT = 11
integer, parameter :: REVISION_PARTICLE_RESTART = 1
! Binary file types
integer, parameter :: &
FILETYPE_STATEPOINT = -1, &
- FILETYPE_PARTICLE_RESTART = -2
+ FILETYPE_PARTICLE_RESTART = -2, &
+ FILETYPE_SOURCE = -3
! ============================================================================
! ADJUSTABLE PARAMETERS
diff --git a/src/eigenvalue.F90 b/src/eigenvalue.F90
index 4047f815f..4d3202569 100644
--- a/src/eigenvalue.F90
+++ b/src/eigenvalue.F90
@@ -17,7 +17,7 @@ module eigenvalue
use random_lcg, only: prn, set_particle_seed, prn_skip
use search, only: binary_search
use source, only: get_source_particle
- use state_point, only: write_state_point
+ use state_point, only: write_state_point, write_source_point
use string, only: to_str
use tally, only: synchronize_tallies, setup_active_usertallies, &
reset_result
@@ -222,6 +222,12 @@ contains
call write_state_point()
end if
+ ! Write out source point if it's been specified for this batch
+ if ((sourcepoint_batch % contains(current_batch) .or. source_latest) .and. &
+ source_write) then
+ call write_source_point()
+ end if
+
if (master .and. current_batch == n_batches) then
! Make sure combined estimate of k-effective is calculated at the last
! batch in case no state point is written
diff --git a/src/global.F90 b/src/global.F90
index c3dbf0aa2..c27f34f9e 100644
--- a/src/global.F90
+++ b/src/global.F90
@@ -189,6 +189,7 @@ module global
! Write source at end of simulation
logical :: source_separate = .false.
logical :: source_write = .true.
+ logical :: source_latest = .false.
! ============================================================================
! PARALLEL PROCESSING VARIABLES
@@ -260,6 +261,7 @@ module global
character(MAX_FILE_LEN) :: path_cross_sections ! Path to cross_sections.xml
character(MAX_FILE_LEN) :: path_source = '' ! Path to binary source
character(MAX_FILE_LEN) :: path_state_point ! Path to binary state point
+ character(MAX_FILE_LEN) :: path_source_point ! Path to binary source point
character(MAX_FILE_LEN) :: path_particle_restart ! Path to particle restart
character(MAX_FILE_LEN) :: path_output = '' ! Path to output directory
@@ -363,6 +365,10 @@ module global
integer :: n_state_points = 0
type(SetInt) :: statepoint_batch
+ ! Information about source points to be written
+ integer :: n_source_points = 0
+ type(SetInt) :: sourcepoint_batch
+
! Various output options
logical :: output_summary = .false.
logical :: output_xs = .false.
diff --git a/src/initialize.F90 b/src/initialize.F90
index c1fbf40cd..52869a281 100644
--- a/src/initialize.F90
+++ b/src/initialize.F90
@@ -363,8 +363,50 @@ contains
case (FILETYPE_PARTICLE_RESTART)
path_particle_restart = argv(i)
particle_restart_run = .true.
+ case default
+ message = "Unrecognized file after restart flag."
+ call fatal_error()
end select
+ ! If its a restart run check for additional source file
+ if (restart_run .and. i + 1 <= argc) then
+
+ ! Increment arg
+ i = i + 1
+
+ ! Check if it has extension we can read
+ if ((ends_with(argv(i), '.binary') .or. &
+ ends_with(argv(i), '.h5'))) then
+
+ ! Check file type is a source file
+ call sp % file_open(argv(i), 'r', serial = .false.)
+ call sp % read_data(filetype, 'filetype')
+ call sp % file_close()
+ if (filetype /= FILETYPE_SOURCE) then
+ message = "Second file after restart flag must be a source file"
+ call fatal_error()
+ end if
+
+ ! It is a source file
+ path_source_point = argv(i)
+
+ else ! Different option is specified not a source file
+
+ ! Source is in statepoint file
+ path_source_point = path_state_point
+
+ ! Set argument back
+ i = i - 1
+
+ end if
+
+ else ! No command line arg after statepoint
+
+ ! Source is assumed to be in statepoint file
+ path_source_point = path_state_point
+
+ end if
+
case ('-g', '-geometry-debug', '--geometry-debug')
check_overlaps = .true.
diff --git a/src/input_xml.F90 b/src/input_xml.F90
index ae4e4b1b2..fffd4a54e 100644
--- a/src/input_xml.F90
+++ b/src/input_xml.F90
@@ -625,20 +625,6 @@ contains
n_state_points = 1
call statepoint_batch % add(n_batches)
end if
-
- ! Check if the user has specified to write binary source file
- if (check_for_node(node_sp, "source_separate")) then
- call get_node_value(node_sp, "source_separate", temp_str)
- call lower_case(temp_str)
- if (trim(temp_str) == 'true' .or. &
- trim(temp_str) == '1') source_separate = .true.
- end if
- if (check_for_node(node_sp, "source_write")) then
- call get_node_value(node_sp, "source_write", temp_str)
- call lower_case(temp_str)
- if (trim(temp_str) == 'false' .or. &
- trim(temp_str) == '0') source_write = .false.
- end if
else
! If no tag was present, by default write state point at
! last batch only
@@ -646,6 +632,85 @@ contains
call statepoint_batch % add(n_batches)
end if
+ ! Check if the user has specified to write source points
+ if (check_for_node(doc, "source_point")) then
+
+ ! Get pointer to source_point node
+ call get_node_ptr(doc, "source_point", node_sp)
+
+ ! Determine number of batches at which to store source points
+ if (check_for_node(node_sp, "batches")) then
+ n_source_points = get_arraysize_integer(node_sp, "batches")
+ else
+ n_source_points = 0
+ end if
+
+ if (n_source_points > 0) then
+ ! User gave specific batches to write source points
+ allocate(temp_int_array(n_source_points))
+ call get_node_array(node_sp, "batches", temp_int_array)
+ do i = 1, n_source_points
+ 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
+ do i = 1, n_state_points
+ call sourcepoint_batch % add(statepoint_batch % get_item(i))
+ end do
+ end if
+
+ ! Check if the user has specified to write binary source file
+ if (check_for_node(node_sp, "separate")) then
+ call get_node_value(node_sp, "separate", temp_str)
+ call lower_case(temp_str)
+ if (trim(temp_str) == 'true' .or. &
+ trim(temp_str) == '1') source_separate = .true.
+ end if
+ if (check_for_node(node_sp, "write")) then
+ call get_node_value(node_sp, "write", temp_str)
+ call lower_case(temp_str)
+ if (trim(temp_str) == 'false' .or. &
+ trim(temp_str) == '0') source_write = .false.
+ end if
+ if (check_for_node(node_sp, "overwrite_latest")) then
+ call get_node_value(node_sp, "overwrite_latest", temp_str)
+ call lower_case(temp_str)
+ if (trim(temp_str) == 'true' .or. &
+ trim(temp_str) == '1') source_latest = .true.
+ end if
+ else
+ ! If no tag was present, by default we keep source bank in
+ ! statepoint file and write it out at statepoints intervals
+ source_separate = .false.
+ n_source_points = n_state_points
+ do i = 1, n_state_points
+ call sourcepoint_batch % add(statepoint_batch % get_item(i))
+ end do
+ end if
+
+ ! If source is not seperate and is to be written out in the statepoint file,
+ ! make sure that the sourcepoint batch numbers are contained in the
+ ! statepoint list
+ if (.not. source_separate) then
+ do i = 1, n_source_points
+ if (.not. statepoint_batch % contains(sourcepoint_batch % &
+ get_item(i))) then
+ message = 'Sourcepoint batches are not a subset&
+ & of statepoint batches.'
+ call fatal_error()
+ end if
+ end do
+ end if
+
! Check if the user has specified to not reduce tallies at the end of every
! batch
if (check_for_node(doc, "no_reduce")) then
diff --git a/src/relaxng/settings.rnc b/src/relaxng/settings.rnc
index 6af675440..58699a2a2 100644
--- a/src/relaxng/settings.rnc
+++ b/src/relaxng/settings.rnc
@@ -92,11 +92,22 @@ element settings {
attribute batches { list { xsd:positiveInteger+ } }) |
(element interval { xsd:positiveInteger } |
attribute interval { xsd:positiveInteger })
- ) &
- (element source_separate { xsd:boolean } |
- attribute source_separate { xsd:boolean })? &
- (element source_write { xsd:boolean } |
- attribute source_write { xsd:boolean })?
+ )
+ }? &
+
+ element source_point {
+ (
+ (element batches { list { xsd:positiveInteger+ } } |
+ attribute batches { list { xsd:positiveInteger+ } }) |
+ (element interval { xsd:positiveInteger } |
+ attribute interval { xsd:positiveInteger })
+ )? &
+ (element separate { xsd:boolean } |
+ attribute separate { xsd:boolean })? &
+ (element write { xsd:boolean } |
+ attribute write { xsd:boolean })? &
+ (element overwrite_latest { xsd:boolean} |
+ attribute overwrite_latest {xsd:boolean})?
}? &
element survival_biasing { xsd:boolean }? &
diff --git a/src/source.F90 b/src/source.F90
index 231a23cc5..2d3f74ec9 100644
--- a/src/source.F90
+++ b/src/source.F90
@@ -1,16 +1,17 @@
module source
- use bank_header, only: Bank
+ use bank_header, only: Bank
use constants
- use error, only: fatal_error
- use geometry, only: find_cell
- use geometry_header, only: BASE_UNIVERSE
+ use error, only: fatal_error
+ use geometry, only: find_cell
+ use geometry_header, only: BASE_UNIVERSE
use global
- use math, only: maxwell_spectrum, watt_spectrum
- use output, only: write_message
- use particle_header, only: Particle
- use random_lcg, only: prn, set_particle_seed
- use string, only: to_str
+ use math, only: maxwell_spectrum, watt_spectrum
+ use output, only: write_message
+ use output_interface, only: BinaryOutput
+ use particle_header, only: Particle
+ use random_lcg, only: prn, set_particle_seed
+ use string, only: to_str
#ifdef MPI
use mpi
@@ -28,8 +29,9 @@ contains
integer(8) :: i ! loop index over bank sites
integer(8) :: id ! particle id
-
+ integer(4) :: itmp ! temporary integer
type(Bank), pointer :: src => null() ! source bank site
+ type(BinaryOutput) :: sp ! statepoint/source binary file
message = "Initializing source particles..."
call write_message(6)
@@ -38,8 +40,26 @@ contains
! Read the source from a binary file instead of sampling from some
! assumed source distribution
- message = 'This feature is currently disabled and will be added back in.'
- call fatal_error()
+ message = 'Reading source file from ' // trim(path_source) // '...'
+ call write_message(6)
+
+ ! Open the binary file
+ call sp % file_open(path_source, 'r', serial = .false.)
+
+ ! Read the file type
+ call sp % read_data(itmp, "filetype")
+
+ ! Check to make sure this is a source file
+ if (itmp /= FILETYPE_SOURCE) then
+ message = "Specified starting source file not a source file type."
+ call fatal_error()
+ end if
+
+ ! Read in the source bank
+ call sp % read_source_bank()
+
+ ! Close file
+ call sp % file_close()
else
! Generation source sites from specified distribution in user input
diff --git a/src/state_point.F90 b/src/state_point.F90
index e13cd8f48..4cf62c7c1 100644
--- a/src/state_point.F90
+++ b/src/state_point.F90
@@ -232,6 +232,13 @@ contains
end if
+ ! Indicate where source bank is stored in statepoint
+ if (source_separate) then
+ call sp % write_data(0, "source_present")
+ else
+ call sp % write_data(1, "source_present")
+ end if
+
! Check for the no-tally-reduction method
if (.not. reduce_tallies) then
! If using the no-tally-reduction method, we need to collect tally
@@ -280,14 +287,45 @@ contains
end if
- ! Check for eigenvalue calculation
- if (run_mode == MODE_EIGENVALUE .and. source_write) then
+ end subroutine write_state_point
- ! Check for writing source out separately
+!===============================================================================
+! WRITE_SOURCE_POINT
+!===============================================================================
+
+ subroutine write_source_point()
+
+ type(BinaryOutput) :: sp
+ character(MAX_FILE_LEN) :: filename
+
+ ! Check to write out source for a specified batch
+ if (sourcepoint_batch % contains(current_batch)) then
+
+ ! Create or open up file
if (source_separate) then
- ! Set filename for source
- filename = trim(path_output) // 'source.' // &
+ ! Set filename
+ filename = trim(path_output) // 'source.' // trim(to_str(current_batch))
+#ifdef HDF5
+ filename = trim(filename) // '.h5'
+#else
+ filename = trim(filename) // '.binary'
+#endif
+
+ ! Write message for new file creation
+ message = "Creating source file " // trim(filename) // "..."
+ call write_message(1)
+
+ ! Create separate source file
+ call sp % file_create(filename, serial = .false.)
+
+ ! Write file type
+ call sp % write_data(FILETYPE_SOURCE, "filetype")
+
+ else
+
+ ! Set filename for state point
+ filename = trim(path_output) // 'statepoint.' // &
trim(to_str(current_batch))
#ifdef HDF5
filename = trim(filename) // '.h5'
@@ -295,16 +333,7 @@ contains
filename = trim(filename) // '.binary'
#endif
- ! Write message
- message = "Creating source file " // trim(filename) // "..."
- call write_message(1)
-
- ! Create source file
- call sp % file_create(filename, serial = .false.)
-
- else
-
- ! Reopen state point file in parallel
+ ! Reopen statepoint file in parallel
call sp % file_open(filename, 'w', serial = .false.)
end if
@@ -317,7 +346,36 @@ contains
end if
- end subroutine write_state_point
+ ! Also check to write source separately in overwritten file
+ if (source_latest) then
+
+ ! Set filename
+ filename = trim(path_output) // 'source'
+#ifdef HDF5
+ filename = trim(filename) // '.h5'
+#else
+ filename = trim(filename) // '.binary'
+#endif
+
+ ! Write message for new file creation
+ message = "Creating source file " // trim(filename) // "..."
+ call write_message(1)
+
+ ! Always create this file because it will be overwritten
+ call sp % file_create(filename, serial = .false.)
+
+ ! Write file type
+ call sp % write_data(FILETYPE_SOURCE, "filetype")
+
+ ! Write out source
+ call sp % write_source_bank()
+
+ ! Close file
+ call sp % file_close()
+
+ end if
+
+ end subroutine write_source_point
!===============================================================================
! WRITE_TALLY_RESULTS_NR
@@ -467,6 +525,7 @@ contains
integer :: length(4)
integer :: int_array(3)
integer, allocatable :: temp_array(:)
+ logical :: source_present
real(8) :: real_array(3)
type(TallyObject), pointer :: t => null()
@@ -671,6 +730,20 @@ contains
end do TALLY_METADATA
+ ! Check for source in statepoint if needed
+ call sp % read_data(int_array(1), "source_present")
+ if (int_array(1) == 1) then
+ source_present = .true.
+ else
+ source_present = .false.
+ end if
+
+ ! Check to make sure source bank is present
+ if (path_source_point == path_state_point .and. .not. source_present) then
+ message = "Source bank must be contained in statepoint restart file"
+ call fatal_error()
+ end if
+
! Read tallies to master
if (master) then
@@ -711,26 +784,20 @@ contains
if (run_mode == MODE_EIGENVALUE) then
! Check if source was written out separately
- if (source_separate) then
+ if (.not. source_present) then
! Close statepoint file
call sp % file_close()
- ! Set filename for source
- filename = trim(path_output) // 'source.' // &
- trim(to_str(restart_batch))
-#ifdef HDF5
- filename = trim(filename) // '.h5'
-#else
- filename = trim(filename) // '.binary'
-#endif
-
! Write message
message = "Loading source file " // trim(filename) // "..."
call write_message(1)
! Open source file
- call sp % file_open(filename, 'r', serial = .false.)
+ call sp % file_open(path_source_point, 'r', serial = .false.)
+
+ ! Read file type
+ call sp % read_data(int_array(1), "filetype")
end if
diff --git a/src/utils/convert_xsdir.py b/src/utils/convert_xsdir.py
index 32315f1ed..edee1a66c 100755
--- a/src/utils/convert_xsdir.py
+++ b/src/utils/convert_xsdir.py
@@ -35,8 +35,12 @@ class Xsdir(object):
words = line.split()
if words:
if words[0].lower().startswith('datapath'):
- index = line.index('=')
- self.datapath = line[index+1:].strip()
+ if '=' in words[0]:
+ index = line.index('=')
+ self.datapath = line[index+1:].strip()
+ else:
+ if len(line.strip()) > 8:
+ self.datapath = line[8:].strip()
else:
self.f.seek(0)
diff --git a/src/utils/plot_mesh_tally.py b/src/utils/plot_mesh_tally.py
index c70b29165..fb5b8cb83 100755
--- a/src/utils/plot_mesh_tally.py
+++ b/src/utils/plot_mesh_tally.py
@@ -1,294 +1,271 @@
#!/usr/bin/env python2
-'''Python script to plot tally data generated by OpenMC.'''
+"""Python script to plot tally data generated by OpenMC."""
+import os
import sys
-from statepoint import *
-# Color intensity dependent on individual score?
-
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
-import matplotlib.pyplot as plt
+from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
+from matplotlib.backends.backend_tkagg import NavigationToolbar2TkAgg
from matplotlib.figure import Figure
-from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
-from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
+import matplotlib.pyplot as plt
import numpy as np
-class AppForm(QMainWindow):
- def __init__(self, argv, parent=None):
- QMainWindow.__init__(self, parent)
+from statepoint import *
+
+if sys.version_info[0] < 3:
+ import Tkinter as tk
+else:
+ import tkinter as tk
+import tkFileDialog
+import tkFont
+import tkMessageBox
+import ttk
+
+
+class MeshPlotter(tk.Frame):
+ def __init__(self, parent, filename):
+ tk.Frame.__init__(self, parent)
+
+ self.labels = {'cell': 'Cell:', 'cellborn': 'Cell born:',
+ 'surface': 'Surface:', 'material': 'Material:',
+ 'universe': 'Universe:', 'energyin': 'Energy in:',
+ 'energyout': 'Energy out:'}
+
+ self.filterBoxes = {}
# Read data from source or leakage fraction file
- self.all_good = False
- while not self.all_good:
- if len(argv) > 1:
- cl_file = str(argv[1])
- else:
- cl_file = None
- self.get_file_data(cl_file)
- # Check that there are any mesh tallies at all
- if len(self.tally_ids) != 0:
- self.all_good = True
- else:
- # if there are not, the user will be given the choice to choose
- # another file (but only if using interactive chooser)
- if cl_file is None:
- choice = QMessageBox.critical(None, "Invalid StatePoint File",
- "File Does Not Contain Mesh " +
- "Tallies!" +
- "\nSelect Another File Or Quit",
- QMessageBox.Retry,
- QMessageBox.Abort)
- if choice == QMessageBox.Abort:
- self.all_good = False
- break
- else:
- print("Invalid StatePoint File; File Does Not Contain " +
- "Mesh Tallies!")
- self.all_good = False
- break
+ self.get_file_data(filename)
+ # Set up top-level window
+ top = self.winfo_toplevel()
+ top.title('Mesh Tally Plotter: ' + filename)
+ top.rowconfigure(0, weight=1)
+ top.columnconfigure(0, weight=1)
+ self.grid(sticky=tk.W+tk.N)
- if self.all_good:
- # Set maximum colorbar value by maximum tally data value
- self.maxvalue = self.datafile.tallies[0].results.max()
+ # Create widgets and draw to screen
+ self.create_widgets()
+ self.update()
- self.main_frame = QWidget()
- self.setCentralWidget(self.main_frame)
+ def create_widgets(self):
+ figureFrame = tk.Frame(self)
+ figureFrame.grid(row=0, column=0)
- # Create the Figure, Canvas, and Axes
- self.dpi = 100
- self.fig = Figure((5.0, 15.0), dpi=self.dpi)
- self.canvas = FigureCanvas(self.fig)
- self.canvas.setParent(self.main_frame)
- self.axes = self.fig.add_subplot(111)
+ # Create the Figure and Canvas
+ self.dpi = 100
+ self.fig = Figure((5.0, 5.0), dpi=self.dpi)
+ self.canvas = FigureCanvasTkAgg(self.fig, master=figureFrame)
+ self.canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1)
- # Create the navigation toolbar, tied to the canvas
- self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame)
+ # Create the navigation toolbar, tied to the canvas
+ self.mpl_toolbar = NavigationToolbar2TkAgg(self.canvas, figureFrame)
+ self.mpl_toolbar.update()
+ self.canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=1)
- # Grid layout at bottom
- self.grid = QGridLayout()
+ # Create frame for comboboxes
+ self.selectFrame = tk.Frame(self)
+ self.selectFrame.grid(row=1, column=0, sticky=tk.W+tk.E)
- # Overall layout
- self.vbox = QVBoxLayout()
- self.vbox.addWidget(self.canvas)
- self.vbox.addWidget(self.mpl_toolbar)
- self.vbox.addLayout(self.grid)
- self.main_frame.setLayout(self.vbox)
+ # Tally selection
+ labelTally = tk.Label(self.selectFrame, text='Tally:')
+ labelTally.grid(row=0, column=0, sticky=tk.W)
+ self.tallyBox = ttk.Combobox(self.selectFrame, state='readonly')
+ self.tallyBox['values'] = [self.datafile.tallies[i].id
+ for i in self.meshTallies]
+ self.tallyBox.current(0)
+ self.tallyBox.grid(row=0, column=1, sticky=tk.W+tk.E)
+ self.tallyBox.bind('<>', self.update)
- # Tally selections
- label_tally = QLabel("Tally:")
- self.tally = QComboBox()
- # Only show options for the tallies with meshes
- self.tally.addItems([str(i + 1) for i in self.tally_ids])
- self.connect(self.tally, SIGNAL('activated(int)'),
- self._update)
- self.connect(self.tally, SIGNAL('activated(int)'),
- self.populate_boxes)
- self.connect(self.tally, SIGNAL('activated(int)'),
- self.on_draw)
+ # Planar basis selection
+ labelBasis = tk.Label(self.selectFrame, text='Basis:')
+ labelBasis.grid(row=1, column=0, sticky=tk.W)
+ self.basisBox = ttk.Combobox(self.selectFrame, state='readonly')
+ self.basisBox['values'] = ('xy', 'yz', 'xz')
+ self.basisBox.current(0)
+ self.basisBox.grid(row=1, column=1, sticky=tk.W+tk.E)
+ self.basisBox.bind('<>', self.update)
- # Planar basis
- label_basis = QLabel("Basis:")
- self.basis = QComboBox()
- self.basis.addItems(['xy', 'yz', 'xz'])
+ # Axial level
+ labelAxial = tk.Label(self.selectFrame, text='Axial level:')
+ labelAxial.grid(row=2, column=0, sticky=tk.W)
+ self.axialBox = ttk.Combobox(self.selectFrame, state='readonly')
+ self.axialBox.grid(row=2, column=1, sticky=tk.W+tk.E)
+ self.axialBox.bind('<>', self.redraw)
- # Update window when 'Basis' selection is changed
- self.connect(self.basis, SIGNAL('activated(int)'),
- self._update)
- self.connect(self.basis, SIGNAL('activated(int)'),
- self.populate_boxes)
- self.connect(self.basis, SIGNAL('activated(int)'),
- self.on_draw)
+ # Option for mean/uncertainty
+ labelMean = tk.Label(self.selectFrame, text='Mean/Uncertainty:')
+ labelMean.grid(row=3, column=0, sticky=tk.W)
+ self.meanBox = ttk.Combobox(self.selectFrame, state='readonly')
+ self.meanBox['values'] = ('Mean', 'Absolute uncertainty',
+ 'Relative uncertainty')
+ self.meanBox.current(0)
+ self.meanBox.grid(row=3, column=1, sticky=tk.W+tk.E)
+ self.meanBox.bind('<>', self.update)
- # Axial level within selected basis
- label_axial_level = QLabel("Axial Level:")
- self.axial_level = QComboBox()
- self.connect(self.axial_level, SIGNAL('activated(int)'),
- self.on_draw)
+ # Scores
+ labelScore = tk.Label(self.selectFrame, text='Score:')
+ labelScore.grid(row=4, column=0, sticky=tk.W)
+ self.scoreBox = ttk.Combobox(self.selectFrame, state='readonly')
+ self.scoreBox.grid(row=4, column=1, sticky=tk.W+tk.E)
+ self.scoreBox.bind('<>', self.redraw)
- # Add Option to plot mean or uncertainty
- label_mean = QLabel("Mean or Uncertainty:")
- self.mean = QComboBox()
- self.mean.addItems(['Mean','Absolute Uncertainty',
- 'Relative Uncertainty'])
+ # Filter label
+ font = tkFont.Font(weight='bold')
+ labelFilters = tk.Label(self.selectFrame, text='Filters:', font=font)
+ labelFilters.grid(row=5, column=0, sticky=tk.W)
- # Update window when mean selection is changed
- self.connect(self.mean, SIGNAL('activated(int)'),
- self.on_draw)
-
-
- self.label_filters = QLabel("Filter options:")
-
- # Labels for all possible filters
- self.labels = {'cell': 'Cell: ', 'cellborn': 'Cell born: ',
- 'surface': 'Surface: ', 'material': 'Material',
- 'universe': 'Universe: ', 'energyin': 'Energy in: ',
- 'energyout': 'Energy out: '}
-
- # Empty reusable labels
- self.qlabels = {}
- for j in range(8):
- self.nextLabel = QLabel
- self.qlabels[j] = self.nextLabel
-
- # Reusable comboboxes labelled with filter names
- self.boxes = {}
- for key in self.labels.keys():
- self.nextBox = QComboBox()
- self.connect(self.nextBox, SIGNAL('activated(int)'),
- self.on_draw)
- self.boxes[key] = self.nextBox
-
- # Combobox to select among scores
- self.score_label = QLabel("Score:")
- self.scoreBox = QComboBox()
- for item in self.tally_scores[0]:
- self.scoreBox.addItems(str(item))
- self.connect(self.scoreBox, SIGNAL('activated(int)'),
- self.on_draw)
-
- # Fill layout
- self.grid.addWidget(label_tally, 0, 0)
- self.grid.addWidget(self.tally, 0, 1)
- self.grid.addWidget(label_basis, 1, 0)
- self.grid.addWidget(self.basis, 1, 1)
- self.grid.addWidget(label_axial_level, 2, 0)
- self.grid.addWidget(self.axial_level, 2, 1)
- self.grid.addWidget(label_mean, 3, 0)
- self.grid.addWidget(self.mean, 3, 1)
- self.grid.addWidget(self.label_filters, 4, 0)
-
- self._update()
- self.populate_boxes()
- self.on_draw()
-
- def get_file_data(self, cl_file=None):
- # Get data file name from "open file" browser
- if cl_file is None:
- filename = QFileDialog.getOpenFileName(self,
- 'Select statepoint file', '.')
+ def update(self, event=None):
+ if not event:
+ widget = None
else:
- filename = cl_file
+ widget = event.widget
- # Create StatePoint object and read in data
- self.datafile = StatePoint(str(filename))
- self.datafile.read_results()
- self.datafile.generate_stdev()
+ tally_id = self.meshTallies[self.tallyBox.current()]
+ selectedTally = self.datafile.tallies[tally_id]
- self.setWindowTitle('Core Map Tool : ' + str(self.datafile.path))
+ # Get mesh for selected tally
+ self.mesh = self.datafile.meshes[
+ selectedTally.filters['mesh'].bins[0] - 1]
- self.labelList = []
+ # Get mesh dimensions
+ self.nx, self.ny, self.nz = self.mesh.dimension
- # Read mesh dimensions
- # for mesh in self.datafile.meshes:
- # self.nx, self.ny, self.nz = mesh.dimension
+ # Repopulate comboboxes baesd on current basis selection
+ text = self.basisBox['values'][self.basisBox.current()]
+ if text == 'xy':
+ self.axialBox['values'] = [str(i+1) for i in range(self.nz)]
+ elif text == 'yz':
+ self.axialBox['values'] = [str(i+1) for i in range(self.nx)]
+ else:
+ self.axialBox['values'] = [str(i+1) for i in range(self.ny)]
+ self.axialBox.current(0)
- # Find which tallies have meshes so the rest can be ignored,
- # and for these tallies read the filter and score types
- self.tally_ids = []
- self.n_tallies = len(self.datafile.tallies)
- self.tally_list = []
- self.tally_scores = []
- for itally, tally in enumerate(self.datafile.tallies):
- if 'mesh' in tally.filters:
- # Then we have a good tally, store the ID, filters and
- # scores
- self.tally_ids.append(itally)
- self.filter_types = []
- for f in tally.filters:
- self.filter_types.append(f)
- self.tally_list.append(self.filter_types)
- self.score_types = []
- for s in tally.scores:
- self.score_types.append(s)
- self.tally_scores.append(self.score_types)
+ # If update() was called by a change in the basis combobox, we don't
+ # need to repopulate the filters
+ if widget == self.basisBox:
+ self.redraw()
+ return
- def on_draw(self):
- """ Redraws the figure
- """
+ # Update scores
+ self.scoreBox['values'] = selectedTally.scores
+ self.scoreBox.current(0)
-# print 'Calling on_draw...'
- # Get selected basis, axial_level and stage
- basis = self.basis.currentIndex() + 1
- axial_level = self.axial_level.currentIndex() + 1
- is_mean = self.mean.currentIndex()
+ # Remove any filter labels/comboboxes that exist
+ for row in range(6, self.selectFrame.grid_size()[1]):
+ for w in self.selectFrame.grid_slaves(row=row):
+ w.grid_forget()
+ w.destroy()
- # get current tally index
- tally_id = self.tally_ids[self.tally.currentIndex()]
+ # create a label/combobox for each filter in selected tally
+ count = 0
+ for filterType in selectedTally.filters:
+ if filterType == 'mesh':
+ continue
+ count += 1
+
+ # Create label and combobox for this filter
+ label = tk.Label(self.selectFrame, text=self.labels[filterType])
+ label.grid(row=count+6, column=0, sticky=tk.W)
+ combobox = ttk.Combobox(self.selectFrame, state='readonly')
+ self.filterBoxes[filterType] = combobox
+
+ # Set combobox items
+ f = selectedTally.filters[filterType]
+ if filterType in ['energyin', 'energyout']:
+ combobox['values'] = ['{0} to {1}'.format(*f.bins[i:i+2])
+ for i in range(f.length)]
+ else:
+ combobox['values'] = [str(i) for i in f.bins]
+
+ combobox.current(0)
+ combobox.grid(row=count+6, column=1, sticky=tk.W+tk.E)
+ combobox.bind('<>', self.redraw)
+
+ # If There are no filters, leave a 'None available' message
+ if count == 0:
+ count += 1
+ label = tk.Label(self.selectFrame, text="None Available")
+ label.grid(row=count+6, column=0, sticky=tk.W)
+
+ self.redraw()
+
+ def redraw(self, event=None):
+ basis = self.basisBox.current() + 1
+ axial_level = self.axialBox.current() + 1
+ is_mean = self.meanBox.current()
+
+ # Get selected tally
+ tally_id = self.meshTallies[self.tallyBox.current()]
+ selectedTally = self.datafile.tallies[tally_id]
# Create spec_list
spec_list = []
- for tally in self.datafile.tallies[tally_id].filters.values():
- if tally.type == 'mesh':
+ for f in selectedTally.filters.values():
+ if f.type == 'mesh':
continue
- index = self.boxes[tally.type].currentIndex()
- spec_list.append((tally.type, index))
+ index = self.filterBoxes[f.type].current()
+ spec_list.append((f.type, index))
# Take is_mean and convert it to an index of the score
score_loc = is_mean
if score_loc > 1:
score_loc = 1
- if self.basis.currentText() == 'xy':
+ text = self.basisBox['values'][self.basisBox.current()]
+ if text == 'xy':
matrix = np.zeros((self.nx, self.ny))
for i in range(self.nx):
for j in range(self.ny):
- matrix[i,j] = self.datafile.get_value(tally_id,
+ matrix[i, j] = self.datafile.get_value(tally_id,
spec_list + [('mesh', (i + 1, j + 1, axial_level))],
- self.scoreBox.currentIndex())[score_loc]
- # Calculate relative uncertainty from absolute, if
- # requested
+ self.scoreBox.current())[score_loc]
+ # Calculate relative uncertainty from absolute, if requested
if is_mean == 2:
# Take care to handle zero means when normalizing
mean_val = self.datafile.get_value(tally_id,
spec_list + [('mesh', (i + 1, j + 1, axial_level))],
- self.scoreBox.currentIndex())[0]
+ self.scoreBox.current())[0]
if mean_val > 0.0:
- matrix[i,j] = matrix[i,j] / mean_val
+ matrix[i, j] = matrix[i, j] / mean_val
else:
- matrix[i,j] = 0.0
+ matrix[i, j] = 0.0
- elif self.basis.currentText() == 'yz':
+ elif text == 'yz':
matrix = np.zeros((self.ny, self.nz))
for i in range(self.ny):
for j in range(self.nz):
- matrix[i,j] = self.datafile.get_value(tally_id,
+ matrix[i, j] = self.datafile.get_value(tally_id,
spec_list + [('mesh', (axial_level, i + 1, j + 1))],
- self.scoreBox.currentIndex())[score_loc]
- # Calculate relative uncertainty from absolute, if
- # requested
+ self.scoreBox.current())[score_loc]
+ # Calculate relative uncertainty from absolute, if requested
if is_mean == 2:
# Take care to handle zero means when normalizing
mean_val = self.datafile.get_value(tally_id,
spec_list + [('mesh', (axial_level, i + 1, j + 1))],
- self.scoreBox.currentIndex())[0]
+ self.scoreBox.current())[0]
if mean_val > 0.0:
- matrix[i,j] = matrix[i,j] / mean_val
+ matrix[i, j] = matrix[i, j] / mean_val
else:
- matrix[i,j] = 0.0
+ matrix[i, j] = 0.0
else:
matrix = np.zeros((self.nx, self.nz))
for i in range(self.nx):
for j in range(self.nz):
- matrix[i,j] = self.datafile.get_value(tally_id,
+ matrix[i, j] = self.datafile.get_value(tally_id,
spec_list + [('mesh', (i + 1, axial_level, j + 1))],
- self.scoreBox.currentIndex())[score_loc]
- # Calculate relative uncertainty from absolute, if
- # requested
+ self.scoreBox.current())[score_loc]
+ # Calculate relative uncertainty from absolute, if requested
if is_mean == 2:
# Take care to handle zero means when normalizing
mean_val = self.datafile.get_value(tally_id,
spec_list + [('mesh', (i + 1, axial_level, j + 1))],
- self.scoreBox.currentIndex())[0]
+ self.scoreBox.current())[0]
if mean_val > 0.0:
- matrix[i,j] = matrix[i,j] / mean_val
+ matrix[i, j] = matrix[i, j] / mean_val
else:
- matrix[i,j] = 0.0
-
-# print spec_list
+ matrix[i, j] = 0.0
# Clear the figure
self.fig.clear()
@@ -296,7 +273,7 @@ class AppForm(QMainWindow):
# Make figure, set up color bar
self.axes = self.fig.add_subplot(111)
cax = self.axes.imshow(matrix.transpose(), vmin=0.0, vmax=matrix.max(),
- interpolation="nearest", origin='lower')
+ interpolation='none', origin='lower')
self.fig.colorbar(cax)
self.axes.set_xticks([])
@@ -306,99 +283,43 @@ class AppForm(QMainWindow):
# Draw canvas
self.canvas.draw()
- def _update(self):
- '''Updates widget to display new relevant comboboxes and figure data
- '''
-# print 'Calling _update...'
+ def get_file_data(self, filename):
+ # Create StatePoint object and read in data
+ self.datafile = StatePoint(filename)
+ self.datafile.read_results()
+ self.datafile.generate_stdev()
- # get current tally index
- tally_id = self.tally_ids[self.tally.currentIndex()]
+ # Find which tallies are mesh tallies
+ self.meshTallies = []
+ for itally, tally in enumerate(self.datafile.tallies):
+ if 'mesh' in tally.filters:
+ self.meshTallies.append(itally)
- self.mesh = self.datafile.meshes[
- self.datafile.tallies[tally_id].filters['mesh'].bins[0] - 1]
-
- self.nx, self.ny, self.nz = self.mesh.dimension
-
- # Clear axial level combobox
- self.axial_level.clear()
-
- # Repopulate axial level combobox based on current basis selection
- if (self.basis.currentText() == 'xy'):
- self.axial_level.addItems([str(i+1) for i in range(self.nz)])
- elif (self.basis.currentText() == 'yz'):
- self.axial_level.addItems([str(i+1) for i in range(self.nx)])
- else:
- self.axial_level.addItems([str(i+1) for i in range(self.ny)])
-
- # Determine maximum value from current tally data set
- self.maxvalue = self.datafile.tallies[tally_id].results.max()
-# print self.maxvalue
-
- # Clear and hide old filter labels
- for item in self.labelList:
- item.clear()
-
- # Clear and hide old filter boxes
- for j in self.labels:
- self.boxes[j].clear()
- self.boxes[j].setParent(None)
-
- self.update()
-
- def populate_boxes(self):
-# print 'Calling populate_boxes...'
-
- # get current tally index
- tally_id = self.tally_ids[self.tally.currentIndex()]
-
- n = 5
- labels = {'cell': 'Cell : ',
- 'cellborn': 'Cell born: ',
- 'surface': 'Surface: ',
- 'material': 'Material: ',
- 'universe': 'Universe: '}
-
- # For each filter in newly-selected tally, name a label and fill the
- # relevant combobox with options
- for element in self.tally_list[self.tally.currentIndex()]:
- nextFilter = self.datafile.tallies[tally_id].filters[element]
- if element == 'mesh':
- continue
-
- label = QLabel(self.labels[element])
- self.labelList.append(label)
- combobox = self.boxes[element]
- self.grid.addWidget(label, n, 0)
- self.grid.addWidget(combobox, n, 1)
- n += 1
-
-# print element
- if element in ['cell', 'cellborn', 'surface', 'material', 'universe']:
- combobox.addItems([str(i) for i in nextFilter.bins])
-# for i in nextFilter.bins:
-# print i
-
- elif element == 'energyin' or element == 'energyout':
- for i in range(nextFilter.length):
- text = (str(nextFilter.bins[i]) + ' to ' +
- str(nextFilter.bins[i+1]))
- combobox.addItem(text)
-
- self.scoreBox.clear()
- for item in self.tally_scores[self.tally.currentIndex()]:
- self.scoreBox.addItem(str(item))
- self.grid.addWidget(self.score_label, n, 0)
- self.grid.addWidget(self.scoreBox, n, 1)
+ if not self.meshTallies:
+ tkMessageBox.showerror("Invalid StatePoint File",
+ "File does not contain mesh tallies!")
+ sys.exit(1)
+if __name__ == '__main__':
+ # Hide root window
+ root = tk.Tk()
+ root.withdraw()
-def main():
- app = QApplication(sys.argv)
- form = AppForm(app.arguments())
- if form.all_good:
- form.show()
- app.exec_()
+ # If no filename given as command-line argument, open file dialog
+ if len(sys.argv) < 2:
+ filename = tkFileDialog.askopenfilename(title='Select statepoint file',
+ initialdir='.')
+ else:
+ filename = sys.argv[1]
+ if filename:
+ # Check to make sure file exists
+ if not os.path.isfile(filename):
+ tkMessageBox.showerror("File not found",
+ "Could not find regular file: " + filename)
+ sys.exit(1)
-if __name__ == "__main__":
- main()
+ app = MeshPlotter(root, filename)
+ root.deiconify()
+ root.mainloop()
diff --git a/src/utils/statepoint.py b/src/utils/statepoint.py
index 430abee8b..47809d472 100644
--- a/src/utils/statepoint.py
+++ b/src/utils/statepoint.py
@@ -151,7 +151,7 @@ class StatePoint(object):
# Read statepoint revision
self.revision = self._get_int(path='revision')[0]
- if self.revision != 10:
+ if self.revision != 11:
raise Exception('Statepoint Revision is not consistent.')
# Read OpenMC version
@@ -298,6 +298,13 @@ class StatePoint(object):
f.stride = stride
stride *= f.length
+ # Source bank present
+ source_present = self._get_int(path='source_present')[0]
+ if source_present == 1:
+ self.source_present = True
+ else:
+ self.source_present = False
+
# Set flag indicating metadata has already been read
self._metadata = True
@@ -342,6 +349,11 @@ class StatePoint(object):
if not self._results:
self.read_results()
+ # Check if source bank is in statepoint
+ if not self.source_present:
+ print('Source not in statepoint file.')
+ return
+
# For HDF5 state points, copy entire bank
if self._hdf5:
source_sites = self._f['source_bank'].value
diff --git a/tests/cleanup b/tests/cleanup
new file mode 100755
index 000000000..288c81025
--- /dev/null
+++ b/tests/cleanup
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# This simple script ensures that all binary
+# output files have been deleted in all the
+# folders. This can occur if a previous error
+# occurred and the test suite was rerun without
+# deleting left over binary files. This will
+# cause an assertion error in some of the
+# tests.
+find . \( -name "*.binary" -o -name "*.h5" \) -exec rm -f {} \;
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 9d686b68a..40ab8c91b 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -138,7 +138,6 @@ if len(sys.argv) > 1:
try:
tests__.index(j)
except ValueError:
- tests__.append(j)
# Test name specified on command line
else:
diff --git a/tests/test_source_file/geometry.xml b/tests/test_source_file/geometry.xml
new file mode 100644
index 000000000..612e46132
--- /dev/null
+++ b/tests/test_source_file/geometry.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ |
+
+
diff --git a/tests/test_source_file/materials.xml b/tests/test_source_file/materials.xml
new file mode 100644
index 000000000..1f85510e0
--- /dev/null
+++ b/tests/test_source_file/materials.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/tests/test_source_file/results.py b/tests/test_source_file/results.py
new file mode 100644
index 000000000..8ff10971c
--- /dev/null
+++ b/tests/test_source_file/results.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+import sys
+
+# import statepoint
+sys.path.append('../../src/utils')
+import statepoint
+
+# read in statepoint file
+if len(sys.argv) > 1:
+ sp = statepoint.StatePoint(sys.argv[1])
+else:
+ sp = statepoint.StatePoint('statepoint.10.binary')
+sp.read_results()
+
+# set up output string
+outstr = ''
+
+# write out k-combined
+outstr += 'k-combined:\n'
+outstr += "{0:12.6E} {1:12.6E}\n".format(sp.k_combined[0], sp.k_combined[1])
+
+# write results to file
+with open('results_test.dat','w') as fh:
+ fh.write(outstr)
diff --git a/tests/test_source_file/results_true.dat b/tests/test_source_file/results_true.dat
new file mode 100644
index 000000000..ae37050f7
--- /dev/null
+++ b/tests/test_source_file/results_true.dat
@@ -0,0 +1,2 @@
+k-combined:
+2.977307E-01 2.848670E-03
diff --git a/tests/test_source_file/settings.xml b/tests/test_source_file/settings.xml
new file mode 100644
index 000000000..17d4ee2e2
--- /dev/null
+++ b/tests/test_source_file/settings.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ 10
+ 5
+ 1000
+
+
+
+
+ -4 -4 -4 4 4 4
+
+
+
+
diff --git a/tests/test_source_file/test_source_file.py b/tests/test_source_file/test_source_file.py
new file mode 100644
index 000000000..85a33c031
--- /dev/null
+++ b/tests/test_source_file/test_source_file.py
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+
+import os
+from subprocess import Popen, STDOUT, PIPE, call
+import filecmp
+from nose_mpi import NoseMPI
+import glob
+
+pwd = os.path.dirname(__file__)
+
+settings1="""
+
+
+
+
+
+
+ 10
+ 5
+ 1000
+
+
+
+
+ -4 -4 -4 4 4 4
+
+
+
+
+"""
+
+settings2 = """
+
+
+
+ 10
+ 5
+ 1000
+
+
+
+ source.10.{0}
+
+
+
+"""
+
+def setup():
+ os.putenv('PWD', pwd)
+ os.chdir(pwd)
+
+def test_run1():
+ openmc_path = pwd + '/../../src/openmc'
+ if int(NoseMPI.mpi_np) > 0:
+ proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path],
+ stderr=STDOUT, stdout=PIPE)
+ else:
+ proc = Popen([openmc_path], stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_statepoint_exists():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ assert len(statepoint) == 1
+ assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5')
+ source = glob.glob(pwd + '/source.10.*')
+ assert len(statepoint) == 1
+ assert source[0].endswith('binary') or source[0].endswith('h5')
+
+def test_run2():
+ openmc_path = pwd + '/../../src/openmc'
+ source = glob.glob(pwd + '/source.10.*')
+ with open('settings.xml','w') as fh:
+ fh.write(settings2.format(source[0].split('.')[2]))
+ if int(NoseMPI.mpi_np) > 0:
+ proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path],
+ stderr=STDOUT, stdout=PIPE)
+ else:
+ proc = Popen([openmc_path], stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_results():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ call(['python', 'results.py', statepoint[0]])
+ compare = filecmp.cmp('results_test.dat', 'results_true.dat')
+ if not compare:
+ os.rename('results_test.dat', 'results_error.dat')
+ assert compare
+
+def teardown():
+ with open('settings.xml','w') as fh:
+ fh.write(settings1)
+ output = glob.glob(pwd + '/statepoint.10.*')
+ output += glob.glob(pwd + '/source.10.*')
+ output.append(pwd + '/results_test.dat')
+ for f in output:
+ if os.path.exists(f):
+ os.remove(f)
diff --git a/tests/test_sourcepoint_batch/geometry.xml b/tests/test_sourcepoint_batch/geometry.xml
new file mode 100644
index 000000000..612e46132
--- /dev/null
+++ b/tests/test_sourcepoint_batch/geometry.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ |
+
+
diff --git a/tests/test_sourcepoint_batch/materials.xml b/tests/test_sourcepoint_batch/materials.xml
new file mode 100644
index 000000000..1f85510e0
--- /dev/null
+++ b/tests/test_sourcepoint_batch/materials.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/tests/test_sourcepoint_batch/results.py b/tests/test_sourcepoint_batch/results.py
new file mode 100644
index 000000000..9b0f577eb
--- /dev/null
+++ b/tests/test_sourcepoint_batch/results.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+import sys
+
+# import statepoint
+sys.path.append('../../src/utils')
+import statepoint
+
+# read in statepoint file
+if len(sys.argv) > 1:
+ sp = statepoint.StatePoint(sys.argv[1])
+else:
+ sp = statepoint.StatePoint('statepoint.8.binary')
+sp.read_results()
+sp.read_source()
+
+# set up output string
+outstr = ''
+
+# write out k-combined
+outstr += 'k-combined:\n'
+outstr += "{0:12.6E} {1:12.6E}\n".format(sp.k_combined[0], sp.k_combined[1])
+
+# write out xyz
+xyz = sp.source[0].xyz
+for i in xyz:
+ outstr += "{0:12.6E} ".format(i)
+outstr += "\n"
+
+# write results to file
+with open('results_test.dat','w') as fh:
+ fh.write(outstr)
diff --git a/tests/test_sourcepoint_batch/results_true.dat b/tests/test_sourcepoint_batch/results_true.dat
new file mode 100644
index 000000000..748df0351
--- /dev/null
+++ b/tests/test_sourcepoint_batch/results_true.dat
@@ -0,0 +1,3 @@
+k-combined:
+0.000000E+00 0.000000E+00
+-9.438655E-02 -4.436810E+00 -2.416825E+00
diff --git a/tests/test_sourcepoint_batch/settings.xml b/tests/test_sourcepoint_batch/settings.xml
new file mode 100644
index 000000000..c816fe700
--- /dev/null
+++ b/tests/test_sourcepoint_batch/settings.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ 10
+ 5
+ 1000
+
+
+
+
+ -4 -4 -4 4 4 4
+
+
+
+
diff --git a/tests/test_sourcepoint_batch/test_sourcepoint_batch.py b/tests/test_sourcepoint_batch/test_sourcepoint_batch.py
new file mode 100644
index 000000000..78d202e40
--- /dev/null
+++ b/tests/test_sourcepoint_batch/test_sourcepoint_batch.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+import os
+from subprocess import Popen, STDOUT, PIPE, call
+import filecmp
+from nose_mpi import NoseMPI
+import glob
+
+pwd = os.path.dirname(__file__)
+
+def setup():
+ os.putenv('PWD', pwd)
+ os.chdir(pwd)
+
+def test_run():
+ openmc_path = pwd + '/../../src/openmc'
+ if int(NoseMPI.mpi_np) > 0:
+ proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path],
+ stderr=STDOUT, stdout=PIPE)
+ else:
+ proc = Popen([openmc_path], stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_statepoint_exists():
+ statepoint = glob.glob(pwd + '/statepoint.*')
+ assert len(statepoint) == 5
+ assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5')
+
+def test_results():
+ statepoint = glob.glob(pwd + '/statepoint.8.*')
+ call(['python', 'results.py', statepoint[0]])
+ compare = filecmp.cmp('results_test.dat', 'results_true.dat')
+ if not compare:
+ os.rename('results_test.dat', 'results_error.dat')
+ assert compare
+
+def teardown():
+ output = glob.glob(pwd + '/statepoint.*')
+ output.append(pwd + '/results_test.dat')
+ for f in output:
+ if os.path.exists(f):
+ os.remove(f)
diff --git a/tests/test_sourcepoint_interval/geometry.xml b/tests/test_sourcepoint_interval/geometry.xml
new file mode 100644
index 000000000..612e46132
--- /dev/null
+++ b/tests/test_sourcepoint_interval/geometry.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ |
+
+
diff --git a/tests/test_sourcepoint_interval/materials.xml b/tests/test_sourcepoint_interval/materials.xml
new file mode 100644
index 000000000..1f85510e0
--- /dev/null
+++ b/tests/test_sourcepoint_interval/materials.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/tests/test_sourcepoint_interval/results.py b/tests/test_sourcepoint_interval/results.py
new file mode 100644
index 000000000..9b0f577eb
--- /dev/null
+++ b/tests/test_sourcepoint_interval/results.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+import sys
+
+# import statepoint
+sys.path.append('../../src/utils')
+import statepoint
+
+# read in statepoint file
+if len(sys.argv) > 1:
+ sp = statepoint.StatePoint(sys.argv[1])
+else:
+ sp = statepoint.StatePoint('statepoint.8.binary')
+sp.read_results()
+sp.read_source()
+
+# set up output string
+outstr = ''
+
+# write out k-combined
+outstr += 'k-combined:\n'
+outstr += "{0:12.6E} {1:12.6E}\n".format(sp.k_combined[0], sp.k_combined[1])
+
+# write out xyz
+xyz = sp.source[0].xyz
+for i in xyz:
+ outstr += "{0:12.6E} ".format(i)
+outstr += "\n"
+
+# write results to file
+with open('results_test.dat','w') as fh:
+ fh.write(outstr)
diff --git a/tests/test_sourcepoint_interval/results_true.dat b/tests/test_sourcepoint_interval/results_true.dat
new file mode 100644
index 000000000..748df0351
--- /dev/null
+++ b/tests/test_sourcepoint_interval/results_true.dat
@@ -0,0 +1,3 @@
+k-combined:
+0.000000E+00 0.000000E+00
+-9.438655E-02 -4.436810E+00 -2.416825E+00
diff --git a/tests/test_sourcepoint_interval/settings.xml b/tests/test_sourcepoint_interval/settings.xml
new file mode 100644
index 000000000..d0b8fa71d
--- /dev/null
+++ b/tests/test_sourcepoint_interval/settings.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ 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
new file mode 100644
index 000000000..78d202e40
--- /dev/null
+++ b/tests/test_sourcepoint_interval/test_sourcepoint_interval.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+import os
+from subprocess import Popen, STDOUT, PIPE, call
+import filecmp
+from nose_mpi import NoseMPI
+import glob
+
+pwd = os.path.dirname(__file__)
+
+def setup():
+ os.putenv('PWD', pwd)
+ os.chdir(pwd)
+
+def test_run():
+ openmc_path = pwd + '/../../src/openmc'
+ if int(NoseMPI.mpi_np) > 0:
+ proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path],
+ stderr=STDOUT, stdout=PIPE)
+ else:
+ proc = Popen([openmc_path], stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_statepoint_exists():
+ statepoint = glob.glob(pwd + '/statepoint.*')
+ assert len(statepoint) == 5
+ assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5')
+
+def test_results():
+ statepoint = glob.glob(pwd + '/statepoint.8.*')
+ call(['python', 'results.py', statepoint[0]])
+ compare = filecmp.cmp('results_test.dat', 'results_true.dat')
+ if not compare:
+ os.rename('results_test.dat', 'results_error.dat')
+ assert compare
+
+def teardown():
+ output = glob.glob(pwd + '/statepoint.*')
+ output.append(pwd + '/results_test.dat')
+ for f in output:
+ if os.path.exists(f):
+ os.remove(f)
diff --git a/tests/test_sourcepoint_latest/geometry.xml b/tests/test_sourcepoint_latest/geometry.xml
new file mode 100644
index 000000000..612e46132
--- /dev/null
+++ b/tests/test_sourcepoint_latest/geometry.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ |
+
+
diff --git a/tests/test_sourcepoint_latest/materials.xml b/tests/test_sourcepoint_latest/materials.xml
new file mode 100644
index 000000000..1f85510e0
--- /dev/null
+++ b/tests/test_sourcepoint_latest/materials.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/tests/test_sourcepoint_latest/results.py b/tests/test_sourcepoint_latest/results.py
new file mode 100644
index 000000000..8ff10971c
--- /dev/null
+++ b/tests/test_sourcepoint_latest/results.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+import sys
+
+# import statepoint
+sys.path.append('../../src/utils')
+import statepoint
+
+# read in statepoint file
+if len(sys.argv) > 1:
+ sp = statepoint.StatePoint(sys.argv[1])
+else:
+ sp = statepoint.StatePoint('statepoint.10.binary')
+sp.read_results()
+
+# set up output string
+outstr = ''
+
+# write out k-combined
+outstr += 'k-combined:\n'
+outstr += "{0:12.6E} {1:12.6E}\n".format(sp.k_combined[0], sp.k_combined[1])
+
+# write results to file
+with open('results_test.dat','w') as fh:
+ fh.write(outstr)
diff --git a/tests/test_sourcepoint_latest/results_true.dat b/tests/test_sourcepoint_latest/results_true.dat
new file mode 100644
index 000000000..00a65f913
--- /dev/null
+++ b/tests/test_sourcepoint_latest/results_true.dat
@@ -0,0 +1,2 @@
+k-combined:
+3.011353E-01 2.854556E-03
diff --git a/tests/test_sourcepoint_latest/settings.xml b/tests/test_sourcepoint_latest/settings.xml
new file mode 100644
index 000000000..5056db472
--- /dev/null
+++ b/tests/test_sourcepoint_latest/settings.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ 10
+ 5
+ 1000
+
+
+
+
+ -4 -4 -4 4 4 4
+
+
+
+
diff --git a/tests/test_sourcepoint_latest/test_sourcepoint_latest.py b/tests/test_sourcepoint_latest/test_sourcepoint_latest.py
new file mode 100644
index 000000000..d26533843
--- /dev/null
+++ b/tests/test_sourcepoint_latest/test_sourcepoint_latest.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+
+import os
+from subprocess import Popen, STDOUT, PIPE, call
+import filecmp
+from nose_mpi import NoseMPI
+import glob
+
+pwd = os.path.dirname(__file__)
+
+def setup():
+ os.putenv('PWD', pwd)
+ os.chdir(pwd)
+
+def test_run():
+ openmc_path = pwd + '/../../src/openmc'
+ if int(NoseMPI.mpi_np) > 0:
+ proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path],
+ stderr=STDOUT, stdout=PIPE)
+ else:
+ proc = Popen([openmc_path], stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_statepoint_exists():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ assert len(statepoint) == 1
+ assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5')
+ source = glob.glob(pwd + '/source.*')
+ assert len(source) == 1
+ assert source[0].endswith('binary') or source[0].endswith('h5')
+
+def test_results():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ call(['python', 'results.py', statepoint[0]])
+ compare = filecmp.cmp('results_test.dat', 'results_true.dat')
+ if not compare:
+ os.rename('results_test.dat', 'results_error.dat')
+ assert compare
+
+def teardown():
+ output = glob.glob(pwd + '/statepoint.10.*')
+ output += glob.glob(pwd + '/source.*')
+ output.append(pwd + '/results_test.dat')
+ for f in output:
+ if os.path.exists(f):
+ os.remove(f)
diff --git a/tests/test_sourcepoint_restart/geometry.xml b/tests/test_sourcepoint_restart/geometry.xml
new file mode 100644
index 000000000..612e46132
--- /dev/null
+++ b/tests/test_sourcepoint_restart/geometry.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+ |
+
+
diff --git a/tests/test_sourcepoint_restart/materials.xml b/tests/test_sourcepoint_restart/materials.xml
new file mode 100644
index 000000000..1f85510e0
--- /dev/null
+++ b/tests/test_sourcepoint_restart/materials.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/tests/test_sourcepoint_restart/results.py b/tests/test_sourcepoint_restart/results.py
new file mode 100644
index 000000000..f4c32a893
--- /dev/null
+++ b/tests/test_sourcepoint_restart/results.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+import sys
+import numpy as np
+
+# import statepoint
+sys.path.append('../../src/utils')
+import statepoint
+
+# read in statepoint file
+if len(sys.argv) > 1:
+ sp = statepoint.StatePoint(sys.argv[1])
+else:
+ sp = statepoint.StatePoint('statepoint.10.binary')
+sp.read_results()
+
+# extract tally results and convert to vector
+results1 = sp.tallies[0].results
+shape1 = results1.shape
+size1 = (np.product(shape1))
+results1 = np.reshape(results1, size1)
+results2 = sp.tallies[1].results
+shape2 = results2.shape
+size2 = (np.product(shape2))
+results2 = np.reshape(results2, size2)
+
+# set up output string
+outstr = ''
+
+# write out k-combined
+outstr += 'k-combined:\n'
+outstr += "{0:12.6E} {1:12.6E}\n".format(sp.k_combined[0], sp.k_combined[1])
+
+# write out tally results
+outstr += 'tally 1:\n'
+for item in results1:
+ outstr += "{0:12.6E}\n".format(item)
+outstr += 'tally 2:\n'
+for item in results2:
+ outstr += "{0:12.6E}\n".format(item)
+
+# write results to file
+with open('results_test.dat','w') as fh:
+ fh.write(outstr)
diff --git a/tests/test_sourcepoint_restart/results_true.dat b/tests/test_sourcepoint_restart/results_true.dat
new file mode 100644
index 000000000..ad94d7645
--- /dev/null
+++ b/tests/test_sourcepoint_restart/results_true.dat
@@ -0,0 +1,2412 @@
+k-combined:
+3.011353E-01 2.854556E-03
+tally 1:
+8.000000E-03
+1.600000E-05
+6.192275E-04
+1.370333E-06
+-8.662964E-04
+7.279501E-07
+-1.041312E-05
+3.860351E-07
+4.821963E-03
+5.791161E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.131510E-04
+1.880396E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.100000E-02
+3.300000E-05
+4.387087E-03
+7.410082E-06
+1.860042E-03
+2.867148E-06
+3.399756E-03
+5.784483E-06
+5.116596E-03
+6.752240E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.028119E-04
+9.169503E-08
+1.000000E-03
+1.000000E-06
+5.438971E-04
+2.958240E-07
+-5.626399E-05
+3.165637E-09
+-4.136011E-04
+1.710658E-07
+6.013419E-04
+3.616120E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+5.000000E-03
+1.300000E-05
+3.577754E-03
+6.496319E-06
+1.890975E-03
+1.788514E-06
+9.937593E-04
+4.944395E-07
+1.803302E-03
+1.626040E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.600000E-02
+6.600000E-05
+5.883798E-03
+1.472349E-05
+5.964243E-03
+1.758637E-05
+4.341846E-03
+6.731059E-06
+7.631087E-03
+1.536471E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.009839E-04
+9.059133E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.300000E-02
+3.900000E-05
+1.678255E-03
+1.856663E-06
+3.802861E-03
+6.462034E-06
+-4.813541E-05
+2.987521E-06
+5.422032E-03
+6.871180E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.028119E-04
+9.169503E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+5.000000E-03
+5.000000E-06
+1.710047E-03
+2.156886E-06
+7.353287E-04
+1.688467E-06
+1.623935E-03
+1.552163E-06
+2.439928E-03
+1.509909E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.000000E-03
+1.000000E-06
+1.789439E-04
+3.202091E-08
+-4.519686E-04
+2.042756E-07
+-2.540910E-04
+6.456222E-08
+6.243342E-04
+3.897931E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.400000E-02
+4.200000E-05
+4.680073E-03
+4.832992E-06
+9.241957E-04
+9.879528E-07
+2.560088E-03
+5.615638E-06
+7.279260E-03
+1.195027E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+5.992726E-04
+1.795675E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.000000E-03
+1.900000E-05
+4.178982E-03
+4.155519E-06
+3.346853E-03
+6.203486E-06
+1.267269E-03
+3.209807E-06
+3.940659E-03
+3.581639E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.028119E-04
+9.169503E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.365012E-04
+8.770346E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.121671E-04
+9.744828E-08
+6.000000E-03
+1.200000E-05
+-2.469438E-05
+1.110126E-06
+6.006714E-04
+6.607712E-07
+1.988388E-03
+1.233934E-06
+3.924085E-03
+4.427425E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.243342E-04
+3.897931E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.009839E-04
+9.059133E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.009839E-04
+9.059133E-08
+1.000000E-03
+1.000000E-06
+9.742209E-04
+9.491064E-07
+9.236596E-04
+8.531471E-07
+8.502670E-04
+7.229539E-07
+3.009839E-04
+9.059133E-08
+2.200000E-02
+1.140000E-04
+1.396444E-02
+4.152030E-05
+9.394828E-03
+1.953841E-05
+7.823718E-03
+1.254396E-05
+1.002065E-02
+2.139199E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.056238E-04
+3.667801E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.200000E-02
+2.140000E-04
+1.152532E-02
+2.810551E-05
+8.134203E-03
+1.622011E-05
+3.372833E-03
+2.907244E-06
+1.577229E-02
+5.159641E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.121671E-04
+9.744828E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.365012E-04
+8.770346E-07
+2.000000E-03
+4.000000E-06
+4.929028E-04
+2.429532E-07
+-6.043220E-05
+3.652051E-09
+2.687444E-04
+7.222357E-08
+0.000000E+00
+0.000000E+00
+1.000000E-02
+2.400000E-05
+7.364203E-03
+1.356715E-05
+3.578025E-03
+3.952934E-06
+4.991388E-04
+8.277617E-07
+6.660384E-03
+1.078466E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.200000E-02
+4.800000E-05
+7.631639E-04
+2.262064E-06
+-3.448925E-04
+1.205043E-06
+-3.259600E-03
+4.482377E-06
+5.459930E-03
+8.074061E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+5.989596E-04
+1.793791E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.600000E-02
+1.820000E-04
+5.527216E-03
+9.741352E-06
+6.494815E-03
+1.331417E-05
+2.487729E-04
+9.009137E-06
+1.212394E-02
+3.763410E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.111267E-04
+2.768274E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.600000E-02
+1.400000E-04
+8.583494E-03
+1.976212E-05
+2.895567E-03
+1.210757E-05
+3.612948E-03
+7.374439E-06
+1.090179E-02
+2.581708E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.982887E-04
+8.897613E-08
+1.000000E-03
+1.000000E-06
+9.407668E-04
+8.850421E-07
+8.275632E-04
+6.848608E-07
+6.703954E-04
+4.494300E-07
+5.965773E-04
+3.559045E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.700000E-02
+1.750000E-04
+1.012358E-02
+2.467953E-05
+1.474435E-03
+4.801327E-06
+4.424179E-04
+1.661987E-06
+1.306491E-02
+3.990010E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.300000E-02
+3.900000E-05
+2.894580E-03
+7.413903E-06
+4.782406E-03
+8.519965E-06
+4.310430E-03
+7.496343E-06
+6.648334E-03
+9.824958E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.121671E-04
+9.744828E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.800000E-02
+8.600000E-05
+8.003652E-04
+9.381590E-06
+3.457615E-03
+5.280629E-06
+-1.063124E-03
+2.234064E-06
+8.804401E-03
+1.982338E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.000000E-03
+1.000000E-06
+6.578244E-04
+4.327330E-07
+1.490994E-04
+2.223064E-08
+-2.750809E-04
+7.566948E-08
+6.243342E-04
+3.897931E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.000000E-02
+9.400000E-05
+4.167281E-04
+3.806472E-06
+3.031990E-03
+4.457402E-06
+-2.246079E-05
+6.478142E-07
+1.000360E-02
+2.105336E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.982887E-04
+8.897613E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.900000E-02
+9.700000E-05
+6.458852E-03
+2.279404E-05
+3.627440E-03
+7.908704E-06
+3.946071E-03
+7.531590E-06
+8.885213E-03
+2.445611E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.200000E-02
+3.200000E-05
+5.376132E-03
+1.377498E-05
+3.290467E-03
+4.921168E-06
+1.422861E-03
+3.610761E-06
+4.838152E-03
+5.829692E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.016549E-04
+1.809943E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.056238E-04
+3.667801E-07
+1.000000E-03
+1.000000E-06
+3.227815E-04
+1.041879E-07
+-3.437182E-04
+1.181422E-07
+-4.000974E-04
+1.600779E-07
+0.000000E+00
+0.000000E+00
+2.700000E-02
+1.690000E-04
+1.259754E-02
+3.887684E-05
+3.514255E-03
+9.445635E-06
+1.359344E-03
+2.045441E-06
+1.362156E-02
+4.087828E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.156499E-04
+2.795463E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.805904E-03
+3.261288E-06
+2.000000E-03
+4.000000E-06
+1.904158E-03
+3.625820E-06
+1.722222E-03
+2.966050E-06
+1.472450E-03
+2.168109E-06
+0.000000E+00
+0.000000E+00
+3.900000E-02
+3.490000E-04
+1.656780E-02
+6.023774E-05
+1.361639E-02
+5.348538E-05
+9.429236E-03
+3.947382E-05
+1.761092E-02
+7.600968E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.028119E-04
+9.169503E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.121671E-04
+9.744828E-08
+1.000000E-03
+1.000000E-06
+9.994298E-04
+9.988600E-07
+9.982900E-04
+9.965829E-07
+9.965814E-04
+9.931746E-07
+0.000000E+00
+0.000000E+00
+2.600000E-02
+1.600000E-04
+8.920548E-03
+2.629362E-05
+5.151221E-03
+8.876114E-06
+5.653525E-03
+1.067857E-05
+1.116368E-02
+2.969235E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.209415E-03
+5.437558E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.000000E-03
+1.800000E-05
+3.041714E-03
+1.129968E-05
+4.102928E-03
+6.714470E-06
+2.016161E-03
+6.122339E-06
+3.916134E-03
+9.516316E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.009839E-04
+9.059133E-08
+1.000000E-03
+1.000000E-06
+1.071043E-04
+1.147134E-08
+-4.827930E-04
+2.330891E-07
+-1.575849E-04
+2.483301E-08
+3.009839E-04
+9.059133E-08
+2.300000E-02
+1.150000E-04
+7.537245E-03
+2.829767E-05
+2.103092E-03
+9.662063E-06
+2.183497E-03
+3.744408E-06
+1.057909E-02
+2.415941E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.982887E-04
+8.897613E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.209420E-03
+9.158466E-07
+1.000000E-03
+1.000000E-06
+9.276723E-04
+8.605758E-07
+7.908638E-04
+6.254655E-07
+6.043224E-04
+3.652056E-07
+3.009839E-04
+9.059133E-08
+2.500000E-02
+1.510000E-04
+1.154954E-02
+3.543399E-05
+4.217931E-03
+7.652974E-06
+1.816814E-03
+6.073065E-06
+9.720055E-03
+2.272026E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.121671E-04
+9.744828E-08
+1.000000E-03
+1.000000E-06
+-2.723974E-04
+7.420035E-08
+-3.886995E-04
+1.510873E-07
+3.580662E-04
+1.282114E-07
+3.121671E-04
+9.744828E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+4.200000E-02
+3.560000E-04
+1.287791E-02
+4.221690E-05
+4.013355E-03
+1.949190E-05
+1.990533E-03
+9.786357E-06
+1.727222E-02
+6.016647E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.125620E-03
+1.382988E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.112371E-03
+2.274717E-06
+4.000000E-03
+8.000000E-06
+3.826961E-03
+7.325612E-06
+3.495526E-03
+6.132335E-06
+3.033406E-03
+4.680820E-06
+0.000000E+00
+0.000000E+00
+1.300000E-02
+4.300000E-05
+2.528669E-03
+1.367031E-05
+3.965235E-03
+4.071050E-06
+-4.149583E-04
+1.307826E-06
+7.258235E-03
+1.093717E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.114397E-04
+2.770157E-07
+2.000000E-03
+2.000000E-06
+-1.131644E-03
+6.424199E-07
+-3.637017E-05
+6.744918E-09
+7.827543E-04
+3.080768E-07
+9.271460E-04
+4.814882E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.000000E-02
+8.800000E-05
+5.382539E-03
+1.017579E-05
+2.414790E-03
+7.567027E-06
+3.961581E-03
+6.537588E-06
+9.680345E-03
+2.211393E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.159629E-04
+2.797346E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.200000E-02
+1.240000E-04
+7.269348E-03
+1.995179E-05
+2.992857E-03
+7.453704E-06
+4.698724E-03
+6.277902E-06
+1.253456E-02
+4.253483E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.121671E-04
+9.744828E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+5.000000E-02
+5.100000E-04
+1.664620E-02
+7.437727E-05
+9.397450E-03
+4.322575E-05
+6.836310E-03
+1.231705E-05
+1.905990E-02
+7.550592E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.122996E-03
+1.372865E-06
+1.000000E-03
+1.000000E-06
+8.132758E-04
+6.614176E-07
+4.921264E-04
+2.421884E-07
+1.248736E-04
+1.559342E-08
+9.084356E-04
+8.252553E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.100000E-02
+9.500000E-05
+6.491403E-03
+1.250504E-05
+2.902964E-03
+5.648898E-06
+2.149247E-03
+2.668074E-06
+8.776336E-03
+1.780557E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.131510E-04
+1.880396E-07
+1.000000E-03
+1.000000E-06
+-6.320900E-04
+3.995377E-07
+9.930661E-05
+9.861803E-09
+3.167755E-04
+1.003467E-07
+1.239313E-03
+9.687296E-07
+1.000000E-03
+1.000000E-06
+9.677184E-04
+9.364790E-07
+9.047184E-04
+8.185155E-07
+8.140422E-04
+6.626647E-07
+0.000000E+00
+0.000000E+00
+3.000000E-02
+2.020000E-04
+7.960428E-03
+1.748184E-05
+1.857609E-03
+3.751885E-06
+3.621909E-03
+7.252984E-06
+1.365034E-02
+4.336505E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.900000E-02
+1.970000E-04
+5.726309E-03
+1.204288E-05
+-2.562602E-03
+8.796860E-06
+-5.408669E-04
+1.879390E-06
+1.269835E-02
+3.424162E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.226228E-04
+4.787693E-07
+1.000000E-03
+1.000000E-06
+-1.650338E-04
+2.723616E-08
+-4.591458E-04
+2.108148E-07
+2.363135E-04
+5.584407E-08
+2.982887E-04
+8.897613E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.100000E-02
+1.070000E-04
+7.115739E-03
+1.595026E-05
+3.891656E-03
+4.927392E-06
+4.624860E-03
+6.824558E-06
+8.816934E-03
+1.684675E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.982887E-04
+8.897613E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.029518E-04
+8.153220E-07
+1.000000E-03
+1.000000E-06
+9.531896E-04
+9.085703E-07
+8.628555E-04
+7.445196E-07
+7.353151E-04
+5.406883E-07
+0.000000E+00
+0.000000E+00
+8.000000E-03
+1.800000E-05
+1.619128E-03
+7.769465E-06
+2.613435E-03
+3.211760E-06
+1.405519E-03
+3.351048E-06
+4.513046E-03
+5.346316E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.009839E-04
+9.059133E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.600000E-02
+1.760000E-04
+3.827326E-03
+1.821256E-05
+8.165880E-03
+1.737446E-05
+3.271322E-03
+1.161207E-05
+1.089998E-02
+2.472251E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.197919E-03
+7.175165E-07
+1.000000E-03
+1.000000E-06
+7.256235E-04
+5.265295E-07
+2.897942E-04
+8.398069E-08
+-1.332798E-04
+1.776351E-08
+3.028119E-04
+9.169503E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.400000E-02
+5.800000E-05
+8.561790E-03
+2.265799E-05
+4.539886E-03
+5.757407E-06
+1.780257E-03
+1.445049E-06
+9.412238E-03
+1.952619E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.006709E-04
+9.040301E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.900000E-02
+9.700000E-05
+1.187186E-02
+4.638870E-05
+5.669447E-03
+1.326414E-05
+2.818347E-03
+3.568113E-06
+6.363682E-03
+9.079681E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.198545E-03
+7.182698E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.013419E-04
+3.616120E-07
+1.000000E-03
+1.000000E-06
+9.751330E-04
+9.508843E-07
+9.263265E-04
+8.580808E-07
+8.553972E-04
+7.317044E-07
+0.000000E+00
+0.000000E+00
+1.000000E-02
+3.800000E-05
+5.100191E-03
+1.213804E-05
+2.526446E-03
+3.184717E-06
+1.120621E-03
+2.386039E-06
+4.520264E-03
+6.456267E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.062947E-04
+4.571831E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.700000E-02
+6.300000E-05
+3.401093E-03
+4.752976E-06
+-1.430942E-04
+2.289223E-06
+5.850560E-04
+2.116365E-06
+7.249747E-03
+1.181285E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+9.138219E-04
+2.784426E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.700000E-02
+9.900000E-05
+3.395904E-03
+1.353897E-05
+2.976877E-03
+2.251417E-06
+-1.066663E-04
+2.608803E-06
+7.331520E-03
+1.571258E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+5.989596E-04
+1.793791E-07
+2.000000E-03
+2.000000E-06
+7.367234E-04
+9.571208E-07
+4.356812E-04
+9.323439E-07
+1.039334E-03
+6.364636E-07
+1.505322E-03
+1.521066E-06
+1.000000E-03
+1.000000E-06
+9.879014E-04
+9.759491E-07
+9.639237E-04
+9.291489E-07
+9.285017E-04
+8.621153E-07
+0.000000E+00
+0.000000E+00
+1.900000E-02
+8.700000E-05
+2.777211E-03
+1.700824E-05
+4.035787E-03
+9.429368E-06
+2.980203E-05
+1.242805E-06
+1.000369E-02
+2.268829E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.900000E-02
+1.030000E-04
+7.734629E-03
+1.531457E-05
+5.093139E-03
+7.117666E-06
+5.058900E-03
+5.942325E-06
+7.269012E-03
+1.354949E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.009839E-04
+9.059133E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.243342E-04
+3.897931E-07
+1.000000E-03
+1.000000E-06
+8.016563E-05
+6.426528E-09
+-4.903602E-04
+2.404531E-07
+-1.189605E-04
+1.415159E-08
+0.000000E+00
+0.000000E+00
+1.200000E-02
+4.600000E-05
+1.345552E-03
+1.661602E-06
+-1.840162E-03
+1.071811E-06
+6.885070E-04
+5.102453E-07
+5.789780E-03
+8.745856E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+8.000000E-03
+1.600000E-05
+6.633314E-03
+1.270264E-05
+4.628987E-03
+9.066793E-06
+2.905876E-03
+6.021797E-06
+4.223000E-03
+4.683691E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.013419E-04
+3.616120E-07
+1.000000E-03
+1.000000E-06
+4.295537E-04
+1.845164E-07
+-2.232254E-04
+4.982957E-08
+-4.461813E-04
+1.990778E-07
+1.207033E-03
+8.982334E-07
+2.000000E-03
+4.000000E-06
+1.368640E-03
+1.873175E-06
+5.907660E-04
+3.490045E-07
+1.853769E-04
+3.436459E-08
+0.000000E+00
+0.000000E+00
+6.000000E-03
+1.000000E-05
+3.102529E-03
+2.944216E-06
+3.553054E-03
+4.061545E-06
+2.423850E-03
+1.659791E-06
+2.405752E-03
+1.989485E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+5.965773E-04
+3.559045E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.200000E-02
+5.000000E-05
+7.180171E-03
+1.778928E-05
+2.622812E-03
+2.636835E-06
+1.108650E-03
+9.983372E-07
+6.665077E-03
+1.320251E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.028119E-04
+9.169503E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.200000E-02
+1.300000E-04
+1.098015E-02
+3.419417E-05
+5.083853E-03
+6.677488E-06
+2.962020E-03
+3.751133E-06
+1.115370E-02
+3.284251E-05
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.982887E-04
+8.897613E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+6.000000E-03
+1.000000E-05
+1.904880E-03
+1.700404E-06
+-5.545137E-04
+1.781015E-06
+-9.756510E-05
+6.625846E-07
+3.325684E-03
+2.829537E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+2.000000E-03
+2.000000E-06
+5.259036E-04
+2.147833E-07
+-6.778250E-04
+2.773263E-07
+-5.470874E-04
+2.096746E-07
+6.016549E-04
+1.809943E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+7.000000E-03
+1.700000E-05
+5.770569E-03
+1.116420E-05
+4.074122E-03
+5.715629E-06
+2.739484E-03
+2.864833E-06
+3.630946E-03
+2.739811E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+3.028119E-04
+9.169503E-08
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+1.000000E-02
+2.600000E-05
+3.940359E-03
+1.345990E-05
+4.066207E-03
+4.701591E-06
+2.653786E-03
+1.896780E-06
+3.626422E-03
+2.904169E-06
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+8.948660E-04
+8.007852E-07
+1.000000E-03
+1.000000E-06
+8.049124E-04
+6.478840E-07
+4.718259E-04
+2.226197E-07
+9.635598E-05
+9.284475E-09
+9.084356E-04
+8.252553E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+4.000000E-03
+4.000000E-06
+2.476562E-03
+1.946838E-06
+9.202571E-04
+1.346950E-06
+4.114154E-04
+1.017884E-06
+1.812898E-03
+9.066599E-07
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+0.000000E+00
+tally 2:
+5.656024E-01
+6.399997E-02
+6.163195E-01
+7.599803E-02
+3.586752E+00
+2.573838E+00
+3.990119E+01
+3.185144E+02
diff --git a/tests/test_sourcepoint_restart/settings.xml b/tests/test_sourcepoint_restart/settings.xml
new file mode 100644
index 000000000..4e9b12d24
--- /dev/null
+++ b/tests/test_sourcepoint_restart/settings.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ 10
+ 5
+ 1000
+
+
+
+
+ -4 -4 -4 4 4 4
+
+
+
+
diff --git a/tests/test_sourcepoint_restart/tallies.xml b/tests/test_sourcepoint_restart/tallies.xml
new file mode 100644
index 000000000..1704f56e1
--- /dev/null
+++ b/tests/test_sourcepoint_restart/tallies.xml
@@ -0,0 +1,23 @@
+
+
+
+
+ rectangular
+ 5 3 4
+ -10. -5. 0.
+ 10. 4. 9.
+
+
+
+
+
+
+ scatter-P3 nu-fission
+
+
+
+
+ fission absorption total flux
+
+
+
\ No newline at end of file
diff --git a/tests/test_sourcepoint_restart/test_sourcepoint_restart.py b/tests/test_sourcepoint_restart/test_sourcepoint_restart.py
new file mode 100644
index 000000000..0eaf1198c
--- /dev/null
+++ b/tests/test_sourcepoint_restart/test_sourcepoint_restart.py
@@ -0,0 +1,129 @@
+#!/usr/bin/env python
+
+import os
+from subprocess import Popen, STDOUT, PIPE, call
+import filecmp
+from nose_mpi import NoseMPI
+import glob
+
+pwd = os.path.dirname(__file__)
+
+def setup():
+ os.putenv('PWD', pwd)
+ os.chdir(pwd)
+
+def test_run():
+ openmc_path = pwd + '/../../src/openmc'
+ if int(NoseMPI.mpi_np) > 0:
+ proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path],
+ stderr=STDOUT, stdout=PIPE)
+ else:
+ proc = Popen([openmc_path], stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_created_statepoint():
+ statepoint = glob.glob(pwd + '/statepoint.*')
+ assert len(statepoint) == 2
+ assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5')
+ sourcepoint = glob.glob(pwd + '/source.7.*')
+ assert len(sourcepoint) == 1
+ assert sourcepoint[0].endswith('binary') or sourcepoint[0].endswith('h5')
+
+def test_results():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ call(['python', 'results.py', statepoint[0]])
+ compare = filecmp.cmp('results_test.dat', 'results_true.dat')
+ if not compare:
+ os.rename('results_test.dat', 'results_error.dat')
+ assert compare
+ os.remove(statepoint[0])
+
+def test_restart_form1():
+ statepoint = glob.glob(pwd + '/statepoint.7.*')
+ sourcepoint = glob.glob(pwd + '/source.7.*')
+ openmc_path = pwd + '/../../src/openmc'
+ if int(NoseMPI.mpi_np) > 0:
+ proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path,
+ '-r', statepoint[0], sourcepoint[0]],
+ stderr=STDOUT, stdout=PIPE)
+ else:
+ proc = Popen([openmc_path, '-r', statepoint[0], sourcepoint[0]], stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_created_statepoint_form1():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ assert len(statepoint) == 1
+ assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5')
+
+def test_results_form1():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ call(['python', 'results.py', statepoint[0]])
+ compare = filecmp.cmp('results_test.dat', 'results_true.dat')
+ if not compare:
+ os.rename('results_test.dat', 'results_error.dat')
+ assert compare
+ os.remove(statepoint[0])
+
+def test_restart_form2():
+ statepoint = glob.glob(pwd + '/statepoint.7.*')
+ sourcepoint = glob.glob(pwd + '/source.7.*')
+ openmc_path = pwd + '/../../src/openmc'
+ if int(NoseMPI.mpi_np) > 0:
+ proc = Popen([NoseMPI.mpi_exec, '-np', NoseMPI.mpi_np, openmc_path,
+ '--restart', statepoint[0], sourcepoint[0]],
+ stderr=STDOUT, stdout=PIPE)
+ else:
+ proc = Popen([openmc_path, '--restart', statepoint[0], sourcepoint[0]],
+ stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_created_statepoint_form2():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ assert len(statepoint) == 1
+ assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5')
+
+def test_results_form2():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ call(['python', 'results.py', statepoint[0]])
+ compare = filecmp.cmp('results_test.dat', 'results_true.dat')
+ if not compare:
+ os.rename('results_test.dat', 'results_error.dat')
+ assert compare
+ os.remove(statepoint[0])
+
+def test_restart_serial():
+ statepoint = glob.glob(pwd + '/statepoint.7.*')
+ sourcepoint = glob.glob(pwd + '/source.7.*')
+ openmc_path = pwd + '/../../src/openmc'
+ proc = Popen([openmc_path, '--restart', statepoint[0], sourcepoint[0]],
+ stderr=STDOUT, stdout=PIPE)
+ print(proc.communicate()[0])
+ returncode = proc.returncode
+ assert returncode == 0
+
+def test_created_statepoint_serial():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ assert len(statepoint) == 1
+ assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5')
+
+def test_results_serial():
+ statepoint = glob.glob(pwd + '/statepoint.10.*')
+ call(['python', 'results.py', statepoint[0]])
+ compare = filecmp.cmp('results_test.dat', 'results_true.dat')
+ if not compare:
+ os.rename('results_test.dat', 'results_error.dat')
+ assert compare
+
+def teardown():
+ output = glob.glob(pwd + '/statepoint.*')
+ output += glob.glob(pwd + '/source.*')
+ output.append(pwd + '/results_test.dat')
+ for f in output:
+ if os.path.exists(f):
+ os.remove(f)
diff --git a/tests/test_statepoint_sourcesep/settings.xml b/tests/test_statepoint_sourcesep/settings.xml
index 4f5b7691f..17d4ee2e2 100644
--- a/tests/test_statepoint_sourcesep/settings.xml
+++ b/tests/test_statepoint_sourcesep/settings.xml
@@ -1,7 +1,8 @@
-
+
+
10