mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Restrict the Cell.rotation property to cells filled with a Universe
This commit is contained in:
parent
8ff23e9f98
commit
962d592d2e
1 changed files with 4 additions and 0 deletions
|
|
@ -243,6 +243,10 @@ class Cell(object):
|
|||
|
||||
@rotation.setter
|
||||
def rotation(self, rotation):
|
||||
if not isinstance(self.fill, openmc.Universe):
|
||||
raise RuntimeError('Cell rotation can only be applied if the cell '
|
||||
'is filled with a Universe')
|
||||
|
||||
cv.check_type('cell rotation', rotation, Iterable, Real)
|
||||
cv.check_length('cell rotation', rotation, 3)
|
||||
self._rotation = rotation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue