fdsreader 1.10.0__tar.gz → 1.10.2__tar.gz

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.
Files changed (116) hide show
  1. {fdsreader-1.10.0 → fdsreader-1.10.2}/PKG-INFO +1 -1
  2. {fdsreader-1.10.0 → fdsreader-1.10.2}/RELEASE.md +6 -0
  3. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/_version.py +1 -1
  4. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/pl3d/pl3d.py +32 -23
  5. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/slcf/slice.py +8 -2
  6. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/smoke3d/smoke3d.py +32 -25
  7. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader.egg-info/PKG-INFO +1 -1
  8. fdsreader-1.10.2/requirements.txt +163 -0
  9. fdsreader-1.10.0/requirements.txt +0 -0
  10. {fdsreader-1.10.0 → fdsreader-1.10.2}/.gitignore +0 -0
  11. {fdsreader-1.10.0 → fdsreader-1.10.2}/.travis.yml +0 -0
  12. {fdsreader-1.10.0 → fdsreader-1.10.2}/Dockerfile +0 -0
  13. {fdsreader-1.10.0 → fdsreader-1.10.2}/LICENSE +0 -0
  14. {fdsreader-1.10.0 → fdsreader-1.10.2}/MANIFEST.in +0 -0
  15. {fdsreader-1.10.0 → fdsreader-1.10.2}/README.md +0 -0
  16. {fdsreader-1.10.0 → fdsreader-1.10.2}/docker_deployment.sh +0 -0
  17. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/bndf.rst +0 -0
  18. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/conf.py +0 -0
  19. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/devc.rst +0 -0
  20. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/evac.rst +0 -0
  21. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/export.rst +0 -0
  22. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/fds_classes.rst +0 -0
  23. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/geom.rst +0 -0
  24. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/img/data-structure.drawio +0 -0
  25. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/img/data-structure.svg +0 -0
  26. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/index.rst +0 -0
  27. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/isof.rst +0 -0
  28. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/part.rst +0 -0
  29. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/pl3d.rst +0 -0
  30. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/quantity.rst +0 -0
  31. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/simulation.rst +0 -0
  32. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/slcf.rst +0 -0
  33. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/smoke3d.rst +0 -0
  34. {fdsreader-1.10.0 → fdsreader-1.10.2}/docs/utils.rst +0 -0
  35. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/bndf/bndf_example_anim.py +0 -0
  36. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/bndf/fds_data/wall_005.fds +0 -0
  37. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/devc/devc_example.py +0 -0
  38. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/devc/fds_steckler/steckler.fds +0 -0
  39. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/evac/evac_example.py +0 -0
  40. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/evac/fds_fed/fed_verification_multi_mesh.fds +0 -0
  41. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/evac/fds_no_fed/stairs_evss_meshes.fds +0 -0
  42. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/export/export_all.py +0 -0
  43. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/export/obst_export.py +0 -0
  44. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/export/slcf_export.py +0 -0
  45. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/export/smoke3d_export.py +0 -0
  46. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/geom/fds_data/sphere_radiate.fds +0 -0
  47. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/geom/fds_geomslices/PWB01_GEOM.fds +0 -0
  48. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/geom/geom_example.py +0 -0
  49. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/geom/geom_slices.py +0 -0
  50. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/isof/fds_steckler/input_steckler.fds +0 -0
  51. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/isof/isof_example.py +0 -0
  52. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/part/fds_data/impact.fds +0 -0
  53. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/part/part_example.py +0 -0
  54. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/pl3d/fds_data/vort3d_80.fds +0 -0
  55. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/pl3d/pl3d_example.py +0 -0
  56. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/slcf/fds_data/vort2d_80.fds +0 -0
  57. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/slcf/fds_multimesh/multimesh.fds +0 -0
  58. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/slcf/fds_steckler/input_steckler.fds +0 -0
  59. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/slcf/slcf_example_global.py +0 -0
  60. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/slcf/slcf_example_mask.py +0 -0
  61. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/smoke3d/fds_steckler/input_steckler.fds +0 -0
  62. {fdsreader-1.10.0 → fdsreader-1.10.2}/examples/smoke3d/smoke3d_example.py +0 -0
  63. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/__init__.py +0 -0
  64. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/bndf/__init__.py +0 -0
  65. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/bndf/obstruction.py +0 -0
  66. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/bndf/obstruction_collection.py +0 -0
  67. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/bndf/utils.py +0 -0
  68. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/devc/__init__.py +0 -0
  69. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/devc/device.py +0 -0
  70. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/devc/device_collection.py +0 -0
  71. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/evac/__init__.py +0 -0
  72. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/evac/evac_collection.py +0 -0
  73. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/evac/evacuation.py +0 -0
  74. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/export/__init__.py +0 -0
  75. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/export/obst_exporter.py +0 -0
  76. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/export/sim_exporter.py +0 -0
  77. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/export/slcf_exporter.py +0 -0
  78. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/export/smoke3d_exporter.py +0 -0
  79. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/fds_classes/__init__.py +0 -0
  80. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/fds_classes/mesh.py +0 -0
  81. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/fds_classes/mesh_collection.py +0 -0
  82. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/fds_classes/surface.py +0 -0
  83. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/fds_classes/ventilation.py +0 -0
  84. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/geom/__init__.py +0 -0
  85. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/geom/geometry.py +0 -0
  86. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/geom/geometry_collection.py +0 -0
  87. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/isof/__init__.py +0 -0
  88. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/isof/isosurface.py +0 -0
  89. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/isof/isosurface_collection.py +0 -0
  90. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/part/__init__.py +0 -0
  91. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/part/particle.py +0 -0
  92. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/part/particle_collection.py +0 -0
  93. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/pl3d/__init__.py +0 -0
  94. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/pl3d/plot3D_collection.py +0 -0
  95. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/settings.py +0 -0
  96. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/simulation.py +0 -0
  97. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/slcf/__init__.py +0 -0
  98. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/slcf/geomslice.py +0 -0
  99. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/slcf/geomslice_collection.py +0 -0
  100. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/slcf/slice_collection.py +0 -0
  101. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/smoke3d/__init__.py +0 -0
  102. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/smoke3d/smoke3D_collection.py +0 -0
  103. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/utils/__init__.py +0 -0
  104. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/utils/data.py +0 -0
  105. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/utils/dimension.py +0 -0
  106. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/utils/extent.py +0 -0
  107. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/utils/fortran_data.py +0 -0
  108. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader/utils/misc.py +0 -0
  109. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader.egg-info/SOURCES.txt +0 -0
  110. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader.egg-info/dependency_links.txt +0 -0
  111. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader.egg-info/requires.txt +0 -0
  112. {fdsreader-1.10.0 → fdsreader-1.10.2}/fdsreader.egg-info/top_level.txt +0 -0
  113. {fdsreader-1.10.0 → fdsreader-1.10.2}/setup.cfg +0 -0
  114. {fdsreader-1.10.0 → fdsreader-1.10.2}/setup.py +0 -0
  115. {fdsreader-1.10.0 → fdsreader-1.10.2}/tests/test.py +0 -0
  116. {fdsreader-1.10.0 → fdsreader-1.10.2}/tests/test.smv +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fdsreader
3
- Version: 1.10.0
3
+ Version: 1.10.2
4
4
  Summary: Python reader for data generated by FDS.
5
5
  Home-page: https://github.com/FireDynamics/fdsreader
6
6
  Author: FZJ IAS-7 (Jan Vogelsang, Prof. Dr. Lukas Arnold, Tristan Hehnen)
@@ -1,4 +1,10 @@
1
1
  ## Release History
2
+ * 1.10.2
3
+ * Fixed to_global function for Plot3D data with obstruction masks
4
+ * Fixed to_global function for Smoke3D data with obstruction masks
5
+ * 1.10.1
6
+ * Fixed to_global function for Plot3D data
7
+ * Fixed to_global function for Smoke3D data
2
8
  * 1.10.0
3
9
  * Restructured Plot3D data to now be represented by a single Plot3D instance for all timesteps instead of one individual object per timestep
4
10
  * Added a to_global function for Plot3D data
@@ -7,5 +7,5 @@ Provides fdsreader version information.
7
7
 
8
8
  from incremental import Version
9
9
 
10
- __version__ = Version("fdsreader", 1, 10, 0)
10
+ __version__ = Version("fdsreader", 1, 10, 2)
11
11
  __all__ = ["__version__"]
@@ -136,6 +136,12 @@ class Plot3D(np.lib.mixins.NDArrayOperatorsMixin):
136
136
  :param fill: The fill value to use for masked entries. Only used when masked=True.
137
137
  :param return_coordinates: If true, return the matching coordinate for each value on the generated grid.
138
138
  """
139
+ if len(self._subplots) == 0:
140
+ if return_coordinates:
141
+ return np.array([]), {d: np.array([]) for d in ('x', 'y', 'z')}
142
+ else:
143
+ return np.array([])
144
+
139
145
  coord_min = {'x': math.inf, 'y': math.inf, 'z': math.inf}
140
146
  coord_max = {'x': -math.inf, 'y': -math.inf, 'z': -math.inf}
141
147
  for dim in ('x', 'y', 'z'):
@@ -178,46 +184,49 @@ class Plot3D(np.lib.mixins.NDArrayOperatorsMixin):
178
184
  if masked:
179
185
  mask = subplot.mesh.get_obstruction_mask(self.times)
180
186
 
187
+ start_idx = {dim: int(round(
188
+ (subplot.mesh.coordinates[dim][0] - coord_min[dim]) / step_sizes_min[dim])) for dim in ('x', 'y', 'z')}
189
+ end_idx = {dim: int(round(
190
+ (subplot.mesh.coordinates[dim][-1] - coord_min[dim]) / step_sizes_min[dim])) for dim in ('x', 'y', 'z')}
191
+
192
+ temp_data = dict()
193
+ temp_mask = dict()
181
194
  for axis in range(3):
182
195
  dim = ('x', 'y', 'z')[axis]
183
- n_repeat = max(int(round(
184
- (subplot.mesh.coordinates[dim][1] - subplot.mesh.coordinates[dim][0]) /
185
- step_sizes_min[dim])), 1)
186
-
187
- start_idx[dim] = int(round(
188
- (subplot.mesh.coordinates[dim][0] - coord_min[dim]) / step_sizes_min[dim]))
189
- end_idx[dim] = int(round(
190
- (subplot.mesh.coordinates[dim][-1] - coord_min[dim]) / step_sizes_min[dim]))
196
+ # Temporarily save border points to add them back to the array again later
197
+ if np.isclose(subplot.mesh.coordinates[dim][-1], global_max[dim]):
198
+ temp_data_slices = [slice(s) for s in subplot_data.shape]
199
+ end_idx[dim] += 1
200
+ temp_data_slices[axis + 1] = slice(subplot_data.shape[axis + 1] - 1, None)
201
+ temp_data[dim] = subplot_data[tuple(temp_data_slices)]
202
+ if masked:
203
+ temp_mask[dim] = mask[tuple(temp_data_slices)]
191
204
 
192
205
  # We ignore border points unless they are actually on the border of the simulation space as all
193
206
  # other border points actually appear twice, as the subslices overlap. This only
194
207
  # applies for face_centered slices, as cell_centered slices will not overlap.
195
- reduced_shape_slices = (slice(subplot.data.shape[0]),) + tuple(slice(s - 1) for s in subplot.data.shape[1:])
208
+ reduced_shape_slices = (slice(subplot.data.shape[0]),) + tuple(slice(1, None) for s in subplot.data.shape[1:])
196
209
  subplot_data = subplot_data[reduced_shape_slices]
197
210
  if masked:
198
211
  mask = mask[reduced_shape_slices]
199
212
 
200
- for axis in range(3):
201
- dim = ('x', 'y', 'z')[axis]
202
- # Temporarily save border points to add them back to the array again later
203
- if subplot.mesh.coordinates[dim][-1] == global_max[dim]:
204
- end_idx[dim] += 1
205
- temp_data_slices = [slice(s) for s in subplot_data.shape]
206
- temp_data_slices[axis + 1] = slice(subplot_data.shape[axis + 1] - 1, None)
207
- temp_data = subplot_data[tuple(temp_data_slices)]
208
- if masked:
209
- temp_mask = mask[tuple(temp_data_slices)]
210
-
213
+ n_repeat = max(int(round(
214
+ (subplot.mesh.coordinates[dim][1] - subplot.mesh.coordinates[dim][0]) /
215
+ step_sizes_min[dim])), 1)
211
216
  if n_repeat > 1:
212
217
  subplot_data = np.repeat(subplot_data, n_repeat, axis=axis + 1)
213
218
  if masked:
214
219
  mask = np.repeat(mask, n_repeat, axis=axis + 1)
215
220
 
221
+ for axis in range(3):
222
+ dim = ('x', 'y', 'z')[axis]
216
223
  # Add border points back again if needed
217
- if subplot.mesh.coordinates[dim][-1] == global_max[dim]:
218
- subplot_data = np.concatenate((subplot_data, temp_data), axis=axis + 1)
224
+ if np.isclose(subplot.mesh.coordinates[dim][-1], global_max[dim]):
225
+ temp_data_slices = [slice(s) for s in subplot_data.shape]
226
+ temp_data_slices[axis + 1] = slice(None)
227
+ subplot_data = np.concatenate((subplot_data, temp_data[dim][tuple(temp_data_slices)]), axis=axis + 1)
219
228
  if masked:
220
- mask = np.concatenate((mask, temp_mask), axis=axis + 1)
229
+ mask = np.concatenate((mask, temp_mask[dim][tuple(temp_data_slices)]), axis=axis + 1)
221
230
 
222
231
  # If the slice should be masked, we set all cells at which an obstruction is in the
223
232
  # simulation space to the fill value set by the user
@@ -511,6 +511,12 @@ class Slice(np.lib.mixins.NDArrayOperatorsMixin):
511
511
  :param fill: The fill value to use for masked slice entries. Only used when masked=True.
512
512
  :param return_coordinates: If true, return the matching coordinate for each value on the generated grid.
513
513
  """
