From 08219585f9328968e3ed49e42b89bb2eb3d4796a Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sat, 20 Aug 2016 16:50:14 -0500 Subject: [PATCH] Fix two documentation issues --- .../pythonapi/examples/mdgxs-part-i.rst | 13 ++++++++++++ .../pythonapi/examples/mdgxs-part-ii.rst | 13 ++++++++++++ openmc/mesh.py | 21 ++++++++++++------- 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 docs/source/pythonapi/examples/mdgxs-part-i.rst create mode 100644 docs/source/pythonapi/examples/mdgxs-part-ii.rst diff --git a/docs/source/pythonapi/examples/mdgxs-part-i.rst b/docs/source/pythonapi/examples/mdgxs-part-i.rst new file mode 100644 index 000000000..953dcf470 --- /dev/null +++ b/docs/source/pythonapi/examples/mdgxs-part-i.rst @@ -0,0 +1,13 @@ +.. _notebook_mdgxs_part_i: + +========================== +MDGXS Part I: Introduction +========================== + +.. only:: html + + .. notebook:: mdgxs-part-i.ipynb + +.. only:: latex + + IPython notebooks must be viewed in the online HTML documentation. diff --git a/docs/source/pythonapi/examples/mdgxs-part-ii.rst b/docs/source/pythonapi/examples/mdgxs-part-ii.rst new file mode 100644 index 000000000..a42eb766b --- /dev/null +++ b/docs/source/pythonapi/examples/mdgxs-part-ii.rst @@ -0,0 +1,13 @@ +.. _notebook_mdgxs_part_ii: + +================================ +MDGXS Part II: Advanced Features +================================ + +.. only:: html + + .. notebook:: mdgxs-part-ii.ipynb + +.. only:: latex + + IPython notebooks must be viewed in the online HTML documentation. diff --git a/openmc/mesh.py b/openmc/mesh.py index 58b9c7c0e..7d7b483f7 100644 --- a/openmc/mesh.py +++ b/openmc/mesh.py @@ -187,15 +187,20 @@ class Mesh(object): of the mesh. For example the following code: - for mesh_index in mymesh.cell_generator(): - print mesh_index - will produce the following output for a 3-D 2x2x2 mesh in mymesh: - [1, 1, 1] - [1, 1, 2] - [1, 2, 1] - [1, 2, 2] - ... + .. code-block:: python + + for mesh_index in mymesh.cell_generator(): + print mesh_index + + will produce the following output for a 3-D 2x2x2 mesh in mymesh:: + + [1, 1, 1] + [1, 1, 2] + [1, 2, 1] + [1, 2, 2] + ... + """