pyvista.cell_quality_info#
- cell_quality_info(
- cell_type: Literal[CellType.TRIANGLE, CellType.QUAD, CellType.TETRA, CellType.HEXAHEDRON, CellType.PYRAMID, CellType.WEDGE, 'TRIANGLE', 'triangle', 'QUAD', 'quad', 'TETRA', 'tetra', 'HEXAHEDRON', 'hexahedron', 'PYRAMID', 'pyramid', 'WEDGE', 'wedge'],
- quality_measure: Literal['area', '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'],
セル品質計測に関する情報を返します。
この関数は、指定された
CellTypeに対してcell_quality()が計算した品質測定に関する情報を返す。以下は、各施策について記載したものです:acceptable_range: 品質良好なセルはこの範囲の値を持ちます。normal_range: 縮退のあるセルを除くすべてのセルは、この範囲の値を持ちます。full_range: 縮退のあるセルも含め、すべてのセルはこの範囲の値を持ちます。unit_cell_value: 参照単位セルの品質測定値 (例: 三角形の辺の長さが1の正三角形)。
この情報は、特定のセルの品質が高いか低いかを知るのに役立ちます。
この機能から得られる全てのセル品質情報の概要については、以下の表を参照してください。
Triangle Cell Info
Info about
TRIANGLEcell quality measures. SeeTriangle()for an example unit cell.Measure
Acceptable Range
Normal Range
Full Range
Unit Cell Value
area[0.0, inf]
[0.0, inf]
[0.0, inf]
0.433
aspect_ratio[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
aspect_frobenius[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
condition[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
distortion[0.5, 1.0]
[0.0, 1.0]
[-inf, inf]
1.0
max_angle[60.0, 90.0]
[60.0, 180.0]
[0.0, 180.0]
60.0
min_angle[30.0, 60.0]
[0.0, 60.0]
[0.0, 360.0]
60.0
scaled_jacobian[0.5, 1.15]
[-1.15, 1.15]
[-inf, inf]
1.0
radius_ratio[1.0, 3.0]
[1.0, inf]
[1.0, inf]
1.0
shape[0.25, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
shape_and_size[0.25, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
Quad Cell Info
Info about
QUADcell quality measures. SeeQuadrilateral()for an example unit cell.Measure
Acceptable Range
Normal Range
Full Range
Unit Cell Value
area[0.0, inf]
[0.0, inf]
[-inf, inf]
1.0
aspect_ratio[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
condition[1.0, 4.0]
[1.0, inf]
[1.0, inf]
1.0
distortion[0.5, 1.0]
[0.0, 1.0]
[-inf, inf]
1.0
jacobian[0.0, inf]
[0.0, inf]
[-inf, inf]
1.0
max_aspect_frobenius[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
max_angle[90.0, 135.0]
[90.0, 360.0]
[0.0, 360.0]
90.0
max_edge_ratio[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
med_aspect_frobenius[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
min_angle[45.0, 90.0]
[0.0, 90.0]
[0.0, 360.0]
90.0
oddy[0.0, 0.5]
[0.0, inf]
[0.0, inf]
0.0
radius_ratio[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
relative_size_squared[0.3, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
scaled_jacobian[0.3, 1.0]
[-1.0, 1.0]
[-1.0, 1.0]
1.0
shape[0.3, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
shape_and_size[0.2, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
shear[0.3, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
shear_and_size[0.2, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
skew[0.0, 0.5]
[0.0, 1.0]
[0.0, 1.0]
0.0
stretch[0.25, 1.0]
[0.0, 1.0]
[0.0, inf]
1.0
taper[0.0, 0.7]
[0.0, inf]
[0.0, inf]
0.0
warpage[0.3, 1.0]
[-1.0, 1.0]
[-inf, inf]
1.0
Hexahedron Cell Info
Info about
HEXAHEDRONcell quality measures. SeeHexahedron()for an example unit cell.Measure
Acceptable Range
Normal Range
Full Range
Unit Cell Value
diagonal[0.65, 1.0]
[0.0, 1.0]
[0.0, inf]
1.0
dimension[0.0, inf]
[0.0, inf]
[0.0, inf]
0.577
distortion[0.5, 1.0]
[0.0, 1.0]
[-inf, inf]
1.0
jacobian[0.0, inf]
[0.0, inf]
[-inf, inf]
1.0
max_edge_ratio[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
max_aspect_frobenius[1.0, 3.0]
[1.0, inf]
[1.0, inf]
1.0
med_aspect_frobenius[1.0, 3.0]
[1.0, inf]
[1.0, inf]
1.0
oddy[0.0, 0.5]
[0.0, inf]
[0.0, inf]
0.0
relative_size_squared[0.5, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
scaled_jacobian[0.5, 1.0]
[-1.0, 1.0]
[-1.0, inf]
1.0
shape[0.3, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
shape_and_size[0.2, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
shear[0.3, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
shear_and_size[0.2, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
skew[0.0, 0.5]
[0.0, 1.0]
[0.0, inf]
0.0
stretch[0.25, 1.0]
[0.0, 1.0]
[0.0, inf]
1.0
taper[0.0, 0.5]
[0.0, inf]
[0.0, inf]
0.0
volume[0.0, inf]
[0.0, inf]
[-inf, inf]
1.0
Tetra Cell Info
Info about
TETRAcell quality measures. SeeTetrahedron()for an example unit cell.Measure
Acceptable Range
Normal Range
Full Range
Unit Cell Value
aspect_frobenius[1.0, 1.3]
[1.0, inf]
[1.0, inf]
1.0
aspect_gamma[1.0, 3.0]
[1.0, inf]
[1.0, inf]
1.0
aspect_ratio[1.0, 3.0]
[1.0, inf]
[1.0, inf]
1.0
collapse_ratio[0.1, inf]
[0.0, inf]
[0.0, inf]
0.816
condition[1.0, 3.0]
[1.0, inf]
[1.0, inf]
1.0
distortion[0.5, 1.0]
[0.0, 1.0]
[-inf, inf]
1.0
jacobian[0.0, inf]
[0.0, inf]
[-inf, inf]
0.707
min_angle[40.0, 70.5]
[0.0, 70.5]
[0.0, 360.0]
70.5
radius_ratio[1.0, 3.0]
[1.0, inf]
[1.0, inf]
1.0
relative_size_squared[0.3, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
scaled_jacobian[0.5, 1.0]
[-1.0, 1.0]
[-inf, inf]
1.0
shape[0.3, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
shape_and_size[0.2, 1.0]
[0.0, 1.0]
[0.0, 1.0]
1.0
volume[0.0, inf]
[-inf, inf]
[-inf, inf]
0.118
Wedge Cell Info
Pyramid Cell Info
注釈
The information returned by this function is based on the Verdict Library Reference Manual.
注釈
Information is not available for all valid quality measures computed by
cell_quality(). Only a subset is provided here. If information about a measure is missing and you have knowledge about its acceptable range, normal range, etc., please consider submitting a pull request on GitHub at pyvista/pyvista.- パラメータ:
- cell_type
CellType|str Cell type to get information about. May be a
CellTypeor the name of a cell type as a string.- quality_measure
str Quality measure to get information about. May be any quality measure from Cell Quality Measures.
- cell_type
- 戻り値:
CellQualityInfoDataclass with information about the quality measure for a specific cell type.
- エラー処理:
ValueErrorIf info is not available for the specified cell type or measure.
例
Get cell quality info for
TRIANGLEcells and the'scaled_jacobian'quality measure.>>> import pyvista as pv >>> info_tri = pv.cell_quality_info(pv.CellType.TRIANGLE, 'scaled_jacobian') >>> info_tri CellQualityInfo(cell_type=<CellType.TRIANGLE: 5>, quality_measure='scaled_jacobian', acceptable_range=(0.5, 1.1547005383792515), normal_range=(-1.1547005383792515, 1.1547005383792515), full_range=(-inf, inf), unit_cell_value=1.0)
Show the acceptable range for this measure.
>>> info_tri.acceptable_range (0.5, 1.1547005383792515)
Show the value of this measure for equilateral triangles with edge length of one.
>>> info_tri.unit_cell_value 1.0
Get info for the same measure but for
QUADcells.>>> info_quad = pv.cell_quality_info(pv.CellType.QUAD, 'scaled_jacobian') >>> info_quad CellQualityInfo(cell_type=<CellType.QUAD: 9>, quality_measure='scaled_jacobian', acceptable_range=(0.3, 1.0), normal_range=(-1.0, 1.0), full_range=(-1.0, 1.0), unit_cell_value=1.0)
Show the acceptable range. Note that it differs for quads compared to triangles.
>>> info_quad.acceptable_range (0.3, 1.0)
Show the value of this measure for a square cell with edge length of one.
>>> info_quad.unit_cell_value 1.0
See メッシュ品質の計算 for more examples using this function.