resqpy 4.14.1__py3-none-any.whl → 5.1.5__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. resqpy/__init__.py +1 -1
  2. resqpy/fault/_gcs_functions.py +10 -10
  3. resqpy/fault/_grid_connection_set.py +277 -113
  4. resqpy/grid/__init__.py +2 -3
  5. resqpy/grid/_defined_geometry.py +3 -3
  6. resqpy/grid/_extract_functions.py +2 -1
  7. resqpy/grid/_grid.py +95 -12
  8. resqpy/grid/_grid_types.py +22 -7
  9. resqpy/grid/_points_functions.py +1 -1
  10. resqpy/grid/_regular_grid.py +6 -2
  11. resqpy/grid_surface/__init__.py +17 -38
  12. resqpy/grid_surface/_blocked_well_populate.py +5 -5
  13. resqpy/grid_surface/_find_faces.py +1349 -253
  14. resqpy/lines/_polyline.py +24 -33
  15. resqpy/model/_catalogue.py +9 -0
  16. resqpy/model/_forestry.py +18 -14
  17. resqpy/model/_hdf5.py +11 -3
  18. resqpy/model/_model.py +85 -10
  19. resqpy/model/_xml.py +38 -13
  20. resqpy/multi_processing/wrappers/grid_surface_mp.py +92 -37
  21. resqpy/olio/read_nexus_fault.py +8 -2
  22. resqpy/olio/relperm.py +1 -1
  23. resqpy/olio/transmission.py +8 -8
  24. resqpy/olio/triangulation.py +36 -30
  25. resqpy/olio/vector_utilities.py +340 -6
  26. resqpy/olio/volume.py +0 -20
  27. resqpy/olio/wellspec_keywords.py +19 -13
  28. resqpy/olio/write_hdf5.py +1 -1
  29. resqpy/olio/xml_et.py +12 -0
  30. resqpy/property/__init__.py +6 -4
  31. resqpy/property/_collection_add_part.py +4 -3
  32. resqpy/property/_collection_create_xml.py +4 -2
  33. resqpy/property/_collection_get_attributes.py +4 -0
  34. resqpy/property/attribute_property_set.py +311 -0
  35. resqpy/property/grid_property_collection.py +11 -11
  36. resqpy/property/property_collection.py +79 -31
  37. resqpy/property/property_common.py +3 -8
  38. resqpy/rq_import/_add_surfaces.py +34 -14
  39. resqpy/rq_import/_grid_from_cp.py +2 -2
  40. resqpy/rq_import/_import_nexus.py +75 -48
  41. resqpy/rq_import/_import_vdb_all_grids.py +64 -52
  42. resqpy/rq_import/_import_vdb_ensemble.py +12 -13
  43. resqpy/surface/_mesh.py +4 -0
  44. resqpy/surface/_surface.py +593 -118
  45. resqpy/surface/_tri_mesh.py +22 -12
  46. resqpy/surface/_tri_mesh_stencil.py +4 -4
  47. resqpy/surface/_triangulated_patch.py +71 -51
  48. resqpy/time_series/_any_time_series.py +7 -4
  49. resqpy/time_series/_geologic_time_series.py +1 -1
  50. resqpy/unstructured/_hexa_grid.py +6 -2
  51. resqpy/unstructured/_prism_grid.py +13 -5
  52. resqpy/unstructured/_pyramid_grid.py +6 -2
  53. resqpy/unstructured/_tetra_grid.py +6 -2
  54. resqpy/unstructured/_unstructured_grid.py +6 -2
  55. resqpy/well/_blocked_well.py +1986 -1946
  56. resqpy/well/_deviation_survey.py +3 -3
  57. resqpy/well/_md_datum.py +11 -21
  58. resqpy/well/_trajectory.py +10 -5
  59. resqpy/well/_wellbore_frame.py +10 -2
  60. resqpy/well/blocked_well_frame.py +3 -3
  61. resqpy/well/well_object_funcs.py +7 -9
  62. resqpy/well/well_utils.py +33 -0
  63. {resqpy-4.14.1.dist-info → resqpy-5.1.5.dist-info}/METADATA +8 -9
  64. {resqpy-4.14.1.dist-info → resqpy-5.1.5.dist-info}/RECORD +66 -66
  65. {resqpy-4.14.1.dist-info → resqpy-5.1.5.dist-info}/WHEEL +1 -1
  66. resqpy/grid/_moved_functions.py +0 -15
  67. {resqpy-4.14.1.dist-info → resqpy-5.1.5.dist-info}/LICENSE +0 -0
