Skip to content

Commit

Permalink
writer.py: rebase with FreeCAD#8362
Browse files Browse the repository at this point in the history
  • Loading branch information
donovaly committed Feb 5, 2023
1 parent b440796 commit de2e9cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mod/Fem/femsolver/elmer/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def _handleElasticityBodyForces(self, bodies):
if obj is not None:
for name in bodies:
gravity = self.convert(self.constsdef["Gravity"], "L/T^2")
if self.getBodyMaterial(name) == None:
if self.getBodyMaterial(name) is None:
raise WriteError(
"The body {} is not referenced in any material.\n\n".format(name)
)
Expand Down Expand Up @@ -1721,7 +1721,7 @@ def _haveMaterialSolid(self):
for obj in self.getMember("App::MaterialObject"):
m = obj.Material
# fluid material always has KinematicViscosity defined
if not ("KinematicViscosity" in m):
if not "KinematicViscosity" in m:
return True
return False

Expand Down Expand Up @@ -1776,9 +1776,9 @@ def _getMeshDimension(self):
obj = self._getSingleMember("Fem::FemMeshObject")
if obj.Part.Shape.Solids:
return 3
elif obj.Part.Shape.Faces:
if obj.Part.Shape.Faces:
return 2
elif obj.Part.Shape.Edges:
if obj.Part.Shape.Edges:
return 1
return None

Expand Down

0 comments on commit de2e9cd

Please sign in to comment.