mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Fix imports in cell and lattice modules
This commit is contained in:
parent
14dc134869
commit
0339809deb
2 changed files with 6 additions and 5 deletions
|
|
@ -9,7 +9,6 @@ import openmc.checkvalue as cv
|
|||
from openmc.surface import Halfspace
|
||||
from openmc.region import Region, Intersection, Complement
|
||||
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
basestring = str
|
||||
|
||||
|
|
@ -112,7 +111,7 @@ class Cell(object):
|
|||
string += ', '.join(['void' if m == 'void' else str(m.id)
|
||||
for m in self.fill])
|
||||
string += ']\n'
|
||||
elif isinstance(self._fill, (Universe, Lattice)):
|
||||
elif isinstance(self._fill, (openmc.Universe, openmc.Lattice)):
|
||||
string += '{0: <16}{1}{2}\n'.format('\tFill', '=\t',
|
||||
self._fill._id)
|
||||
else:
|
||||
|
|
@ -210,10 +209,10 @@ class Cell(object):
|
|||
(openmc.Material, basestring))
|
||||
self._type = 'normal'
|
||||
|
||||
elif isinstance(fill, Universe):
|
||||
elif isinstance(fill, openmc.Universe):
|
||||
self._type = 'fill'
|
||||
|
||||
elif isinstance(fill, Lattice):
|
||||
elif isinstance(fill, openmc.Lattice):
|
||||
self._type = 'lattice'
|
||||
|
||||
else:
|
||||
|
|
@ -407,7 +406,7 @@ class Cell(object):
|
|||
element.set("material", ' '.join([m if m == 'void' else str(m.id)
|
||||
for m in self.fill]))
|
||||
|
||||
elif isinstance(self.fill, (Universe, Lattice)):
|
||||
elif isinstance(self.fill, (openmc.Universe, openmc.Lattice)):
|
||||
element.set("fill", str(self.fill.id))
|
||||
self.fill.create_xml_subelement(xml_element)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
import abc
|
||||
from collections import OrderedDict, Iterable
|
||||
from numbers import Real, Integral
|
||||
from xml.etree import ElementTree as ET
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
|
||||
import openmc.checkvalue as cv
|
||||
from openmc.universe import Universe, AUTO_UNIVERSE_ID
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue