mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Overload __invert__ for Halfspace (return opposite Halfspace)
This commit is contained in:
parent
bb4608cf13
commit
cfb17517eb
1 changed files with 3 additions and 0 deletions
|
|
@ -988,6 +988,9 @@ class Halfspace(Region):
|
|||
self.surface = surface
|
||||
self.side = side
|
||||
|
||||
def __invert__(self):
|
||||
return -self.surface if self.side == '+' else +self.surface
|
||||
|
||||
@property
|
||||
def surface(self):
|
||||
return self._surface
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue