From 18261268a89274c91f51a88bad1d8505feb68c1a Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 6 Mar 2017 22:28:46 -0600 Subject: [PATCH 1/3] Make Jupyter notebooks look better in documentation --- docs/source/_static/theme_overrides.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css index dea941814..2d5e114c7 100644 --- a/docs/source/_static/theme_overrides.css +++ b/docs/source/_static/theme_overrides.css @@ -20,3 +20,10 @@ .wy-side-nav-search { background-color: #343131; } + +/* Make embedded Jupyter notebooks look better */ +div#notebook-container.container { + padding: 0px; + width: auto; + box-shadow: none; +} From 4ac28c29d42d981799062ee38cac321314379626 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 7 Mar 2017 15:16:57 -0600 Subject: [PATCH 2/3] Prevent tables from spilling in the user's guide --- docs/source/usersguide/index.rst | 2 +- docs/source/usersguide/input.rst | 280 ++++++++++++++++--------------- 2 files changed, 144 insertions(+), 138 deletions(-) diff --git a/docs/source/usersguide/index.rst b/docs/source/usersguide/index.rst index f8b4e64fa..cbdb60806 100644 --- a/docs/source/usersguide/index.rst +++ b/docs/source/usersguide/index.rst @@ -9,7 +9,7 @@ essential aspects of using OpenMC to perform simulations. .. toctree:: :numbered: - :maxdepth: 3 + :maxdepth: 2 beginners install diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 284f4f41a..6be692a21 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -1494,145 +1494,13 @@ The ```` element accepts the following sub-elements: :type: The type of the filter. Accepted options are "cell", "cellborn", - "material", "universe", "energy", "energyout", "mesh", "distribcell", - "delayedgroup", and "energyfunction". + "material", "universe", "energy", "energyout", "mu", "polar", + "azimuthal", "mesh", "distribcell", "delayedgroup", and + "energyfunction". :bins: - For each filter type, the corresponding ``bins`` entry is given as - follows: - - :cell: - A list of cells in which the tally should be accumulated. - - :cellborn: - This filter allows the tally to be scored to only when particles were - originally born in a specified cell. - - :surface: - A list of surfaces for which the tally should be accumulated. - - :material: - A list of materials for which the tally should be accumulated. - - :universe: - A list of universes for which the tally should be accumulated. - - :energy: - In continuous-energy mode, this filter should be provided as a - monotonically increasing list of bounding **pre-collision** energies - for a number of groups. For example, if this filter is specified as - - .. code-block:: xml - - - - then two energy bins will be created, one with energies between 0 and - 1 MeV and the other with energies between 1 and 20 MeV. - - In multi-group mode the bins provided must match group edges - defined in the multi-group library. - - :energyout: - In continuous-energy mode, this filter should be provided as a - monotonically increasing list of bounding **post-collision** energies - for a number of groups. For example, if this filter is specified as - - .. code-block:: xml - - - - then two post-collision energy bins will be created, one with - energies between 0 and 1 MeV and the other with energies between - 1 and 20 MeV. - - In multi-group mode the bins provided must match group edges - defined in the multi-group library. - - :mu: - A monotonically increasing list of bounding **post-collision** cosines - of the change in a particle's angle (i.e., :math:`\mu = \hat{\Omega} - \cdot \hat{\Omega}'`), which represents a portion of the possible - values of :math:`[-1,1]`. For example, spanning all of :math:`[-1,1]` - with five equi-width bins can be specified as: - - .. code-block:: xml - - - - Alternatively, if only one value is provided as a bin, OpenMC will - interpret this to mean the complete range of :math:`[-1,1]` should - be automatically subdivided in to the provided value for the bin. - That is, the above example of five equi-width bins spanning - :math:`[-1,1]` can be instead written as: - - .. code-block:: xml - - - - :polar: - A monotonically increasing list of bounding particle polar angles - which represents a portion of the possible values of :math:`[0,\pi]`. - For example, spanning all of :math:`[0,\pi]` with five equi-width - bins can be specified as: - - .. code-block:: xml - - - - Alternatively, if only one value is provided as a bin, OpenMC will - interpret this to mean the complete range of :math:`[0,\pi]` should - be automatically subdivided in to the provided value for the bin. - That is, the above example of five equi-width bins spanning - :math:`[0,\pi]` can be instead written as: - - .. code-block:: xml - - - - :azimuthal: - A monotonically increasing list of bounding particle azimuthal angles - which represents a portion of the possible values of :math:`[-\pi,\pi)`. - For example, spanning all of :math:`[-\pi,\pi)` with two equi-width - bins can be specified as: - - .. code-block:: xml - - - - Alternatively, if only one value is provided as a bin, OpenMC will - interpret this to mean the complete range of :math:`[-\pi,\pi)` should - be automatically subdivided in to the provided value for the bin. - That is, the above example of five equi-width bins spanning - :math:`[-\pi,\pi)` can be instead written as: - - .. code-block:: xml - - - - :mesh: - The ``id`` of a structured mesh to be tallied over. - - :distribcell: - The single cell which should be tallied uniquely for all instances. - - .. note:: - The distribcell filter will take a single cell ID and will tally - each unique occurrence of that cell separately. This filter will - not accept more than one cell ID. It is not recommended to combine - this filter with a cell or mesh filter. - - :delayedgroup: - A list of delayed neutron precursor groups for which the tally should - be accumulated. For instance, to tally to all 6 delayed groups in the - ENDF/B-VII.1 library the filter is specified as: - - .. code-block:: xml - - - - :energyfunction: - ``energyfunction`` filters do not use the ``bins`` entry. Instead - they use ``energy`` and ``y``. + A description of the bins for each type of filter can be found in + :ref:`filter_types`. :energy: ``energyfunction`` filters multiply tally scores by an arbitrary @@ -1941,6 +1809,144 @@ The ```` element accepts the following sub-elements: *Default*: None +.. _filter_types: + +Filter Types +++++++++++++ + +For each filter type, the following table describes what the ``bins`` attribute +should be set to: + +:cell: + A list of unique IDs for cells in which the tally should be accumulated. + +:cellborn: + This filter allows the tally to be scored to only when particles were + originally born in a specified cell. A list of cell IDs should be given. + +:material: + A list of unique IDs for matreials in which the tally should be accumulated. + +:universe: + A list of unique IDs for universes in which the tally should be accumulated. + +:energy: + In continuous-energy mode, this filter should be provided as a + monotonically increasing list of bounding **pre-collision** energies + for a number of groups. For example, if this filter is specified as + + .. code-block:: xml + + + + then two energy bins will be created, one with energies between 0 and + 1 MeV and the other with energies between 1 and 20 MeV. + + In multi-group mode the bins provided must match group edges + defined in the multi-group library. + +:energyout: + In continuous-energy mode, this filter should be provided as a + monotonically increasing list of bounding **post-collision** energies + for a number of groups. For example, if this filter is specified as + + .. code-block:: xml + + + + then two post-collision energy bins will be created, one with + energies between 0 and 1 MeV and the other with energies between + 1 and 20 MeV. + + In multi-group mode the bins provided must match group edges + defined in the multi-group library. + +:mu: + A monotonically increasing list of bounding **post-collision** cosines + of the change in a particle's angle (i.e., :math:`\mu = \hat{\Omega} + \cdot \hat{\Omega}'`), which represents a portion of the possible + values of :math:`[-1,1]`. For example, spanning all of :math:`[-1,1]` + with five equi-width bins can be specified as: + + .. code-block:: xml + + + + Alternatively, if only one value is provided as a bin, OpenMC will + interpret this to mean the complete range of :math:`[-1,1]` should + be automatically subdivided in to the provided value for the bin. + That is, the above example of five equi-width bins spanning + :math:`[-1,1]` can be instead written as: + + .. code-block:: xml + + + +:polar: + A monotonically increasing list of bounding particle polar angles + which represents a portion of the possible values of :math:`[0,\pi]`. + For example, spanning all of :math:`[0,\pi]` with five equi-width + bins can be specified as: + + .. code-block:: xml + + + + Alternatively, if only one value is provided as a bin, OpenMC will + interpret this to mean the complete range of :math:`[0,\pi]` should + be automatically subdivided in to the provided value for the bin. + That is, the above example of five equi-width bins spanning + :math:`[0,\pi]` can be instead written as: + + .. code-block:: xml + + + +:azimuthal: + A monotonically increasing list of bounding particle azimuthal angles + which represents a portion of the possible values of :math:`[-\pi,\pi)`. + For example, spanning all of :math:`[-\pi,\pi)` with two equi-width + bins can be specified as: + + .. code-block:: xml + + + + Alternatively, if only one value is provided as a bin, OpenMC will + interpret this to mean the complete range of :math:`[-\pi,\pi)` should + be automatically subdivided in to the provided value for the bin. + That is, the above example of five equi-width bins spanning + :math:`[-\pi,\pi)` can be instead written as: + + .. code-block:: xml + + + +:mesh: + The unique ID of a structured mesh to be tallied over. + +:distribcell: + The single cell which should be tallied uniquely for all instances. + + .. note:: The distribcell filter will take a single cell ID and will tally + each unique occurrence of that cell separately. This filter will not + accept more than one cell ID. It is not recommended to combine this + filter with a cell or mesh filter. + +:delayedgroup: + A list of delayed neutron precursor groups for which the tally should + be accumulated. For instance, to tally to all 6 delayed groups in the + ENDF/B-VII.1 library the filter is specified as: + + .. code-block:: xml + + + +:energyfunction: + ``energyfunction`` filters do not use the ``bins`` entry. Instead + they use ``energy`` and ``y``. + + ```` Element ------------------ From 81014270aacc408907bfa713ffe30d2d4c2f93ec Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 8 Mar 2017 09:38:15 -0600 Subject: [PATCH 3/3] Don't import openmc.openmoc_compatible by default --- openmc/__init__.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/openmc/__init__.py b/openmc/__init__.py index 04dd7f0aa..b35538558 100644 --- a/openmc/__init__.py +++ b/openmc/__init__.py @@ -28,11 +28,3 @@ from openmc.summary import * from openmc.particle_restart import * from openmc.mixin import * from openmc.plotter import * - -try: - # Ignore matplotlib warning caused by OpenMOC calling matplotlib.use() - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - from openmc.openmoc_compatible import * -except ImportError: - pass