Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ordering of halfspaces for RectangularParallelepiped #2146

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openmc/model/surface_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,10 @@ def __init__(self, xmin, xmax, ymin, ymax, zmin, zmax, **kwargs):
self.zmax = openmc.ZPlane(z0=zmax, **kwargs)

def __neg__(self):
return +self.xmin & -self.xmax & +self.ymin & -self.ymax & +self.zmin & -self.zmax
return -self.xmax & +self.xmin & -self.ymax & +self.ymin & -self.zmax & +self.zmin

def __pos__(self):
return -self.xmin | +self.xmax | -self.ymin | +self.ymax | -self.zmin | +self.zmax
return +self.xmax | -self.xmin | +self.ymax | -self.ymin | +self.zmax | -self.zmin


class XConeOneSided(CompositeSurface):
Expand Down
2 changes: 1 addition & 1 deletion tests/regression_tests/torus/inputs_true.dat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<cell id="1" material="1" region="-2" universe="1" />
<cell id="2" material="1" region="-3" universe="1" />
<cell id="3" material="1" region="-1" universe="1" />
<cell id="4" material="2" region="4 -5 6 -7 8 -9 2 3 1" universe="1" />
<cell id="4" material="2" region="-5 4 -7 6 -9 8 2 3 1" universe="1" />
<surface coeffs="0.0 0.0 0.0 3 1.5 1" id="1" type="z-torus" />
<surface coeffs="6 0.0 0.0 3 1.5 1" id="2" type="x-torus" />
<surface coeffs="6 0.0 0.0 6 1 0.75" id="3" type="y-torus" />
Expand Down