From 970cc4130a6ff85ecfd3757b2d0e818144bdd39e Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 16 May 2016 16:28:57 -0500 Subject: [PATCH] Fix hexagon region orientation --- openmc/surface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmc/surface.py b/openmc/surface.py index 84028c1afa..52f0955f00 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -1527,7 +1527,7 @@ def make_hexagon_region(edge_length=1., orientation='y'): l = edge_length - if orientation == 'x': + if orientation == 'y': right = XPlane(x0=sqrt(3.)/2.*l) left = XPlane(x0=-sqrt(3.)/2.*l) c = sqrt(3.)/3. @@ -1537,7 +1537,7 @@ def make_hexagon_region(edge_length=1., orientation='y'): ll = Plane(A=c, B=1., D=-l) # y = -x/sqrt(3) - a return Intersection(-right, +left, -ur, -ul, +lr, +ll) - elif orientation == 'y': + elif orientation == 'x': top = YPlane(y0=sqrt(3.)/2.*l) bottom = YPlane(y0=-sqrt(3.)/2.*l) c = sqrt(3.)