MOAB: Mesh Oriented datABase  (version 5.4.1)
HexLagrangeShape.hpp
Go to the documentation of this file.
00001 /* *****************************************************************
00002     MESQUITE -- The Mesh Quality Improvement Toolkit
00003 
00004     Copyright 2006 Lawrence Livermore National Laboratory.  Under
00005     the terms of Contract B545069 with the University of Wisconsin --
00006     Madison, Lawrence Livermore National Laboratory retains certain
00007     rights in this software.
00008 
00009     This library is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU Lesser General Public
00011     License as published by the Free Software Foundation; either
00012     version 2.1 of the License, or (at your option) any later version.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Lesser General Public License for more details.
00018 
00019     You should have received a copy of the GNU Lesser General Public License
00020     (lgpl.txt) along with this library; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00023     (2006) [email protected]
00024 
00025   ***************************************************************** */
00026 
00027 #ifndef MSQ_HEX_LAGRANGE_SHAPE_HPP
00028 #define MSQ_HEX_LAGRANGE_SHAPE_HPP
00029 
00030 /** \file HexLagrangeShape.hpp
00031  *  \brief Lagrange mapping funtion for a 27-node hex.
00032  *  \author Nicholas Voshell
00033  */
00034 
00035 #include "MappingFunction.hpp"
00036 
00037 namespace MBMesquite
00038 {
00039 
00040 /**\brief Lagrange shape function for 27-node hexahedral elements
00041  *
00042  * This class implements the MappingFunction interface, providing
00043  * a Lagrange shape function for hexahedral elements.
00044  *
00045  * \f$\vec{x}(\xi,\eta) = \sum_{i=0}^{n-1} N_i(r, s, t) \vec{x_i}\f$
00046  *
00047  * \f$N_a = l^2_b(r) l^2_c(s) l^2_d(t)\f$
00048  *
00049  * \f$l^2_1(\xi) = (\xi - 1) (2 \xi - 1)\f$
00050  *
00051  * \f$l^2_2(\xi) = 4 \xi (1 - \xi)\f$
00052  *
00053  * \f$l^2_3(\xi) = \xi (2 \xi - 1)\f$
00054  *
00055  * Mesquite / iTAPS / MBCN order
00056  *
00057  * \f$\begin{array}{cccc}
00058  *    a & b & c & d \\ \hline
00059  *    0 & 1 & 1 & 1 \\
00060  *    1 & 3 & 1 & 1 \\
00061  *    2 & 3 & 3 & 1 \\
00062  *    3 & 1 & 3 & 1 \\
00063  *    4 & 1 & 1 & 3 \\
00064  *    5 & 3 & 1 & 3 \\
00065  *    6 & 3 & 3 & 3 \\
00066  *    7 & 1 & 3 & 3 \\
00067  *    8 & 2 & 1 & 1 \\
00068  *    9 & 3 & 2 & 1 \\
00069  *    10 & 2 & 3 & 1 \\
00070  *    11 & 1 & 2 & 1 \\
00071  *    12 & 1 & 1 & 2 \\
00072  *    13 & 3 & 1 & 2 \\
00073  *    14 & 3 & 3 & 2 \\
00074  *    15 & 1 & 3 & 2 \\
00075  *    16 & 2 & 1 & 3 \\
00076  *    17 & 3 & 2 & 3 \\
00077  *    18 & 2 & 3 & 3 \\
00078  *    19 & 1 & 2 & 3 \\
00079  *    20 & 2 & 1 & 2 \\
00080  *    21 & 3 & 2 & 2 \\
00081  *    22 & 2 & 3 & 2 \\
00082  *    23 & 1 & 2 & 2 \\
00083  *    24 & 2 & 2 & 1 \\
00084  *    25 & 2 & 2 & 3 \\
00085  *    26 & 2 & 2 & 2 \end{array}\f$
00086  *
00087  *  MBCN ORDER
00088  *
00089  *     7 - 18- 6
00090  *    /       /
00091  *   19  25  17
00092  *  /       /
00093  * 4 - 16- 6
00094  *
00095  *     15- 22- 14
00096  *    /       /
00097  *   23  26  21
00098  *  /       /
00099  * 12- 20- 13
00100  *
00101  *     3 - 10- 2
00102  *    /       /
00103  *   11  24  9    t s
00104  *  /       /     |/
00105  * 0 - 8 - 1      +-r
00106  */
00107 class MESQUITE_EXPORT HexLagrangeShape : public MappingFunction3D
00108 {
00109   public:
00110     virtual EntityTopology element_topology() const;
00111 
00112     virtual int num_nodes() const;
00113 
00114     virtual void coefficients( Sample location,
00115                                NodeSet nodeset,
00116                                double* coeff_out,
00117                                size_t* indices_out,
00118                                size_t& num_coeff_out,
00119                                MsqError& err ) const;
00120 
00121     virtual void derivatives( Sample location,
00122                               NodeSet nodeset,
00123                               size_t* vertex_indices_out,
00124                               MsqVector< 3 >* d_coeff_d_xi_out,
00125                               size_t& num_vtx,
00126                               MsqError& err ) const;
00127 
00128     virtual void ideal( Sample location, MsqMatrix< 3, 3 >& jacobian_out, MsqError& err ) const;
00129 };
00130 
00131 }  // namespace MBMesquite
00132 
00133 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines