resqpy.grid_surface.bisector_from_face_indices¶
- resqpy.grid_surface.bisector_from_face_indices(grid_extent_kji: Tuple[int, int, int], k_faces_kji0: Optional[ndarray], j_faces_kji0: Optional[ndarray], i_faces_kji0: Optional[ndarray], raw_bisector: bool, p_box: Optional[ndarray]) 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_kji0 (-) – an int array of indices of which faces represent the surface in the k dimension
j_faces_kji0 (-) – an int array of indices of which faces represent the surface in the j dimension
i_faces_kji0 (-) – an int array of indices of which faces represent the surface in the i dimension
raw_bisector (-) – if True, the bisector is returned without determining which side is shallower
p_box (-) – a python protocol box to limit the bisector evaluation over
- 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