# meshQuality

Evaluate shape quality of mesh elements

## Description

determines the shape quality by using the ratio of minimal to maximal dimensions of
an element. The quality values are numbers from 0 through 1, where 1 corresponds to
the optimal shape of the element. Specify `Q`

= meshQuality(___,"aspect-ratio")`"aspect-ratio"`

after
any of the previous syntaxes.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

By default, `meshQuality`

calculates the shape quality of a
triangular mesh element as follows:

$$Q=\frac{4\sqrt{3}A}{{\displaystyle \sum _{i=1}^{3}{l}_{i}^{2}}}$$

Here, *A* is the area of the triangle, and
*l _{i}* are the edge lengths of the
triangle.

`meshQuality`

calculates the shape quality of a tetrahedral mesh
element as follows:

$$Q=\frac{18V}{\sqrt{{\displaystyle \sum _{i=1}^{6}{l}_{i}^{2}}}\sqrt{{\displaystyle \sum _{k=1}^{4}{A}_{k}^{2}}}}$$

Here, *V* is the volume of the tetrahedron,
*l _{i}* are the edge lengths, and

*A*are the areas of the triangular faces.

_{k}When you use the `aspect-ratio`

argument,
`meshQuality`

calculates the quality of a triangular mesh element
as follows:

$${Q}_{AR}=\frac{4}{\sqrt{3}}\frac{A}{{l}_{\mathrm{max}}^{2}}$$

Here, *l _{max}* is the maximal edge length of the
triangle.

The aspect-ratio quality of a tetrahedral mesh element is:

$${Q}_{AR}=\frac{\text{3}\sqrt{6}}{2}\frac{\text{V}}{{\text{l}}_{\text{max}}{A}_{\text{max}}}$$

Here, *l _{max}* is the maximal edge length of the
tetrahedron, and

*A*is the area of the largest face of the tetrahedron:

_{max}$${A}_{\mathrm{max}}=\mathrm{max}({A}_{k}),\text{\hspace{1em}}k=1,\dots ,4$$

## References

[1] Knupp, Patrick M. "Matrix Norms & the Condition Number: A General Framework to Improve Mesh Quality via Node-Movement." In Proceedings, 8th International Meshing Roundtable. Lake Tahoe, CA, October 1999: 13-22.

[2] Shewchuk, Jonathan R. "What Is a Good Linear Element? Interpolation, Conditioning, and Quality Measures." In Proceedings, 11th International Meshing Roundtable. Ithaca, NY, September 2002: 115-126.

## Version History

**Introduced in R2018a**