discretize.CylindricalMesh.h_gridded#

property CylindricalMesh.h_gridded#

Return dimensions of all mesh cells as staggered grid.

This property returns a numpy array of shape (n_cells, dim) containing gridded x, (y and z) dimensions for all cells in the mesh. The first row corresponds to the bottom-front-leftmost cell. The cells are ordered along the x, then y, then z directions.

Returns:
(n_cells, dim) numpy.ndarray of float

Dimensions of all mesh cells as staggered grid

Examples

The following is a 1D example.

>>> from discretize import TensorMesh
>>> hx = np.ones(5)
>>> mesh_1D = TensorMesh([hx])
>>> mesh_1D.h_gridded
array([[1.],
       [1.],
       [1.],
       [1.],
       [1.]])

The following is a 3D example.

>>> hx, hy, hz = np.ones(2), 2*np.ones(2), 3*np.ones(2)
>>> mesh_3D = TensorMesh([hx, hy, hz])
>>> mesh_3D.h_gridded
array([[1., 2., 3.],
       [1., 2., 3.],
       [1., 2., 3.],
       [1., 2., 3.],
       [1., 2., 3.],
       [1., 2., 3.],
       [1., 2., 3.],
       [1., 2., 3.]])