resqpy/grid/__init__.py CHANGED
@@ -1,14 +1,13 @@
1
1
  """The Grid Module."""
2
2
 
3
3
  __all__ = [
4
- 'Grid', 'RegularGrid', 'extract_grid_parent', 'establish_zone_property_kind', 'find_cell_for_x_sect_xz',
5
- 'grid_flavour', 'is_regular_grid', 'any_grid'
4
+ 'Grid', 'RegularGrid', 'extract_grid_parent', 'find_cell_for_x_sect_xz', 'grid_flavour', 'is_regular_grid',
5
+ 'any_grid'
6
6
  ]
7
7
 
8
8
  from ._grid import Grid
9
9
  from ._regular_grid import RegularGrid
10
10
  from ._grid_types import grid_flavour, is_regular_grid, any_grid
11
- from ._moved_functions import establish_zone_property_kind
12
11
  from ._extract_functions import extract_grid_parent, extent_kji_from_root
13
12
  from ._points_functions import find_cell_for_x_sect_xz
14
13
 
@@ -293,7 +293,7 @@ def set_geometry_is_defined(grid,
293
293
 
294
294
  assert not np.all(nan_mask), 'grid does not have any geometry defined'
295
295
 
296
- points[np.where(np.repeat(np.expand_dims(nan_mask, axis = nan_mask.ndim), 3, axis = -1))] = np.NaN
296
+ points[np.where(np.repeat(np.expand_dims(nan_mask, axis = nan_mask.ndim), 3, axis = -1))] = np.nan
297
297
 
298
298
  surround_z = grid.xyz_box(lazy = False)[1 if grid.z_inc_down() else 0, 2]
299
299
 
@@ -335,7 +335,7 @@ def set_geometry_is_defined(grid,
335
335
  if nullify_partial_pillars:
336
336
  partial_pillar_mask = np.logical_and(pillar_defined_mask, np.any(nan_mask, axis = 0).flatten())
337
337
  if np.any(partial_pillar_mask):
338
- points.reshape((grid.nk_plus_k_gaps + 1, -1, 3))[:, partial_pillar_mask, :] = np.NaN
338
+ points.reshape((grid.nk_plus_k_gaps + 1, -1, 3))[:, partial_pillar_mask, :] = np.nan
339
339
  grid.geometry_defined_for_all_pillars_cached = False
340
340
  cells_update_needed = True
341
341
  elif complete_partial_pillars:
@@ -416,7 +416,7 @@ def __handle_areal_dots(areal_dots, grid, nan_mask):
416
416
  primaries = (grid.nj + 1) * (grid.ni + 1)
417
417
  nan_mask[:, :primaries] = np.logical_or(nan_mask[:, :primaries], dot_mask.reshape((-1, primaries)))
418
418
  else:
419
- nan_mask = np.where(dot_mask, np.NaN, nan_mask)
419
+ nan_mask = np.where(dot_mask, np.nan, nan_mask)
420
420
  return nan_mask
421
421
 
422
422
 
@@ -501,7 +501,7 @@ def extract_inactive_mask(grid, check_pinchout = False):
501
501
  geom_defined = grr_dg.cell_geometry_is_defined_ref(grid)
502
502
  if grid.inactive is None:
503
503
  if geom_defined is None or geom_defined is True:
504
- grid.inactive = np.zeros(tuple(grid.extent_kji)) # ie. all active
504
+ grid.inactive = np.zeros(tuple(grid.extent_kji), dtype = bool) # ie. all active
505
505
  else:
506
506
  grid.inactive = np.logical_not(grr_dg.cell_geometry_is_defined_ref(grid))
507
507
  if check_pinchout:
@@ -524,6 +524,7 @@ def extract_inactive_mask(grid, check_pinchout = False):
524
524
  active_gpc = rprop.selective_version_of_collection(active_gpc,
525
525
  time_index = grid.time_index,
526
526
  time_series_uuid = grid.time_series_uuid)
527
+ active_parts = active_gpc.parts()
527
528
  else:
528
529
  active_parts = []
529
530
  for part in active_gpc.parts():
resqpy/grid/_grid.py CHANGED
@@ -15,6 +15,7 @@ import resqpy.grid as grr
15
15
  import resqpy.grid_surface as rqgs
16
16
  import resqpy.fault as rqf
17
17
  import resqpy.property as rqp
18
+ import resqpy.lines as rql
18
19
  import resqpy.olio.grid_functions as gf
19
20
  import resqpy.olio.uuid as bu
20
21
  import resqpy.olio.write_hdf5 as rwh5
@@ -75,7 +76,8 @@ class Grid(BaseResqpy):
75
76
  geometry_required = True,
76
77
  title = None,
77
78
  originator = None,
78
- extra_metadata = {}):
79
+ extra_metadata = {},
80
+ load_inactive = True):
79
81
  """Create a Grid object and optionally populate from xml tree.
80
82
 
81
83
  arguments:
@@ -91,6 +93,8 @@ class Grid(BaseResqpy):
91
93
  ignored if loading from xml
92
94
  extra_metadata (dict, optional): dictionary of extra metadata items to add to the grid;
93
95
  ignored if loading from xml
96
+ load_inactive (bool, default True): if True and uuid is provided, the inactive attribubte is
97
+ populated if a property of kind 'active' is found for the grid
94
98
 
95
99
  returns:
96
100
  a newly created Grid object
@@ -147,6 +151,8 @@ class Grid(BaseResqpy):
147
151
  self.title = 'ROOT'
148
152
 
149
153
  if uuid is not None:
154
+ if load_inactive:
155
+ self.extract_inactive_mask()
150
156
  if geometry_required:
151
157
  assert self.geometry_root is not None, 'grid geometry not present in xml'
152
158
  if find_properties:
@@ -185,7 +191,6 @@ class Grid(BaseResqpy):
185
191
  self.extract_parent()
186
192
  self.extract_children()
187
193
  # self.create_column_pillar_mapping() # mapping now created on demand in other methods
188
- self.extract_inactive_mask()
189
194
  self.extract_stratigraphy()
190
195
  self.get_represented_interpretation()
191
196
 
@@ -265,6 +270,10 @@ class Grid(BaseResqpy):
265
270
  return np.count_nonzero(self.array_cell_geometry_is_defined)
266
271
  return None
267
272
 
273
+ def is_big(self):
274
+ """Returns True if number of cells exceeds 2^31 - 1, otherwise False."""
275
+ return (np.prod(self.extent_kji) >= 2_147_483_648)
276
+
268
277
  def natural_cell_index(self, cell_kji0):
269
278
  """Returns a single integer for the cell, being the index into a flattened array."""
270
279
 
@@ -671,13 +680,7 @@ class Grid(BaseResqpy):
671
680
  return _create_grid_xml(self, ijk, ext_uuid, add_as_part, add_relationships, write_active, write_geometry,
672
681
  use_lattice, use_parametric_lines)
673
682
 
674
- def x_section_points(self, axis, ref_slice0 = 0, plus_face = False, masked = False):
675
- """Deprecated: please use `unsplit_x_section_points` instead."""
676
- warnings.warn('Deprecated: please use `unsplit_x_section_points` instead.', DeprecationWarning)
677
-
678
- return unsplit_x_section_points(self, axis, ref_slice0 = ref_slice0, plus_face = plus_face, masked = masked)
679
-
680
- # The implementations of the below functions have been moved to separate modules.
683
+ # the implementations of the functions below have been moved to separate modules
681
684
 
682
685
  def cell_geometry_is_defined(self, cell_kji0 = None, cell_geometry_is_defined_root = None, cache_array = True):
683
686
  """Returns True if the geometry of the specified cell is defined.
@@ -1489,6 +1492,86 @@ class Grid(BaseResqpy):
1489
1492
  """
1490
1493
  return z_corner_point_depths(self, order = order)
1491
1494
 
1495
+ def frontier(self, set_z_zero = True, title = None, add_as_part = True, mode = 'mean'):
1496
+ """Returns a frontier polygon (closed polyline) based on midpoints of edge coordinate lines, with z set to zero.
1497
+
1498
+ arguments:
1499
+ - set_z_zero (bool, default True): if True, the z values of the returned polyline are all set to zero; if False,
1500
+ they are left at the midpoint z values from the edge coordinate lines
1501
+ - title (str, optional): the citation title for the polyline; if None, one is generated using the grid title
1502
+ - add_as_part (bool default True): if True, the xml is created for the polyline and it is added as a part to
1503
+ the model; if False, the create_xml() method is not called fot the polyline
1504
+ - mode (str, default 'mean'): one of 'mean', 'top', 'base', 'inner', 'outer' determining how a non-vertical
1505
+ edge coordinate line is converted to a point to include in the frontier
1506
+
1507
+ returns:
1508
+ - closed Polyline representing the frontier of the grid in plan view
1509
+ """
1510
+
1511
+ def get_point(clep, mode, centrum):
1512
+ if mode == 'mean':
1513
+ return np.nanmean(clep, axis = 0)
1514
+ if mode == 'top':
1515
+ return clep[0]
1516
+ if mode == 'base':
1517
+ return clep[-1]
1518
+ assert mode in ['inner', 'outer'], f'unrecognised frontier mode: {mode}'
1519
+ vp = clep - np.expand_dims(centrum, axis = 0)
1520
+ dp = np.sum(vp * vp, axis = -1)
1521
+ if (dp[0] < dp[1] and mode == 'inner') or (dp[0] > dp[1] and mode == 'outer'):
1522
+ return clep[0]
1523
+ return clep[-1]
1524
+
1525
+ assert mode in ['mean', 'top', 'base', 'inner', 'outer']
1526
+ coords = self.coordinate_line_end_points()
1527
+ centrum = None
1528
+ if mode in ['inner', 'outer']:
1529
+ centrum = np.nanmean(np.concatenate((coords[0, 0], coords[0, -1], coords[-1, 0], coords[-1, -1]), axis = 0),
1530
+ axis = 0)
1531
+ assert not np.any(
1532
+ np.isnan(centrum)), f'trying to make frontier polygon in mode {mode} when corners of grid not defined'
1533
+ nj = self.nj
1534
+ ni = self.ni
1535
+ frontier = np.zeros((2 * (nj + ni), 3), dtype = float)
1536
+ f_i = 0
1537
+ for i in range(self.ni):
1538
+ c = get_point(coords[0, i], mode, centrum)
1539
+ if np.any(np.isnan(c)):
1540
+ continue
1541
+ frontier[f_i] = c
1542
+ f_i += 1
1543
+ for j in range(self.nj):
1544
+ c = get_point(coords[j, ni], mode, centrum)
1545
+ if np.any(np.isnan(c)):
1546
+ continue
1547
+ frontier[f_i] = c
1548
+ f_i += 1
1549
+ for i in range(self.ni, 0, -1):
1550
+ c = get_point(coords[nj, i], mode, centrum)
1551
+ if np.any(np.isnan(c)):
1552
+ continue
1553
+ frontier[f_i] = c
1554
+ f_i += 1
1555
+ for j in range(self.nj, 0, -1):
1556
+ c = get_point(coords[j, 0], mode, centrum)
1557
+ if np.any(np.isnan(c)):
1558
+ continue
1559
+ frontier[f_i] = c
1560
+ f_i += 1
1561
+ assert 4 <= f_i <= 2 * (nj + ni), 'failed to define frontier polygon (NaNs in grid geometry?)'
1562
+ if set_z_zero:
1563
+ frontier[:, 2] = 0.0
1564
+ if not title:
1565
+ title = f'frontier of {self.title}'
1566
+ pl = rql.Polyline(self.model,
1567
+ set_coord = frontier[:f_i],
1568
+ set_crs = self.crs_uuid,
1569
+ is_closed = True,
1570
+ title = title)
1571
+ if add_as_part:
1572
+ pl.create_xml()
1573
+ return pl
1574
+
1492
1575
  def corner_points(self, cell_kji0 = None, points_root = None, cache_resqml_array = True, cache_cp_array = False):
1493
1576
  """Returns a numpy array of corner points for a single cell or the whole grid.
