Skip to content

Commit

Permalink
FEM: calculix writer, fix regression added with 45dac67
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed May 10, 2020
1 parent cc82cf3 commit f54eba7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Mod/Fem/femsolver/calculix/writer.py
Expand Up @@ -29,7 +29,8 @@
## \addtogroup FEM
# @{

import io
# import io
import codecs
import os
import six
import sys
Expand Down Expand Up @@ -154,7 +155,8 @@ def write_calculix_input(self):
self.file_name,
self.fluid_inout_nodes_file
)
inpfileMain = io.open(self.file_name, "a", encoding="utf-8")
# inpfileMain = io.open(self.file_name, "a", encoding="utf-8")
inpfileMain = codecs.open(self.file_name, "a", encoding="utf-8")

# constraints independent from steps
self.write_constraints_planerotation(inpfileMain)
Expand Down Expand Up @@ -204,7 +206,8 @@ def write_mesh(self, inpfile_split=None):
if self.fluidsection_objects:
meshtools.write_D_network_element_to_inputfile(split_mesh_file_path)

inpfile = io.open(self.file_name, "w", encoding="utf-8")
# inpfile = io.open(self.file_name, "w", encoding="utf-8")
inpfile = codecs.open(self.file_name, "w", encoding="utf-8")
inpfile.write("***********************************************************\n")
inpfile.write("** {}\n".format(write_name))
inpfile.write("*INCLUDE,INPUT={}\n".format(file_name_splitt))
Expand All @@ -222,7 +225,8 @@ def write_mesh(self, inpfile_split=None):
meshtools.write_D_network_element_to_inputfile(self.file_name)

# reopen file with "append" to add all the rest
inpfile = io.open(self.file_name, "a", encoding="utf-8")
# inpfile = io.open(self.file_name, "a", encoding="utf-8")
inpfile = codecs.open(self.file_name, "a", encoding="utf-8")
inpfile.write("\n\n")

return inpfile
Expand Down

0 comments on commit f54eba7

Please sign in to comment.