% $Id$

\subsubsection{ESMF\_MESHELEMTYPE}
\label{const:meshelemtype}

 {\sf DESCRIPTION:\\}
 An ESMF Mesh can be constructed from a combination of different elements. The type of elements that can
be used in a Mesh depends on the Mesh's parameteric dimension, which is set during Mesh creation. The
following are the valid Mesh element types for each valid Mesh parametric dimension (2D or 3D) .

\medskip

\begin{verbatim}

                     3                          4 ---------- 3
                    / \                         |            |  
                   /   \                        |            |
                  /     \                       |            |
                 /       \                      |            |
                /         \                     |            |
               1 --------- 2                    1 ---------- 2

           ESMF_MESHELEMTYPE_TRI            ESMF_MESHELEMTYPE_QUAD

     2D element types (numbers are the order for elementConn during Mesh create)

\end{verbatim}

For a Mesh with parametric dimension of 2 ESMF supports two native element types (illustrated above),
but also supports polygons with more sides. Internally these polygons are represented as a set of 
triangles, but to the user should behave like other elements. 
To specify the non-native polygons in the {\tt elementType} argument use the number of corners 
of the polygon (e.g. for a pentagon use 5). The connectivity for a polygon should be specified in counterclockwise order.
The following table summarizes this information:

\smallskip

\begin{tabular}{|l|c|l|}
\hline
Element Type &  Number of Nodes  & Description \\
\hline
ESMF\_MESHELEMTYPE\_TRI  & 3 & A triangle \\
ESMF\_MESHELEMTYPE\_QUAD & 4 & A quadrilateral (e.g. a rectangle) \\
 N & N & An N-gon  (e.g. if N=5 a pentagon) \\
\hline
\end{tabular}

\medskip
\medskip

\begin{verbatim}
                                            
                 3                               8---------------7
                /|\                             /|              /|
               / | \                           / |             / |
              /  |  \                         /  |            /  |
             /   |   \                       /   |           /   |
            /    |    \                     5---------------6    |
           4-----|-----2                    |    |          |    |
            \    |    /                     |    4----------|----3
             \   |   /                      |   /           |   /
              \  |  /                       |  /            |  /
               \ | /                        | /             | /
                \|/                         |/              |/
                 1                          1---------------2

       ESMF_MESHELEMTYPE_TETRA             ESMF_MESHELEMTYPE_HEX  

  3D element types (numbers are the order for elementConn during Mesh create)

\end{verbatim}

For a Mesh with parametric dimension of 3 the valid element types (illustrated above) are:

\smallskip

\begin{tabular}{|l|c|l|}
\hline
Element Type & Number of Nodes & Description \\
\hline                                         
ESMF\_MESHELEMTYPE\_TETRA & 4 & A tetrahedron (NOT VALID IN BILINEAR OR PATCH REGRID)\\
ESMF\_MESHELEMTYPE\_HEX  & 8 & A hexahedron (e.g. a cube) \\
\hline
\end{tabular}

