Skip to content

Commit

Permalink
FEM: code formating, fenics import
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed May 27, 2019
1 parent ae0a164 commit f2bbb89
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/Mod/Fem/feminout/importFenicsMesh.py
Expand Up @@ -59,9 +59,10 @@ class WriteXDMFTaskPanel:
It will called if there are mesh groups detected. Else it will be bypassed.
"""
def __init__(self, fem_mesh_obj, fileString):
self.form = FreeCADGui.PySideUic.loadUi(
FreeCAD.getHomePath() +
"Mod/Fem/Resources/ui/MeshGroupXDMFExport.ui")
self.form = FreeCADGui.PySideUic.loadUi(os.path.join(
FreeCAD.getHomePath(),
"Mod/Fem/Resources/ui/MeshGroupXDMFExport.ui"
))
self.result_dict = {}
self.fem_mesh_obj = fem_mesh_obj
self.fileString = fileString
Expand All @@ -75,7 +76,8 @@ def ro(item):
return item

gmshgroups = importToolsFem.get_FemMeshObjectMeshGroups(
self.fem_mesh_obj)
self.fem_mesh_obj
)
fem_mesh = self.fem_mesh_obj.FemMesh

self.form.tableGroups.setRowCount(0)
Expand Down Expand Up @@ -123,9 +125,10 @@ def convert_table_to_group_dict(self):
marked_value = int(self.form.tableGroups.item(r, 4).text())
except ValueError:
FreeCAD.Console.PrintError(
"ERROR: value conversion failed " +
"in table to dict: assuming 0 for default, " +
"1 for marked.\n")
"ERROR: value conversion failed "
"in table to dict: assuming 0 for default, "
"1 for marked.\n"
)

group_values_dict[g] = (marked_value, default_value)

Expand Down

0 comments on commit f2bbb89

Please sign in to comment.