resqpy.grid_surface.bisector_from_faces

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

Creates a boolean array denoting the bisection of the grid by the face sets.

Parameters
  • grid_extent_kji (-) – the shape of the grid

  • k_faces (-) – a boolean array of which faces represent the surface in the k dimension

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

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

  • raw_bisector (-) – if True, the bisector is returned without determining which side is shallower

Returns

Tuple containing

  • array (np.ndarray): boolean bisectors array where values are True for cells on the side of the surface that has a lower mean k index on average and False for cells on the other side.

  • is_curtain (bool): True if the surface is a curtain (vertical), otherwise False.

Notes

  • the face sets must form a single ‘sealed’ cut of the grid (eg. not waving in and out of the grid)

  • any ‘boxed in’ parts of the grid (completely enclosed by bisecting faces) will be consistently assigned to either the True or False part

  • this function is DEPRECATED, use newer indices based approach instead: bisector_from_face_indices()