From 607ddccbbf72904e3bb10b61ecd4d2b761567bcb Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Thu, 23 Nov 2017 06:13:09 +0100 Subject: [PATCH] FEM: ccx writer, use the new Abaqus writer parameter and fix unit test --- src/Mod/Fem/FemInputWriterCcx.py | 4 ++-- src/Mod/Fem/TestFem.py | 2 +- src/Mod/Fem/test_files/ccx/Flow1D_thermomech.inp | 1 + src/Mod/Fem/test_files/ccx/cube_frequency.inp | 1 + src/Mod/Fem/test_files/ccx/cube_static.inp | 1 + src/Mod/Fem/test_files/ccx/spine_thermomech.inp | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Mod/Fem/FemInputWriterCcx.py b/src/Mod/Fem/FemInputWriterCcx.py index e99dc94168..e60823977d 100644 --- a/src/Mod/Fem/FemInputWriterCcx.py +++ b/src/Mod/Fem/FemInputWriterCcx.py @@ -77,7 +77,7 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter): def write_calculix_one_input_file(self): timestart = time.clock() - self.femmesh.writeABAQUS(self.file_name) + self.femmesh.writeABAQUS(self.file_name, 1, False) # reopen file with "append" and add the analysis definition inpfile = open(self.file_name, 'a') @@ -180,7 +180,7 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter): name = self.file_name[:-4] include_name = self.main_file_name[:-4] - self.femmesh.writeABAQUS(name + "_Node_Elem_sets.inp") + self.femmesh.writeABAQUS(name + "_Node_Elem_sets.inp", 1, False) inpfileNodesElem = open(name + "_Node_Elem_sets.inp", 'a') inpfileNodesElem.write('\n***********************************************************\n') inpfileNodesElem.close() diff --git a/src/Mod/Fem/TestFem.py b/src/Mod/Fem/TestFem.py index c7b7dccd7e..ebd6165346 100644 --- a/src/Mod/Fem/TestFem.py +++ b/src/Mod/Fem/TestFem.py @@ -144,7 +144,7 @@ class FemTest(unittest.TestCase): seg2.addEdge([1, 2]) inp_file = temp_dir + '/seg2_mesh.inp' - seg2.writeABAQUS(inp_file) + seg2.writeABAQUS(inp_file, 1, False) read_file = open(inp_file, 'r') read_node_line = 'line was not found' diff --git a/src/Mod/Fem/test_files/ccx/Flow1D_thermomech.inp b/src/Mod/Fem/test_files/ccx/Flow1D_thermomech.inp index a29eae28a2..4ce14a234c 100644 --- a/src/Mod/Fem/test_files/ccx/Flow1D_thermomech.inp +++ b/src/Mod/Fem/test_files/ccx/Flow1D_thermomech.inp @@ -1,4 +1,5 @@ ** written by FreeCAD inp file writer for CalculiX,Abaqus meshes +** highest dimension mesh elements only. ** Nodes *Node, NSET=Nall diff --git a/src/Mod/Fem/test_files/ccx/cube_frequency.inp b/src/Mod/Fem/test_files/ccx/cube_frequency.inp index cfe7a7682d..ac7eaf2dc6 100644 --- a/src/Mod/Fem/test_files/ccx/cube_frequency.inp +++ b/src/Mod/Fem/test_files/ccx/cube_frequency.inp @@ -1,4 +1,5 @@ ** written by FreeCAD inp file writer for CalculiX,Abaqus meshes +** highest dimension mesh elements only. ** Nodes *Node, NSET=Nall diff --git a/src/Mod/Fem/test_files/ccx/cube_static.inp b/src/Mod/Fem/test_files/ccx/cube_static.inp index a57c006aa5..642b74a71c 100644 --- a/src/Mod/Fem/test_files/ccx/cube_static.inp +++ b/src/Mod/Fem/test_files/ccx/cube_static.inp @@ -1,4 +1,5 @@ ** written by FreeCAD inp file writer for CalculiX,Abaqus meshes +** highest dimension mesh elements only. ** Nodes *Node, NSET=Nall diff --git a/src/Mod/Fem/test_files/ccx/spine_thermomech.inp b/src/Mod/Fem/test_files/ccx/spine_thermomech.inp index 7cdbccc84b..8a1cbe0337 100644 --- a/src/Mod/Fem/test_files/ccx/spine_thermomech.inp +++ b/src/Mod/Fem/test_files/ccx/spine_thermomech.inp @@ -1,4 +1,5 @@ ** written by FreeCAD inp file writer for CalculiX,Abaqus meshes +** highest dimension mesh elements only. ** Nodes *Node, NSET=Nall