From fee4f7d6f52f9158d1cbd676024935e288042a2b Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Tue, 28 Feb 2017 15:24:35 -0500 Subject: [PATCH] Fixed OpenMOC compatibility Sphinx docs and region parsing --- docs/source/pythonapi/openmoc_compatible.rst | 4 ++-- openmc/openmoc_compatible.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/pythonapi/openmoc_compatible.rst b/docs/source/pythonapi/openmoc_compatible.rst index a1d8ebe55..bf353b96e 100644 --- a/docs/source/pythonapi/openmoc_compatible.rst +++ b/docs/source/pythonapi/openmoc_compatible.rst @@ -1,8 +1,8 @@ .. _pythonapi_openmoc_compatible: -==================== +===================== OpenMOC Compatibility -==================== +===================== .. automodule:: openmc.openmoc_compatible :members: diff --git a/openmc/openmoc_compatible.py b/openmc/openmoc_compatible.py index a16c21206..fcedc945a 100644 --- a/openmc/openmoc_compatible.py +++ b/openmc/openmoc_compatible.py @@ -400,6 +400,8 @@ def get_openmc_cell(openmoc_cell): regions = [] for surf_id, surf_halfspace in openmoc_cell.getSurfaces().values(): + halfspace = surf_halfspace._halfspace + surface = get_openmc_surface(surf_halfspace._surface) regions.append(-surface if halfspace == -1 else +surface) openmc_cell.region = openmc.Intersection(*regions)