1494
1577
 
@@ -2255,9 +2338,9 @@ class Grid(BaseResqpy):
2255
2338
  pc = self.extract_property_collection()
2256
2339
 
2257
2340
  if baffle_triplet is not None:
2258
- trm_k[1:-1] = np.where(baffle_triplet[0], 0.0, trm_k[1:-1])
2259
- trm_j[:, 1:-1] = np.where(baffle_triplet[1], 0.0, trm_j[:, 1:-1])
2260
- trm_i[:, :, 1:-1] = np.where(baffle_triplet[2], 0.0, trm_i[:, :, 1:-1])
2341
+ trm_k[1:-1][baffle_triplet[0]] = 0.0
2342
+ trm_j[:, 1:-1][baffle_triplet[1]] = 0.0
2343
+ trm_i[:, :, 1:-1][baffle_triplet[2]] = 0.0
2261
2344
 
2262
2345
  if composite_property:
2263
2346
  tr_composite = np.concatenate((trm_k.flat, trm_j.flat, trm_i.flat))
@@ -51,13 +51,15 @@ def is_regular_grid(grid_root):
51
51
  return grid_flavour(grid_root) == 'IjkBlockGrid'
52
52
 
53
53
 
54
- def any_grid(parent_model, uuid = None, find_properties = True):
54
+ def any_grid(parent_model, uuid = None, find_properties = True, load_inactive = True):
55
55
  """Returns a Grid or RegularGrid or UnstructuredGrid object depending on the extra metadata in the xml.
56
56
 
57
57
  arguments:
58
58
  parent_model (Model): the model within which the grid exists
59
59
  uuid (UUID): the uuid of the grid object to be instantiated
60
60
  find_properties (bool, default True): passed onward to the instantiation method
61
+ load_inactive (bool, default True): if True and uuid is provided, the inactive attribubte is
62
+ populated if a property of kind 'active' is found for the grid
61
63
 
62
64
  note:
63
65
  full list of resqpy grid class objects which could be returned:
@@ -70,17 +72,30 @@ def any_grid(parent_model, uuid = None, find_properties = True):
70
72
  if flavour is None:
71
73
  return None
72
74
  if flavour == 'IjkGrid':
73
- return grr.Grid(parent_model, uuid = uuid, find_properties = find_properties)
75
+ return grr.Grid(parent_model, uuid = uuid, find_properties = find_properties, load_inactive = load_inactive)
74
76
  if flavour == 'IjkBlockGrid':
75
- return grr.RegularGrid(parent_model, extent_kji = None, uuid = uuid, find_properties = find_properties)
77
+ return grr.RegularGrid(parent_model,
78
+ extent_kji = None,
79
+ uuid = uuid,
80
+ find_properties = find_properties,
81
+ load_inactive = load_inactive)
76
82
  if flavour == 'UnstructuredGrid':
77
- return rug.UnstructuredGrid(parent_model, uuid = uuid, find_properties = find_properties)
83
+ return rug.UnstructuredGrid(parent_model,
84
+ uuid = uuid,
85
+ find_properties = find_properties,
86
+ load_inactive = load_inactive)
78
87
  if flavour == 'TetraGrid':
79
- return rug.TetraGrid(parent_model, uuid = uuid, find_properties = find_properties)
88
+ return rug.TetraGrid(parent_model,
89
+ uuid = uuid,
90
+ find_properties = find_properties,
91
+ load_inactive = load_inactive)
80
92
  if flavour == 'HexaGrid':
81
- return rug.HexaGrid(parent_model, uuid = uuid, find_properties = find_properties)
93
+ return rug.HexaGrid(parent_model, uuid = uuid, find_properties = find_properties, load_inactive = load_inactive)
82
94
  if flavour == 'PyramidGrid':
83
95
  return rug.PyramidGrid(parent_model, uuid = uuid, find_properties = find_properties)
84
96
  if flavour == 'PrismGrid':
85
- return rug.PrismGrid(parent_model, uuid = uuid, find_properties = find_properties)
97
+ return rug.PrismGrid(parent_model,
98
+ uuid = uuid,
99
+ find_properties = find_properties,
100
+ load_inactive = load_inactive)
86
101
  return None
@@ -790,7 +790,7 @@ def corner_points(grid, cell_kji0 = None, points_root = None, cache_resqml_array
790
790
  # note: this function returns a derived object rather than a native resqml object
791
791
 
792
792
  def one_cell_cp(grid, cell_kji0, points_root, cache_array):
793
- cp = np.full((2, 2, 2, 3), np.NaN)
793
+ cp = np.full((2, 2, 2, 3), np.nan)
794
794
  if not grr_dg.geometry_defined_for_all_cells(grid):
795
795
  if not grr_dg.cell_geometry_is_defined(grid, cell_kji0 = cell_kji0, cache_array = cache_array):
796
796
  return cp
@@ -46,7 +46,8 @@ class RegularGrid(grr_g.Grid):
46
46
  find_properties = True,
47
47
  title = None,
48
48
  originator = None,
49
- extra_metadata = {}):
49
+ extra_metadata = {},
50
+ load_inactive = True):
50
51
  """Creates a regular grid object based on dxyz, or derived from a Mesh object.
