diff --git a/python/FIERRO-GUI/fierro_gui/Bulk_Forming.py b/python/FIERRO-GUI/fierro_gui/Bulk_Forming.py index 2963d3816..fa3fc2642 100644 --- a/python/FIERRO-GUI/fierro_gui/Bulk_Forming.py +++ b/python/FIERRO-GUI/fierro_gui/Bulk_Forming.py @@ -1218,9 +1218,11 @@ def preview_results_click_2(): self.display.SetScalarBarVisibility(self.render_view, False) # Display .xdmf data - file_name = "micro_state_timestep_" + str(self.INBFloadsteps.text()) + ".xdmf" - self.output_directory = os.path.join(self.working_directory, file_name) - self.results_reader = paraview.simple.XDMFReader(FileNames=self.output_directory) +# file_name = "micro_state_timestep_" + str(self.INBFloadsteps.text()) + ".xdmf" + file_name = f"MicroState_{int(self.INBFloadsteps.text()):05}.pvtu" +# self.output_directory = os.path.join(self.working_directory, file_name) + self.output_directory = os.path.join(self.working_directory, "pvtu", file_name) + self.results_reader = paraview.simple.XMLPartitionedUnstructuredGridReader(FileName=self.output_directory) paraview.simple.SetDisplayProperties(Representation="Surface") self.display = Show(self.results_reader, self.render_view) diff --git a/python/FIERRO-GUI/fierro_gui/FIERRO_GUI.ui b/python/FIERRO-GUI/fierro_gui/FIERRO_GUI.ui index edd688a75..a964065c1 100644 --- a/python/FIERRO-GUI/fierro_gui/FIERRO_GUI.ui +++ b/python/FIERRO-GUI/fierro_gui/FIERRO_GUI.ui @@ -10,7 +10,7 @@ 0 0 1355 - 1184 + 1208 @@ -352,7 +352,7 @@ 1 - 6 + 2 @@ -1059,7 +1059,7 @@ 0 0 376 - 541 + 548 @@ -1120,7 +1120,7 @@ false - 5 + 3 @@ -10324,7 +10324,7 @@ li.checked::marker { content: "\2612"; } - 2 + 1 @@ -11634,7 +11634,7 @@ li.checked::marker { content: "\2612"; } 0 0 1355 - 24 + 37 diff --git a/python/FIERRO-GUI/fierro_gui/Homogenization.py b/python/FIERRO-GUI/fierro_gui/Homogenization.py index 06892e7c2..e84849b5f 100644 --- a/python/FIERRO-GUI/fierro_gui/Homogenization.py +++ b/python/FIERRO-GUI/fierro_gui/Homogenization.py @@ -5,6 +5,7 @@ import numpy as np import subprocess import os +import vtk #import paraview.simple as paraview.simple from paraview.simple import * from Homogenization_WInput import * @@ -894,9 +895,12 @@ def preview_results_click(): # Display .xdmf data output_name = str(self.INBCFile.currentText()) output_parts = output_name.split() - file_name = "micro_state_timestep_" + str(self.INNumberOfSteps.text()) + ".xdmf" - self.output_directory = os.path.join(self.working_directory, output_parts[0], output_parts[1], file_name) - self.results_reader = paraview.simple.XDMFReader(FileNames=self.output_directory) +# file_name = "micro_state_timestep_" + str(self.INNumberOfSteps.text()) + ".xdmf" + file_name = f"MicroState_{int(self.INNumberOfSteps.text()):05}.pvtu" + self.output_directory = os.path.join(self.working_directory, output_parts[0], output_parts[1], "pvtu", file_name) +# self.output_directory = os.path.join(self.working_directory, output_parts[0], output_parts[1], file_name) +# self.results_reader = paraview.simple.XDMFReader(FileNames=self.output_directory) + self.results_reader = paraview.simple.XMLPartitionedUnstructuredGridReader(FileName=self.output_directory) # Apply threshold to view certain phase id's in_file_path = self.TParts.item(0,10).text() diff --git a/python/FIERRO-GUI/fierro_gui/ImageToVTK.py b/python/FIERRO-GUI/fierro_gui/ImageToVTK.py index 20adceb4f..e98314428 100644 --- a/python/FIERRO-GUI/fierro_gui/ImageToVTK.py +++ b/python/FIERRO-GUI/fierro_gui/ImageToVTK.py @@ -78,6 +78,6 @@ def ImageToVTK(imageDir, out, outDir, file_type): VTK_File.write(TenthLine+'\n') for i in range(rows*columns*NumFiles): - csv.writer(VTK_File,delimiter='\n').writerow([img_arr[i]]) + csv.writer(VTK_File).writerow([img_arr[i]]) VTK_File.close()