%---------------------------Distortion---------------------------
\section{Distortion}

The distortion is a measure of how well-behaved the mapping from
parameter space to world coordinates is.
The parameter space is defined using a ``master'' tetrahedron
with vertices
\[
\begin{array}{lcrcrcrc}
 \vec P_0 &= (& -1&,& -\frac{ \sqrt{3}}{3}&,& -\frac{2\sqrt{6}}{9}&)\\
 \vec P_1 &= (&  1&,& -\frac{ \sqrt{3}}{3}&,& -\frac{2\sqrt{6}}{9}&)\\
 \vec P_2 &= (&  0&,&  \frac{2\sqrt{3}}{3}&,& -\frac{2\sqrt{6}}{9}&)\\
 \vec P_3 &= (&  0&,&                    0&,&  \frac{4\sqrt{6}}{9}&)
\end{array}
\]
and volume $V_m$.
The behavior of the map is measured by sampling the determinant of the
Jacobian at Gauss points $G = \{g_k\}$.
The minimum of these is then used to scale the ratio of the
``master'' tetrahedron to the tetrahedron of interest:
\[
q = \frac{\min_k\{\det(J_{g_k})\} V_m}{V}
\]

Note that if $V < DBL\_MIN$, we set $q = DBL\_MAX$.
This metric is currently unsupported.

\tetmetrictable{distortion}%
{$1$}%                          Dimension
{$[0.5,1]$}%                    Acceptable range
{$[0,1]$}%                      Normal range
{$[-DBL\_MAX,DBL\_MAX]$}%       Full range
{$0$}%                          Equilateral tet
{Adapted from \cite{ideas:xx}}% Citation
{v\_tet\_distortion}%                            Verdict function name