51
52
 
52
53
  arguments:
@@ -82,6 +83,8 @@ class RegularGrid(grr_g.Grid):
82
83
  ignored if loading from xml
83
84
  extra_metadata (dict, optional): dictionary of extra metadata items to add to the grid;
84
85
  ignored if loading from xml
86
+ load_inactive (bool, default True): if True and uuid is provided, the inactive attribubte is
87
+ populated if a property of kind 'active' is found for the grid
85
88
 
86
89
  returns:
87
90
  a newly created RegularGrid object with inheritance from the Grid class
@@ -184,7 +187,8 @@ class RegularGrid(grr_g.Grid):
184
187
  geometry_required = False,
185
188
  title = title,
186
189
  originator = originator,
187
- extra_metadata = extra_metadata)
190
+ extra_metadata = extra_metadata,
191
+ load_inactive = load_inactive)
188
192
 
189
193
  self.geometry_defined_for_all_cells_cached = True
190
194
  self.geometry_defined_for_all_pillars_cached = True
@@ -1,33 +1,19 @@
1
1
  """Classes for RESQML objects related to surfaces."""
2
2
 
3
3
  __all__ = [
4
- "GridSkin",
5
- "generate_untorn_surface_for_layer_interface",
6
- "generate_torn_surface_for_layer_interface",
7
- "generate_torn_surface_for_x_section",
8
- "generate_untorn_surface_for_x_section",
9
- "point_is_within_cell",
10
- "create_column_face_mesh_and_surface",
11
- "find_intersections_of_trajectory_with_surface",
12
- "find_intersections_of_trajectory_with_layer_interface",
13
- "find_first_intersection_of_trajectory_with_surface",
4
+ "GridSkin", "generate_untorn_surface_for_layer_interface", "generate_torn_surface_for_layer_interface",
5
+ "generate_torn_surface_for_x_section", "generate_untorn_surface_for_x_section", "point_is_within_cell",
6
+ "create_column_face_mesh_and_surface", "find_intersections_of_trajectory_with_surface",
7
+ "find_intersections_of_trajectory_with_layer_interface", "find_first_intersection_of_trajectory_with_surface",
14
8
  "find_first_intersection_of_trajectory_with_layer_interface",
15
9
  "find_first_intersection_of_trajectory_with_cell_surface",
16
- "find_intersection_of_trajectory_interval_with_column_face",
17
- "trajectory_grid_overlap",
18
- "populate_blocked_well_from_trajectory",
19
- "generate_surface_for_blocked_well_cells",
20
- "find_faces_to_represent_surface_staffa",
21
- "find_faces_to_represent_surface_regular",
22
- "find_faces_to_represent_surface_regular_optimised",
23
- "find_faces_to_represent_surface",
24
- "bisector_from_faces",
25
- "column_bisector_from_faces",
26
- "shadow_from_faces",
27
- "get_boundary",
28
- "_where_true",
29
- "_first_true",
30
- "intersect_numba",
10
+ "find_intersection_of_trajectory_interval_with_column_face", "trajectory_grid_overlap",
11
+ "populate_blocked_well_from_trajectory", "generate_surface_for_blocked_well_cells",
12
+ "find_faces_to_represent_surface_staffa", "find_faces_to_represent_surface_regular",
13
+ "find_faces_to_represent_surface_regular_optimised", "find_faces_to_represent_surface_regular_dense_optimised",
14
+ "find_faces_to_represent_surface", "bisector_from_faces", "bisector_from_face_indices",
15
+ "packed_bisector_from_face_indices", "column_bisector_from_faces", "shadow_from_faces", "get_boundary",
16
+ "get_boundary_dict", "_where_true", "_first_true", "intersect_numba", "get_box"
31
17
  ]
32
18
 
33
19
  from ._grid_skin import GridSkin
@@ -52,19 +38,12 @@ from ._blocked_well_populate import (
52
38
  populate_blocked_well_from_trajectory,
53
39
  generate_surface_for_blocked_well_cells,
54
40
  )
55
- from ._find_faces import (
56
- find_faces_to_represent_surface_staffa,
57
- find_faces_to_represent_surface_regular,
58
- find_faces_to_represent_surface_regular_optimised,
59
- find_faces_to_represent_surface,
60
- bisector_from_faces,
61
- column_bisector_from_faces,
62
- shadow_from_faces,
63
- get_boundary,
64
- _where_true,
65
- _first_true,
66
- intersect_numba,
67
- )
41
+ from ._find_faces import (find_faces_to_represent_surface_staffa, find_faces_to_represent_surface_regular,
42
+ find_faces_to_represent_surface_regular_optimised,
43
+ find_faces_to_represent_surface_regular_dense_optimised, find_faces_to_represent_surface,
44
+ bisector_from_faces, bisector_from_face_indices, packed_bisector_from_face_indices,
45
+ column_bisector_from_faces, shadow_from_faces, get_boundary, get_boundary_dict, _where_true,
46
+ _first_true, intersect_numba, get_box)
68
47
 
