generate_cell_indices()#
- Grid.generate_cell_indices() ndarray[Any, dtype[uint32]]Source#
Generate cell indices array.
One row of cell indices array represents one cubic-like mesh with 8 vertices. Cells are indexed in the order of
(L, M, N)direction.- Returns:
ndarrayCell indices ((L-1) x (M-1) x (N-1), 8) 2D array.
Examples
>>> grid = Grid("zone0") >>> cells = grid.generate_cell_indices() >>> cells.shape (1749600, 8) >>> cells array([[ 0, 1, 83, ..., 49283, 49365, 49364], [ 1, 2, 84, ..., 49284, 49366, 49365], [ 2, 3, 85, ..., 49285, 49367, 49366], ..., [1774066, 1774067, 1774149, ..., 1823349, 1823431, 1823430], [1774067, 1774068, 1774150, ..., 1823350, 1823432, 1823431], [1774068, 1774069, 1774151, ..., 1823351, 1823433, 1823432]], dtype=uint32)