The criterion Quality is calculated differently for different element types:
Tri
The quality is calculated as the aspect ratio of the tri element as described in Aspect Ratio.
Tetra
The quality is calculated as the aspect ratio of the tetra element as described in Aspect Ratio.
Quad
The quality is calculated as the Determinant, as described in Determinant.
Hexa
The quality is a weighted diagnostic between Determinant (between -1 and 1), Max Orthogls (normalized between -1 and 1; if deviation from orthogonality is greater than 90 degrees, then the normalized value will be smaller than 0) and Max Warpgls (normalized between 0 and 1; warpage of 0 degrees is 1, warpage of 180 degrees is 0). The minimum of the 3 normalized diagnostics will be used.
Pyramid
The quality is calculated as the determinant.
Prism
The quality is calculated as the minimum of the Determinant and Warpage. Warpage is normalized to a factor between 0 to 1, where 90 degrees is 0, and 0 degrees is 1.