Fixed OpenMOC compatibility Sphinx docs and region parsing

This commit is contained in:
Will Boyd 2017-02-28 15:24:35 -05:00
parent 20516319bd
commit fee4f7d6f5
2 changed files with 4 additions and 2 deletions

View file

@ -1,8 +1,8 @@
.. _pythonapi_openmoc_compatible:
====================
=====================
OpenMOC Compatibility
====================
=====================
.. automodule:: openmc.openmoc_compatible
:members:

View file

@ -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)