514
+ if len(self._subslices) == 0:
515
+ if return_coordinates:
516
+ return np.array([]), {d: np.array([]) for d in ('x', 'y', 'z')}
517
+ else:
518
+ return np.array([])
519
+
514
520
  subslice_sets = [dict(), dict()]
515
521
 
516
522
  dimension = ['x', 'y', 'z'][self.orientation - 1]
@@ -600,7 +606,7 @@ class Slice(np.lib.mixins.NDArrayOperatorsMixin):
600
606
  mask = mask[reduced_data_slices]
601
607
 
602
608
  # Temporarily save border points to add them back to the array again later
603
- if slc.mesh.coordinates[dim][-1] == global_max[dim]:
609
+ if np.isclose(slc.mesh.coordinates[dim][-1], global_max[dim]):
604
610
  end_idx[dim] += 1
605
611
  temp_data_slices = [slice(s) for s in slc_data.shape]
606
612
  temp_data_slices[axis + 1] = slice(slc_data.shape[axis + 1] - 1, None)
@@ -614,7 +620,7 @@ class Slice(np.lib.mixins.NDArrayOperatorsMixin):
614
620
  mask = np.repeat(mask, n_repeat, axis=axis + 1)
615
621
 
616
622
  # Add border points back again if needed
617
- if not self.cell_centered and slc.mesh.coordinates[dim][-1] == global_max[dim]:
623
+ if not self.cell_centered and np.isclose(slc.mesh.coordinates[dim][-1], global_max[dim]):
618
624
  slc_data = np.concatenate((slc_data, temp_data), axis=axis + 1)
619
625
  if masked:
620
626
  mask = np.concatenate((mask, temp_mask), axis=axis + 1)
@@ -125,6 +125,12 @@ class Smoke3D(np.lib.mixins.NDArrayOperatorsMixin):
125
125
  :param fill: The fill value to use for masked entries. Only used when masked=True.
126
126
  :param return_coordinates: If true, return the matching coordinate for each value on the generated grid.
127
127
  """
128
+ if len(self._subsmokes) == 0:
129
+ if return_coordinates:
130
+ return np.array([]), {d: np.array([]) for d in ('x', 'y', 'z')}
131
+ else:
132
+ return np.array([])
133
+
128
134
  coord_min = {'x': math.inf, 'y': math.inf, 'z': math.inf}
129
135
  coord_max = {'x': -math.inf, 'y': -math.inf, 'z': -math.inf}
130
136
  for dim in ('x', 'y', 'z'):
@@ -160,53 +166,54 @@ class Smoke3D(np.lib.mixins.NDArrayOperatorsMixin):
160
166
 
161
167
  grid = np.full((self.n_t, steps['x'], steps['y'], steps['z']), np.nan)
162
168
 
163
- start_idx = dict()
164
- end_idx = dict()
165
169
  for subsmoke in self._subsmokes.values():
166
170
  subsmoke_data = subsmoke.data.copy()
167
171
  if masked:
168
172
  mask = subsmoke.mesh.get_obstruction_mask(self.times)
169
173
 
174
+ start_idx = {dim: int(round(
175
+ (subsmoke.mesh.coordinates[dim][0] - coord_min[dim]) / step_sizes_min[dim])) for dim in ('x', 'y', 'z')}
176
+ end_idx = {dim: int(round(
177
+ (subsmoke.mesh.coordinates[dim][-1] - coord_min[dim]) / step_sizes_min[dim])) for dim in ('x', 'y', 'z')}
178
+
179
+ temp_data = dict()
180
+ temp_mask = dict()
170
181
  for axis in range(3):
171
182
  dim = ('x', 'y', 'z')[axis]
172
- n_repeat = max(int(round(
173
- (subsmoke.mesh.coordinates[dim][1] - subsmoke.mesh.coordinates[dim][0]) /
174
- step_sizes_min[dim])), 1)
175
-
176
- start_idx[dim] = int(round(
177
- (subsmoke.mesh.coordinates[dim][0] - coord_min[dim]) / step_sizes_min[dim]))
178
- end_idx[dim] = int(round(
179
- (subsmoke.mesh.coordinates[dim][-1] - coord_min[dim]) / step_sizes_min[dim]))
183
+ # Temporarily save border points to add them back to the array again later
184
+ if np.isclose(subsmoke.mesh.coordinates[dim][-1], global_max[dim]):
185
+ temp_data_slices = [slice(s) for s in subsmoke_data.shape]
186
+ end_idx[dim] += 1
187
+ temp_data_slices[axis + 1] = slice(subsmoke_data.shape[axis + 1] - 1, None)
188
+ temp_data[dim] = subsmoke_data[tuple(temp_data_slices)]
189
+ if masked:
190
+ temp_mask[dim] = mask[tuple(temp_data_slices)]
180
191
 
181
192
  # We ignore border points unless they are actually on the border of the simulation space as all
182
193
  # other border points actually appear twice, as the subslices overlap. This only
183
194
  # applies for face_centered slices, as cell_centered slices will not overlap.
184
- reduced_shape_slices = (slice(subsmoke.data.shape[0]),) + tuple(slice(s - 1) for s in subsmoke.data.shape[1:])
195
+ reduced_shape_slices = (slice(subsmoke.data.shape[0]),) + tuple(slice(1, None) for s in subsmoke.data.shape[1:])
185
196
  subsmoke_data = subsmoke_data[reduced_shape_slices]
186
197
  if masked:
187
198
  mask = mask[reduced_shape_slices]
188
199
 
189
- for axis in range(3):
190
- dim = ('x', 'y', 'z')[axis]
191
- # Temporarily save border points to add them back to the array again later
192
- if subsmoke.mesh.coordinates[dim][-1] == global_max[dim]:
193
- end_idx[dim] += 1
194
- temp_data_slices = [slice(s) for s in subsmoke_data.shape]
195
- temp_data_slices[axis + 1] = slice(subsmoke_data.shape[axis + 1] - 1, None)
196
- temp_data = subsmoke_data[tuple(temp_data_slices)]
197
- if masked:
198
- temp_mask = mask[tuple(temp_data_slices)]
199
-
200
+ n_repeat = max(int(round(
201
+ (subsmoke.mesh.coordinates[dim][1] - subsmoke.mesh.coordinates[dim][0]) /
202
+ step_sizes_min[dim])), 1)
200
203
  if n_repeat > 1:
201
204
  subsmoke_data = np.repeat(subsmoke_data, n_repeat, axis=axis + 1)
202
205
  if masked:
203
206
  mask = np.repeat(mask, n_repeat, axis=axis + 1)
204
207
 
208
+ for axis in range(3):
209
+ dim = ('x', 'y', 'z')[axis]
205
210
  # Add border points back again if needed
206
- if subsmoke.mesh.coordinates[dim][-1] == global_max[dim]:
207
- subsmoke_data = np.concatenate((subsmoke_data, temp_data), axis=axis + 1)
211
+ if np.isclose(subsmoke.mesh.coordinates[dim][-1], global_max[dim]):
212
+ temp_data_slices = [slice(s) for s in subsmoke_data.shape]
213
+ temp_data_slices[axis + 1] = slice(None)
214
+ subsmoke_data = np.concatenate((subsmoke_data, temp_data[dim][tuple(temp_data_slices)]), axis=axis + 1)
208
215
  if masked:
209
- mask = np.concatenate((mask, temp_mask), axis=axis + 1)
216
+ mask = np.concatenate((mask, temp_mask[dim][tuple(temp_data_slices)]), axis=axis + 1)
210
217
 
211
218
  # If the slice should be masked, we set all cells at which an obstruction is in the
212
219
  # simulation space to the fill value set by the user
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fdsreader
3
- Version: 1.10.0
3
+ Version: 1.10.2
4
4
  Summary: Python reader for data generated by FDS.
5
5
  Home-page: https://github.com/FireDynamics/fdsreader
6
6
  Author: FZJ IAS-7 (Jan Vogelsang, Prof. Dr. Lukas Arnold, Tristan Hehnen)
@@ -0,0 +1,163 @@
1
+ aiohttp==3.9.1
2
+ aiosignal==1.3.1
3
+ alabaster==0.7.13
4
+ appdirs==1.4.4
5
+ argcomplete==3.1.6
6
+ argon2-cffi==23.1.0
7
+ argon2-cffi-bindings==21.2.0
8
+ asttokens==2.4.1
9
+ async-timeout==4.0.3
10
+ asynctest==0.13.0
11
+ attrs==23.1.0
12
+ autodocsumm==0.2.11
13
+ Automat==22.10.0
14
+ Babel==2.13.1
15
+ backcall==0.2.0
16
+ beautifulsoup4==4.12.2
17
+ bleach==6.1.0
18
+ bpyutils==0.5.8
19
+ brotlipy==0.7.0
20
+ certifi==2023.11.17
21
+ cffi==1.16.0
22
+ charset-normalizer==2.0.12
23
+ click==8.1.7
24
+ colorama==0.4.6
25
+ comm==0.2.0
26
+ constantly==23.10.4
27
+ contourpy==1.2.0
28
+ cryptography==41.0.7
29
+ cycler==0.12.1
30
+ debugpy==1.8.0
31
+ decorator==5.1.1
32
+ defusedxml==0.7.1
33
+ dill==0.3.7
34
+ docutils==0.20.1
35
+ dpcpp-cpp-rt==2024.0.0
36
+ entrypoints==0.4
37
+ environment-kernels==1.2.0
38
+ executing==2.0.1
39
+ fastjsonschema==2.19.0
40
+ fonttools==4.45.1
41
+ frozenlist==1.4.0
42
+ hyperlink==21.0.0
43
+ idna==3.6
44
+ imageio==2.33.0
45
+ imageio-ffmpeg==0.4.9
46
+ imagesize==1.4.1
47
+ importlib-metadata==6.8.0
48
+ importlib-resources==6.1.1
49
+ incremental==22.10.0
50
+ intel-cmplr-lib-rt==2024.0.0
51
+ intel-cmplr-lic-rt==2024.0.0
52
+ intel-opencl-rt==2024.0.0
53
+ intel-openmp==2024.0.0
54
+ ipykernel==6.27.1
55
+ ipython==8.18.1
56
+ ipython-genutils==0.2.0
57
+ jaraco.classes==3.3.0
58
+ jedi==0.19.1
59
+ jeepney==0.8.0
60
+ Jinja2==3.1.2
61
+ jsonschema==4.20.0
62
+ jsonschema-specifications==2023.11.1
63
+ jupyter_client==8.6.0
64
+ jupyter_core==5.5.0
65
+ jupyterlab_pygments==0.3.0
66
+ keyring==24.3.0
67
+ kiwisolver==1.4.5
68
+ markdown-it-py==3.0.0
69
+ MarkupSafe==2.1.3
70
+ matplotlib==3.8.2
71
+ matplotlib-inline==0.1.6
72
+ mdurl==0.1.2
73
+ meshio==5.3.4
74
+ mistune==3.0.2
75
+ mkl==2024.0.0
76
+ more-itertools==10.1.0
77
+ multidict==6.0.4
78
+ multiprocess==0.70.15
79
+ nbclient==0.9.0
80
+ nbconvert==7.11.0
81
+ nbformat==5.9.2
82
+ nbsphinx==0.9.3
83
+ nest-asyncio==1.5.8
84
+ nh3==0.2.14
85
+ numpy==1.26.2
86
+ olefile==0.46
87
+ packaging==23.2
88
+ pandocfilters==1.5.0
89
+ parso==0.8.3
90
+ pathos==0.3.1
91
+ pexpect==4.9.0
92
+ pickleshare==0.7.5
93
+ Pillow==10.1.0
94
+ pkginfo==1.9.6
95
+ platformdirs==4.0.0
96
+ pooch==1.8.0
97
+ pox==0.3.3
98
+ ppft==1.7.6.7
99
+ prometheus-client==0.19.0
100
+ prompt-toolkit==3.0.41
101
+ psutil==5.9.6
102
+ ptyprocess==0.7.0
103
+ pure-eval==0.2.2
104
+ pyasn1==0.5.1
105
+ pyasn1-modules==0.3.0
106
+ pycparser==2.21
107
+ Pygments==2.17.2
108
+ pyparsing==3.1.1
109
+ PyQt5==5.15.10
110
+ PyQt5-Qt5==5.15.2
111
+ PyQt5-sip==12.13.0
112
+ pyrsistent==0.20.0
113
+ python-dateutil==2.8.2
114
+ pytz==2023.3.post1
115
+ pyvista==0.42.3
116
+ pyvistaqt==0.11.0
117
+ pywinpty==0.5.7
118
+ PyYAML==6.0.1
119
+ pyzmq==25.1.1
120
+ QtPy==2.4.1
121
+ readme-renderer==42.0
122
+ referencing==0.31.0
123
+ requests==2.31.0
124
+ requests-toolbelt==1.0.0
125
+ rfc3986==2.0.0
126
+ rich==13.7.0
127
+ rpds-py==0.13.1
128
+ scooby==0.9.2
129
+ SecretStorage==3.3.3
130
+ setuptools-scm==8.0.4
131
+ six==1.16.0
132
+ snowballstemmer==2.2.0
133
+ soupsieve==2.5
134
+ Sphinx==7.2.6
135
+ sphinx-rtd-theme==2.0.0
136
+ sphinxcontrib-applehelp==1.0.7
137
+ sphinxcontrib-devhelp==1.0.5
138
+ sphinxcontrib-htmlhelp==2.0.4
139
+ sphinxcontrib-jquery==4.1
140
+ sphinxcontrib-jsmath==1.0.1
141
+ sphinxcontrib-qthelp==1.0.6
142
+ sphinxcontrib-serializinghtml==1.1.9
143
+ stack-data==0.6.3
144
+ tbb==2021.11.0
145
+ terminado==0.18.0
146
+ testpath==0.6.0
147
+ tinycss2==1.2.1
148
+ tomli==2.0.1
149
+ tornado==6.4
150
+ traitlets==5.14.0
151
+ transforms3d==0.4.1
152
+ twine==4.0.2
153
+ Twisted==23.10.0
154
+ typing_extensions==4.8.0
155
+ urllib3==2.1.0
156
+ vtk==9.3.0
157
+ wcwidth==0.2.12
158
+ webencodings==0.5.1
159
+ wincertstore==0.2
160
+ wslink==1.12.4
161
+ yarl==1.9.3
162
+ zipp==3.17.0
163
+ zope.interface==6.1
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes