meshquality.f

In this routine the quality of each element is determined. To this end the ratio of the largest edge $ L_i$ to the radius of the inscribed sphere is used. One can prove that the radius of the inscribed sphere of a linear tetrahedral is three times the volume $ V_i$ divided by the sum of the area of its faces $ (\sum S)_i$ [25]. Therefore, the quality $ Q_i$ for element $ i$ can be written as:

$\displaystyle Q_i=\frac{\sqrt{6} }{12 } \frac{L_i (\sum S)_i }{3 \max(V_i, 10^{-30})}.$ (715)

The factor $ \frac{\sqrt{6} }{12 }$ is such that the quality of an equilateral tetrahedron is 1. For all other tetrahedra it exceeds 1. The larger the value, the worse the element. The cut-off of $ 10^{-30}$ was introduced to avoid dividing by zero or getting a negative value.