resqpy.grid_surface.intersect_numba¶
- resqpy.grid_surface.intersect_numba(axis: int, index1: int, index2: int, hits: ndarray, n_axis: int, points: ndarray, triangles: ndarray, grid_dxyz: Tuple[float], faces: ndarray, return_depths: bool, depths: ndarray, return_offsets: bool, offsets: ndarray, return_triangles: bool, triangle_per_face: ndarray) Tuple[ndarray, ndarray, ndarray] ¶
Finds the faces that intersect the surface in 3D.
- Parameters
axis (int) – axis number. Axis i is 0, j is 1, and k is 2.
index1 (int) – the first index. Axis i is 0, j is 0, and k is 1.
index2 (int) – the second index. Axis i is 1, j is 2, and k is 2.
hits (np.ndarray) – boolean array of grid centres that intersected the surface for the given axis.
n_axis (int) – number of cells in the axis.
points (np.ndarray) – array of all the surface node points in 3D.
triangles (np.ndarray) – array of all the points indices creating each triangle.
grid_dxyz (Tuple[float]) – tuple of a cell’s thickness in each axis.
faces (np.ndarray) – boolean array of each cell face that can represent the surface.
return_depths (bool) – if True, an array of the depths is populated.
depths (np.ndarray) – array of the z values of the intersection point of the inter-cell centre vector with a triangle in the surface.
return_offsets (bool) – if True, an array of the offsets is calculated.
offsets (np.ndarray) – array of the distance between the centre of the cell face and the intersection point of the inter-cell centre vector with a triangle in the surface.
return_triangles (bool) – if True, an array of triangle indices is returned.
- Returns
Tuple containing –
faces (np.ndarray): boolean array of each cell face that can represent the surface.
- offsets (np.ndarray): array of the distance between the centre of the cell face and the
intersection point of the inter-cell centre vector with a triangle in the surface.
triangle_per_face (np.ndarray): array of triangle numbers