resqpy.grid_surface.get_boundary

resqpy.grid_surface.get_boundary(k_faces: Optional[ndarray], j_faces: Optional[ndarray], i_faces: Optional[ndarray], grid_extent_kji: Tuple[int, int, int]) ndarray

Cretaes a box of the indices that bound the surface (where the faces are True).

Parameters
  • k_faces (np.ndarray) – a boolean array of which faces represent the surface in the k dimension

  • j_faces (np.ndarray) – a boolean array of which faces represent the surface in the j dimension

  • i_faces (np.ndarray) – a boolean array of which faces represent the surface in the i dimension

  • grid_extent_kji (Tuple[int, int, int]) – the shape of the grid

Returns

int array of shape (2, 3) – bounding box in python protocol (max values have been incremented)

Note

input faces arrays are for internal grid faces (ie. extent reduced by 1 in axis of faces); a buffer slice is included where the surface does not reach the edge of the grid