mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Merge pull request #772 from paulromano/hotfix-density
Allow materials with density units='sum' to be exported
This commit is contained in:
commit
499bf9bae7
1 changed files with 2 additions and 2 deletions
|
|
@ -762,9 +762,9 @@ class Material(object):
|
|||
subelement.text = str(self.temperature)
|
||||
|
||||
# Create density XML subelement
|
||||
if self._density is not None:
|
||||
if self._density is not None or self._density_units == 'sum':
|
||||
subelement = ET.SubElement(element, "density")
|
||||
if self._density_units is not 'sum':
|
||||
if self._density_units != 'sum':
|
||||
subelement.set("value", str(self._density))
|
||||
subelement.set("units", self._density_units)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue