toughanimator 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
toughanimator/run.py CHANGED
@@ -7,8 +7,8 @@ dir_name = "unresolved" #"test_cases
7
7
  case_name = "3D five spot MINC"
8
8
  test_case_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), dir_name)
9
9
 
10
- case_dir = os.path.join(test_case_dir, case_name)
11
- #case_dir = r"D:\Projects\202506\cake"
10
+ #case_dir = os.path.join(test_case_dir, case_name)
11
+ case_dir = r"D:\Projects\202507\intern\P5_eco2n_1D-radial"
12
12
 
13
13
  #case_dir = r"D:\Projects\202504\polygonal\poly_test"
14
14
  #case_dir = r"D:\Projects\202501\toughanimator\test_cases\P5_eco2n_1D-radial"
@@ -460,6 +460,7 @@ class vis_reader:
460
460
  elif value_type == ValueType.Vector:
461
461
  self.__write_vector_result(time_step, df, csv_headers)
462
462
 
463
+ buffer.flush()
463
464
  buffer.close()
464
465
 
465
466
  with open(self.current_out_file) as f:
@@ -676,7 +677,7 @@ class vis_reader:
676
677
  if vtr.GetCellData().GetArray("PRES") is not None:
677
678
  p_name = "PRES"
678
679
 
679
- if vtr.GetCellData().GetArray(p_name) is not None:
680
+ if vtr.GetCellData().GetArray(p_name) is not None and self.incon_vtk.GetCellData().GetArray('Pressure') is not None:
680
681
  delPArray = vtkDoubleArray()
681
682
  delPArray.SetName(f'del_{p_name}')
682
683
  for i in range(0, vtr.GetNumberOfCells()):
@@ -786,13 +787,13 @@ class vis_reader:
786
787
  vtr.GetPointData().AddArray(vtr_cell_to_points.GetPointData().GetArray(variabl_name))
787
788
 
788
789
  if len(post_variable_list) > 0:
789
- self.variable_list["psot"] = post_variable_list
790
+ self.variable_list["post"] = post_variable_list
790
791
  self.__write_vtk_file(vtr, vtr_path)
791
792
 
792
793
 
793
- def __write_scalar_result(self, vis_time_step, dataframe, headers):
794
-
794
+ def __write_scalar_result(self, vis_time_step, dataframe, csv_headers):
795
795
 
796
+ headers = csv_headers.copy()
796
797
  index = self.time_steps_list.index(vis_time_step)
797
798
  #vtr_path = os.path.join(self.setting.vis_dir, 'paraview', f'time_step_{vis_time_step.time_step}.vtr')
798
799
 
@@ -816,7 +817,6 @@ class vis_reader:
816
817
  else:
817
818
  scalar_vtr = self.__read_vtk_file(vtr_path)
818
819
 
819
-
820
820
  vtr = scalar_vtr
821
821
 
822
822
  variable_list = []
@@ -846,6 +846,9 @@ class vis_reader:
846
846
  index = self.sequence_dist[i]
847
847
  if 'ELEM' in dataframe.columns:
848
848
  index = dataframe['ELEM'].tolist().index(elemID)
849
+ #elem_string = dataframe['ELEM'].iloc[index]
850
+ #target_row = dataframe.iloc[index]
851
+ #print(f' Processing ELEM {elem_string} at index {index}')
849
852
  for header in headers:
850
853
  value = float(self.__parse_float(dataframe[header].iloc[index]))
851
854
  vtr.GetCellData().GetArray(header).InsertNextValue(value)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toughanimator
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A tool for visualizing TOUGH simulation outputs.
5
5
  Home-page: https://github.com/scarletref/toughanimator
6
6
  Author: Your Name
@@ -0,0 +1,7 @@
1
+ toughanimator/__init__.py,sha256=m1f3fJ1SNGLNKxHlS0pLNHwaHlN6UUTh5GpS_8hC8kw,30
2
+ toughanimator/run.py,sha256=EayWtDf_PrpYg8vfsyEm38XLb2-E4nF_y57TT_cdGzQ,671
3
+ toughanimator/tough_classes.py,sha256=1SX1CttjeBkAlk6Ynw4EyIWfOKd15uWCpFvqUQo_wp8,103275
4
+ toughanimator-0.1.5.dist-info/METADATA,sha256=EvR_7WeGK7hE8oD8h6QlFjcyBRfQ7svAS-G5AnbEcD4,4557
5
+ toughanimator-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ toughanimator-0.1.5.dist-info/top_level.txt,sha256=pAT-UflvbjT4lTmBdzHqApZGWbywkSM3Y_qsHyLi4pU,14
7
+ toughanimator-0.1.5.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- toughanimator/__init__.py,sha256=m1f3fJ1SNGLNKxHlS0pLNHwaHlN6UUTh5GpS_8hC8kw,30
2
- toughanimator/run.py,sha256=bMKe57yNZuKhekCkWMHawENKYdO5yRLpEzjGwaD-wWw,650
3
- toughanimator/tough_classes.py,sha256=DHepPzUzAihGER7dVKW6q95h3tOKSJVfHSvq_U7FGS4,102949
4
- toughanimator-0.1.4.dist-info/METADATA,sha256=3HqsALYQ0GrMdkLQ4n3KIu3sL3RKoK8EHNwcizlkni4,4557
5
- toughanimator-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- toughanimator-0.1.4.dist-info/top_level.txt,sha256=pAT-UflvbjT4lTmBdzHqApZGWbywkSM3Y_qsHyLi4pU,14
7
- toughanimator-0.1.4.dist-info/RECORD,,