MOAB: Mesh Oriented datABase  (version 5.4.1)
LinearPyramid.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 /** \file LinearPyramid.hpp
00028  *  \brief mapping function for linear prism
00029  *  \author Jason Kraftcheck
00030  */
00031 
00032 #ifndef MSQ_LINEAR_PYRAMID_HPP
00033 #define MSQ_LINEAR_PYRAMID_HPP
00034 
00035 #include "Mesquite.hpp"
00036 #include "MappingFunction.hpp"
00037 
00038 namespace MBMesquite
00039 {
00040 
00041 /**\brief Linear mapping function for a pyramid element
00042  *
00043  * \f$\vec{x}(\vec{\xi})=\sum_{i=0}^5 N_i(\vec{\xi})\vec{x_i}\f$
00044  * - \f$ N_0(\vec{\xi})=(1-\xi)(1-\eta)(1-\zeta) \f$
00045  * - \f$ N_1(\vec{\xi})=   \xi (1-\eta)(1-\zeta) \f$
00046  * - \f$ N_2(\vec{\xi})=   \xi    \eta (1-\zeta) \f$
00047  * - \f$ N_3(\vec{\xi})=(1-\xi)   \eta (1-\zeta) \f$
00048  * - \f$ N_4(\vec{\xi})=\zeta \f$
00049  *
00050  * Where the mid-edge coordinates are:
00051  * - \f$ \vec{\xi}_{e0}=( \frac{1}{2}, 0,           0) \f$
00052  * - \f$ \vec{\xi}_{e1}=( 1,           \frac{1}{2}, 0) \f$
00053  * - \f$ \vec{\xi}_{e2}=( \frac{1}{2}, 1,           0) \f$
00054  * - \f$ \vec{\xi}_{e3}=( 0,           \frac{1}{2}, 0) \f$
00055  * - \f$ \vec{\xi}_{e4}=( 0,           0,           \frac{1}{2}) \f$
00056  * - \f$ \vec{\xi}_{e5}=( 1,           0,           \frac{1}{2}) \f$
00057  * - \f$ \vec{\xi}_{e6}=( 1,           1,           \frac{1}{2}) \f$
00058  * - \f$ \vec{\xi}_{e7}=( 0,           1,           \frac{1}{2}) \f$
00059  *
00060  * and mid-face the coordinates are:
00061  * - \f$ \vec{\xi}_{f0}=( \frac{1}{2}, 0,           \frac{1}{2}) \f$
00062  * - \f$ \vec{\xi}_{f1}=( 1,           \frac{1}{2}, \frac{1}{2}) \f$
00063  * - \f$ \vec{\xi}_{f2}=( \frac{1}{2}, 1,           \frac{1}{2}) \f$
00064  * - \f$ \vec{\xi}_{f3}=( 0,           \frac{1}{2}, \frac{1}{2}) \f$
00065  * - \f$ \vec{\xi}_{f4}=( \frac{1}{2}, \frac{1}{2}, 0)           \f$
00066  *
00067  * and the mid-element coorindates are
00068  * - \f$ \vec{\xi}_m=( \frac{1}{2}, \frac{1}{2}, \frac{1}{2}) \f$
00069  */
00070 class MESQUITE_EXPORT LinearPyramid : public MappingFunction3D
00071 {
00072   public:
00073     virtual EntityTopology element_topology() const;
00074 
00075     virtual int num_nodes() const;
00076 
00077     virtual NodeSet sample_points( NodeSet higher_order_nodes ) const;
00078 
00079     virtual void coefficients( Sample location,
00080                                NodeSet nodeset,
00081                                double* coeff_out,
00082                                size_t* indices_out,
00083                                size_t& num_coeff_out,
00084                                MsqError& err ) const;
00085 
00086     virtual void derivatives( Sample location,
00087                               NodeSet nodeset,
00088                               size_t* vertex_indices_out,
00089                               MsqVector< 3 >* d_coeff_d_xi_out,
00090                               size_t& num_vtx,
00091                               MsqError& err ) const;
00092 
00093     virtual void ideal( Sample location, MsqMatrix< 3, 3 >& J, MsqError& err ) const;
00094 };
00095 
00096 }  // namespace MBMesquite
00097 
00098 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines