From c746d7a9faea3de7641bc4b0a08268fdd66569d6 Mon Sep 17 00:00:00 2001 From: "wbinventor@gmail.com" Date: Sat, 30 Jan 2016 11:44:54 -0500 Subject: [PATCH] Fixed issue with 3D lattice distribcell offsets --- openmc/summary.py | 1 - openmc/universe.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openmc/summary.py b/openmc/summary.py index eb14d3bb81..29c30c2936 100644 --- a/openmc/summary.py +++ b/openmc/summary.py @@ -368,7 +368,6 @@ class Summary(object): lattice.universes = universes if offsets is not None: - offsets = np.swapaxes(offsets, 0, 2) lattice.offsets = offsets # Add the Lattice to the global dictionary of all Lattices diff --git a/openmc/universe.py b/openmc/universe.py index 237ddce1f7..319acc3302 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -1101,8 +1101,8 @@ class RectLattice(Lattice): # For 3D Lattices else: - offset = self._offsets[i[1]-1, i[2]-1, i[3]-1, distribcell_index-1] - offset += self._universes[i[1]-1][i[2]-1][i[3]-1].get_cell_instance( + offset = self._offsets[i[3]-1, i[2]-1, i[1]-1, distribcell_index-1] + offset += self._universes[i[3]-1][i[2]-1][i[1]-1].get_cell_instance( path, distribcell_index) return offset