69
48
  # Set "module" attribute of all public objects to this path.
70
49
  for _name in __all__:
@@ -118,7 +118,7 @@ def populate_blocked_well_from_trajectory(blocked_well,
118
118
  if xyz is None:
119
119
  log.error('failed to lazily find intersection of trajectory with top surface of grid')
120
120
  return None
121
- cell_kji0 = np.array((0, col_ji0[0], col_ji0[1]), dtype = int)
121
+ cell_kji0 = np.array((0, col_ji0[0], col_ji0[1]), dtype = np.int32)
122
122
  axis = 0
123
123
  polarity = 0
124
124
 
@@ -133,7 +133,7 @@ def populate_blocked_well_from_trajectory(blocked_well,
133
133
  else:
134
134
  log.debug(f"skin intersection x,y,z: {xyz}; knot: {entry_knot}; cell kji0: {cell_kji0}; face: "
135
135
  f"{'KJI'[axis]}{'-+'[polarity]}")
136
- cell_kji0 = np.array(cell_kji0, dtype = int)
136
+ cell_kji0 = np.array(cell_kji0, dtype = np.int32)
137
137
 
138
138
  previous_kji0 = cell_kji0.copy()
139
139
  previous_kji0[axis] += polarity * 2 - 1 # note: previous may legitimately be 'beyond' edge of grid
@@ -244,9 +244,9 @@ def populate_blocked_well_from_trajectory(blocked_well,
244
244
 
245
245
  blocked_well.node_mds = np.array(node_mds_list, dtype = float)
246
246
  blocked_well.node_count = node_count
247
- blocked_well.grid_indices = np.array(grid_indices_list, dtype = int)
248
- blocked_well.cell_indices = np.array(cell_indices_list, dtype = int)
249
- blocked_well.face_pair_indices = np.array(face_pairs_list, dtype = int)
247
+ blocked_well.grid_indices = np.array(grid_indices_list, dtype = np.int32)
248
+ blocked_well.cell_indices = np.array(cell_indices_list, dtype = np.int64)
249
+ blocked_well.face_pair_indices = np.array(face_pairs_list, dtype = np.int8)
250
250
  blocked_well.cell_count = cell_count
251
251
  blocked_well.grid_list = [grid]
252
252