mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge pull request #875 from paulromano/is-vs-equals
Make sure == is used instead of 'is' in a few places
This commit is contained in:
commit
4ab11c91bd
2 changed files with 4 additions and 4 deletions
|
|
@ -380,7 +380,7 @@ class Material(object):
|
|||
cv.check_value('density units', units, DENSITY_UNITS)
|
||||
self._density_units = units
|
||||
|
||||
if units is 'sum':
|
||||
if units == 'sum':
|
||||
if density is not None:
|
||||
msg = 'Density "{}" for Material ID="{}" is ignored ' \
|
||||
'because the unit is "sum"'.format(density, self.id)
|
||||
|
|
|
|||
|
|
@ -970,13 +970,13 @@ def pack_trisos(radius, fill, domain_shape='cylinder', domain_length=None,
|
|||
raise ValueError('"domain_radius" must be specified for {} domain '
|
||||
'geometry '.format(domain_shape))
|
||||
|
||||
if domain_shape is 'cube':
|
||||
if domain_shape == 'cube':
|
||||
domain = _CubicDomain(length=domain_length, particle_radius=radius,
|
||||
center=domain_center)
|
||||
elif domain_shape is 'cylinder':
|
||||
elif domain_shape == 'cylinder':
|
||||
domain = _CylindricalDomain(length=domain_length, radius=domain_radius,
|
||||
particle_radius=radius, center=domain_center)
|
||||
elif domain_shape is 'sphere':
|
||||
elif domain_shape == 'sphere':
|
||||
domain = _SphericalDomain(radius=domain_radius, particle_radius=radius,
|
||||
center=domain_center)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue