From cc571091a3709452d3f4ae9dafac5554c4a5df73 Mon Sep 17 00:00:00 2001 From: "wbinventor@gmail.com" Date: Sun, 31 Jan 2016 17:47:21 -0500 Subject: [PATCH] Hotfix for OpenMC-OpenCG lattice conversions with y index reversal for OpenCG --- openmc/opencg_compatible.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openmc/opencg_compatible.py b/openmc/opencg_compatible.py index 0bda48c160..a5573d9eb4 100644 --- a/openmc/opencg_compatible.py +++ b/openmc/opencg_compatible.py @@ -922,6 +922,9 @@ def get_opencg_lattice(openmc_lattice): universe_id = universes[z][y][x].id universe_array[z][y][x] = unique_universes[universe_id] + # Reverse y-dimension in array to match ordering in OpenCG + universe_array = universe_array[:, ::-1, :] + opencg_lattice = opencg.Lattice(lattice_id, name) opencg_lattice.dimension = dimension opencg_lattice.width = pitch