\chapter{Tetrahedral Quality Metrics}

All the metrics in this section are defined on a tetrahedral element with vertices
shown in Figure~\ref{f:tet}. Furthermore, we define the following edge vectors for
convenience
\begin{equation*}
\begin{array}{lcl}
\vec L_0 &=& \vec P_1 - \vec P_0\\
\vec L_1 &=& \vec P_2 - \vec P_1\\
\vec L_2 &=& \vec P_0 - \vec P_2
\end{array}\rule{10em}{0pt}
\begin{array}{lcl}
\vec L_3 &=& \vec P_3 - \vec P_0\\
\vec L_4 &=& \vec P_3 - \vec P_1\\
\vec L_5 &=& \vec P_3 - \vec P_2
\end{array}.
\end{equation*}

\begin{figure}[htb]
  \begin{center}
    \includegraphics[height=2.0in]{tet}
    \caption{Vertices of a tetrahedron.%
                                                                  \label{f:tet}}
  \end{center}
\end{figure}

The tetrahedron edge lengths are denoted as follows:
\[
L_0 = \normvec{L_0}\quad
L_1 = \normvec{L_1}\quad
L_2 = \normvec{L_2}\quad
L_3 = \normvec{L_3}\quad
L_4 = \normvec{L_4}\quad
L_5 = \normvec{L_5}
\]
and the largest and smallest edge lengths are, respectively,
\[
L_{\min} = \min\left(L_0, L_1, L_2, L_3, L_4, L_5\right)
  \rule{2em}{0pt}
L_{\max} = \max\left(L_0, L_1, L_2, L_3, L_4, L_5\right)
\]

The volume can then be defined in terms of the edge vectors as
\begin{equation*}
V = \frac{\left(\vec L_2\times\vec L_0\right)\cdot\vec L_3 }{6}.
\end{equation*}

In addition, we will respectively denote $R$ and $r$ the circumradius
and the inradius of the tetrahedron, \emph{i.e.}, respectively, the radii
of the circumscribed and inscribed spheres of this tetrahedron.
Note that the inradius is
\[
 r = \frac { 3V } { A }
\]
where $A$ is the  surface area of the tetrahedron:
\[
A = \frac{1}{2} \left(
      \normvec{L_2 \times \vec L_0} + 
      \normvec{L_3 \times \vec L_0} + 
      \normvec{L_4 \times \vec L_1} + 
      \normvec{L_3 \times \vec L_2}  \right),
\]
and that the the circumradius is
\[
 R = \frac {\Big\lVert
   \normvec{L_3}^2 \left( \vec L_2 \times \vec L_0 \right) + 
   \normvec{L_2}^2 \left( \vec L_3 \times \vec L_0 \right) + 
   \normvec{L_0}^2 \left( \vec L_3 \times \vec L_2 \right)
   \Big\rVert}{12 V }. 
\]

Sometimes, we will to refer to the edge vectors indexed by their endpoints:
\begin{equation*}
\begin{array}{lcl}
\vec L_{01} &=& \vec L_0\\
\vec L_{12} &=& \vec L_1\\
\vec L_{20} &=& \vec L_2
\end{array}\rule{10em}{0pt}
\begin{array}{lcl}
\vec L_{03} &=& \vec L_3\\
\vec L_{13} &=& \vec L_4\\
\vec L_{23} &=& \vec L_5
\end{array}
\end{equation*}

% -------------------Metric Table-------------------
\newcommand{\tetmetrictable}[8]{%
  \begin{center}
  \begin{tabular}{ll}
    \multicolumn{2}{r}{\textbf{\sffamily\Large tetrahedral #1}}\\\hline
    Dimension:                            & #2\\ 
    Acceptable Range:                     & #3\\ 
    Normal Range:                         & #4\\ 
    Full Range:                           & #5\\ 
    $q$ for unit equilateral tetrahedron: & #6\\
    Reference:                            & #7\\
    \verd\ function:       & \texttt{#8}\\ \hline
  \end{tabular} 
  \end{center}
}
\clearpage
\newpage \input{TetEdgeRatio}
\newpage \input{TetAspectBeta}
\newpage \input{TetAspectDelta}
\newpage \input{TetAspectFrobenius}
\newpage \input{TetAspectGamma}
\newpage \input{TetAspectRatio}
\newpage \input{TetCollapseRatio}
\newpage \input{TetCondition}
\newpage \input{TetDistortion}
\newpage \input{TetJacobian}
\newpage \input{TetMinimumAngle}
\newpage \input{TetRadiusRatio}
\newpage \input{TetRelativeSizeSquared}
\newpage \input{TetScaledJacobian}
\newpage \input{TetShape}
\newpage \input{TetShapeAndSize}
\newpage \input{TetVolume}
