FEM: code formating, use better variable name in the regard of codespell tool

This commit is contained in:
Bernd Hahnebach 2017-03-01 15:52:40 +01:00 committed by Yorik van Havre
parent 886ba74bfd
commit fb833d4a8a

View File

@ -270,29 +270,29 @@ class FemGmshTools():
# print(" One element of the meshregion " + mr_obj.Name + " is not an element of the Part to mesh.")
# print(" But we gone try to find it in the Shape to mesh :-)")
search_ele_in_shape_to_mesh = True
for eles in sub[1]:
# print(eles) # element
for elems in sub[1]:
# print(elems) # elems --> element
if search_ele_in_shape_to_mesh:
# we gone try to find the element it in the Shape to mesh and use the found element as eles
ele_shape = FemMeshTools.get_element(sub[0], eles) # the method getElement(element) does not return Solid elements
# we gone try to find the element it in the Shape to mesh and use the found element as elems
ele_shape = FemMeshTools.get_element(sub[0], elems) # the method getElement(element) does not return Solid elements
found_element = FemMeshTools.find_element_in_shape(self.part_obj.Shape, ele_shape)
if found_element:
eles = found_element
elems = found_element
else:
FreeCAD.Console.PrintError("One element of the meshregion " + mr_obj.Name + " could not be found in the Part to mesh. It will be ignored.\n")
# print(eles) # element
if eles not in self.ele_length_map:
self.ele_length_map[eles] = Units.Quantity(mr_obj.CharacteristicLength).Value
# print(elems) # element
if elems not in self.ele_length_map:
self.ele_length_map[elems] = Units.Quantity(mr_obj.CharacteristicLength).Value
else:
FreeCAD.Console.PrintError("The element " + eles + " of the meshregion " + mr_obj.Name + " has been added to another mesh region.\n")
FreeCAD.Console.PrintError("The element " + elems + " of the meshregion " + mr_obj.Name + " has been added to another mesh region.\n")
else:
FreeCAD.Console.PrintError("The meshregion: " + mr_obj.Name + " is not used to create the mesh because the reference list is empty.\n")
else:
FreeCAD.Console.PrintError("The meshregion: " + mr_obj.Name + " is not used to create the mesh because the CharacteristicLength is 0.0 mm.\n")
for elel in self.ele_length_map:
ele_shape = FemMeshTools.get_element(self.part_obj, elel) # the method getElement(element) does not return Solid elements
for eleml in self.ele_length_map:
ele_shape = FemMeshTools.get_element(self.part_obj, eleml) # the method getElement(element) does not return Solid elements
ele_vertexes = FemMeshTools.get_vertexes_by_element(self.part_obj.Shape, ele_shape)
self.ele_node_map[elel] = ele_vertexes
self.ele_node_map[eleml] = ele_vertexes
print(' {}'.format(self.ele_length_map))
print(' {}'.format(self.ele_node_map))