Compute Cell Quality

ansys.mapdl.reader.cell_quality.quality(grid)

Compute the minimum scaled Jacobian cell quality of an UnstructuredGrid.

Negative values indicate invalid cells while positive values indicate valid cells. Varies between -1 and 1.

Parameters

grid (pyvista.UnstructuredGrid or pyvista.StructuredGrid) – Structured or Unstructured Grid from pyvista.

Examples

>>> from ansys.mapdl import reader as pymapdl_reader
>>> import pyvista as pv
>>> x = np.arange(-10, 10, 5)
>>> y = np.arange(-10, 10, 5)
>>> z = np.arange(-10, 10, 5)
>>> x, y, z = np.meshgrid(x, y, z)
>>> grid = pv.StructuredGrid(x, y, z)
>>> pymapdl_reader.quality(grid)
array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])