generate_vertices()#

Grid.generate_vertices() ndarray[Any, dtype[float64]]Source#

Generate grid vertices array. A grid_data array is converted to 2D array which represents a vertex in \((X, Y, Z)\) coordinates.

The vertices array is stacked in the order of (L, M, N).

Returns:
ndarray

Vertices (L x N x M, 3) 2D array.

Examples

>>> grid = Grid("zone0")
>>> verts = grid.generate_vertices()
>>> verts.shape
(1823434, 3)
>>> verts
array([[ 3.6       ,  0.        ,  0.        ],
       [ 3.593351  ,  0.        , -0.        ],
       [ 3.559212  ,  0.        , -0.        ],
       ...,
       [ 3.04105882,  0.4816564 , -0.065465  ],
       [ 3.04083165,  0.48162042, -0.065452  ],
       [ 3.04060646,  0.48158475, -0.065439  ]])