Skip to content

Commit

Permalink
FEM: writer base, fix regression introduce in calculix writer with ec…
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Sep 3, 2021
1 parent 12d0974 commit 37d9757
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Mod/Fem/femsolver/writerbase.py
Expand Up @@ -151,14 +151,14 @@ def write_constraints_meshsets(

def constraint_sets_loop_writing(the_file, femobjs, write_before, write_after):
if write_before != "":
f.write(write_before)
the_file.write(write_before)
for femobj in femobjs:
# femobj --> dict, FreeCAD document object is femobj["Object"]
the_obj = femobj["Object"]
f.write("** {}\n".format(the_obj.Label))
the_file.write("** {}\n".format(the_obj.Label))
con_module.write_meshdata_constraint(the_file, femobj, the_obj, self)
if write_after != "":
f.write(write_after)
the_file.write(write_after)

write_before = con_module.get_before_write_meshdata_constraint()
write_after = con_module.get_after_write_meshdata_constraint()
Expand All @@ -170,7 +170,6 @@ def constraint_sets_loop_writing(the_file, femobjs, write_before, write_after):

if self.split_inpfile is True:
file_name_split = "{}_{}.inp".format(self.mesh_name, write_name)
f.write("** {}\n".format(write_name.replace("_", " ")))
f.write("*INCLUDE,INPUT={}\n".format(file_name_split))
inpfile_split = open(join(self.dir_name, file_name_split), "w")
constraint_sets_loop_writing(inpfile_split, femobjs, write_before, write_after)
Expand Down

0 comments on commit 37d9757

Please sign in to comment.