FEM: coverity, control flow issues

This commit is contained in:
Bernd Hahnebach
2020-07-20 22:29:20 +02:00
parent 8a6eaed01f
commit af4a520716

View File

@@ -590,11 +590,9 @@ class Writer(object):
densityQuantity = Units.Quantity(m["Density"])
dimension = "M/L^3"
if name.startswith("Edge"):
# not tested, but it seems needed
# because density does not exist (IMHO, bernd)
density = None
if density:
density.Unit = Units.Unit(-2, 1)
# not tested, bernd
# TODO: test
densityQuantity.Unit = Units.Unit(-2, 1)
dimension = "M/L^2"
density = self._convert(densityQuantity, dimension)