mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Changes in universe.py from PullRequest Inc. review
This commit is contained in:
parent
cceaa10893
commit
a04c1adcd2
1 changed files with 5 additions and 6 deletions
|
|
@ -54,7 +54,7 @@ class Universe(IDManagerMixin):
|
|||
self._volume = None
|
||||
self._atoms = {}
|
||||
|
||||
# Keys - Cell IDs
|
||||
# Keys - Cell IDs
|
||||
# Values - Cells
|
||||
self._cells = OrderedDict()
|
||||
|
||||
|
|
@ -63,10 +63,9 @@ class Universe(IDManagerMixin):
|
|||
|
||||
def __repr__(self):
|
||||
string = 'Universe\n'
|
||||
string += '{0: <16}{1}{2}\n'.format('\tID', '=\t', self._id)
|
||||
string += '{0: <16}{1}{2}\n'.format('\tName', '=\t', self._name)
|
||||
string += '{0: <16}{1}{2}\n'.format('\tCells', '=\t',
|
||||
list(self._cells.keys()))
|
||||
string += '{: <16}=\t{}\n'.format('\tID', self._id)
|
||||
string += '{: <16}=\t{}\n'.format('\tName', self._name)
|
||||
string += '{: <16}=\t{}\n'.format('\tCells', list(self._cells.keys()))
|
||||
return string
|
||||
|
||||
@property
|
||||
|
|
@ -542,7 +541,7 @@ class Universe(IDManagerMixin):
|
|||
|
||||
"""
|
||||
# Iterate over all Cells
|
||||
for cell_id, cell in self._cells.items():
|
||||
for cell in self._cells.values():
|
||||
|
||||
# If the cell was already written, move on
|
||||
if memo and cell in memo:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue