compute_cell_quality#
- RectilinearGrid.compute_cell_quality(quality_measure='scaled_jacobian', null_value=- 1.0, progress_bar=False)#
Compute a function of (geometric) quality for each cell of a mesh.
The per-cell quality is added to the mesh’s cell data, in an array named
"CellQuality"
. Cell types not supported by this filter or undefined quality of supported cell types will have an entry of -1.Defaults to computing the scaled Jacobian.
Options for cell quality measure:
'area'
'aspect_beta'
'aspect_frobenius'
'aspect_gamma'
'aspect_ratio'
'collapse_ratio'
'condition'
'diagonal'
'dimension'
'distortion'
'jacobian'
'max_angle'
'max_aspect_frobenius'
'max_edge_ratio'
'med_aspect_frobenius'
'min_angle'
'oddy'
'radius_ratio'
'relative_size_squared'
'scaled_jacobian'
'shape'
'shape_and_size'
'shear'
'shear_and_size'
'skew'
'stretch'
'taper'
'volume'
'warpage'
- Parameters
- quality_measure
str
The cell quality measure to use.
- null_value
float
Float value for undefined quality. Undefined quality are qualities that could be addressed by this filter but is not well defined for the particular geometry of cell in question, e.g. a volume query for a triangle. Undefined quality will always be undefined. The default value is -1.
- progress_barbool,
optional
Display a progress bar to indicate progress.
- quality_measure
- Returns
pyvista.DataSet
Dataset with the computed mesh quality in the
cell_data
as the"CellQuality"
array.
Examples
Compute and plot the minimum angle of a sample sphere mesh.
>>> import pyvista >>> sphere = pyvista.Sphere(theta_resolution=20, phi_resolution=20) >>> cqual = sphere.compute_cell_quality('min_angle') >>> cqual.plot(show_edges=True)
See the Computing Mesh Quality for more examples using this filter.