Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2006 Lawrence Livermore National Laboratory. Under
5 : : the terms of Contract B545069 with the University of Wisconsin --
6 : : Madison, Lawrence Livermore National Laboratory retains certain
7 : : rights in this software.
8 : :
9 : : This library is free software; you can redistribute it and/or
10 : : modify it under the terms of the GNU Lesser General Public
11 : : License as published by the Free Software Foundation; either
12 : : version 2.1 of the License, or (at your option) any later version.
13 : :
14 : : This library is distributed in the hope that it will be useful,
15 : : but WITHOUT ANY WARRANTY; without even the implied warranty of
16 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 : : Lesser General Public License for more details.
18 : :
19 : : You should have received a copy of the GNU Lesser General Public License
20 : : (lgpl.txt) along with this library; if not, write to the Free Software
21 : : Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 : :
23 : : (2006) [email protected]
24 : :
25 : : ***************************************************************** */
26 : :
27 : : /** \file LinearPyramid.hpp
28 : : * \brief mapping function for linear prism
29 : : * \author Jason Kraftcheck
30 : : */
31 : :
32 : : #ifndef MSQ_LINEAR_PYRAMID_HPP
33 : : #define MSQ_LINEAR_PYRAMID_HPP
34 : :
35 : : #include "Mesquite.hpp"
36 : : #include "MappingFunction.hpp"
37 : :
38 : : namespace MBMesquite
39 : : {
40 : :
41 : : /**\brief Linear mapping function for a pyramid element
42 : : *
43 : : * \f$\vec{x}(\vec{\xi})=\sum_{i=0}^5 N_i(\vec{\xi})\vec{x_i}\f$
44 : : * - \f$ N_0(\vec{\xi})=(1-\xi)(1-\eta)(1-\zeta) \f$
45 : : * - \f$ N_1(\vec{\xi})= \xi (1-\eta)(1-\zeta) \f$
46 : : * - \f$ N_2(\vec{\xi})= \xi \eta (1-\zeta) \f$
47 : : * - \f$ N_3(\vec{\xi})=(1-\xi) \eta (1-\zeta) \f$
48 : : * - \f$ N_4(\vec{\xi})=\zeta \f$
49 : : *
50 : : * Where the mid-edge coordinates are:
51 : : * - \f$ \vec{\xi}_{e0}=( \frac{1}{2}, 0, 0) \f$
52 : : * - \f$ \vec{\xi}_{e1}=( 1, \frac{1}{2}, 0) \f$
53 : : * - \f$ \vec{\xi}_{e2}=( \frac{1}{2}, 1, 0) \f$
54 : : * - \f$ \vec{\xi}_{e3}=( 0, \frac{1}{2}, 0) \f$
55 : : * - \f$ \vec{\xi}_{e4}=( 0, 0, \frac{1}{2}) \f$
56 : : * - \f$ \vec{\xi}_{e5}=( 1, 0, \frac{1}{2}) \f$
57 : : * - \f$ \vec{\xi}_{e6}=( 1, 1, \frac{1}{2}) \f$
58 : : * - \f$ \vec{\xi}_{e7}=( 0, 1, \frac{1}{2}) \f$
59 : : *
60 : : * and mid-face the coordinates are:
61 : : * - \f$ \vec{\xi}_{f0}=( \frac{1}{2}, 0, \frac{1}{2}) \f$
62 : : * - \f$ \vec{\xi}_{f1}=( 1, \frac{1}{2}, \frac{1}{2}) \f$
63 : : * - \f$ \vec{\xi}_{f2}=( \frac{1}{2}, 1, \frac{1}{2}) \f$
64 : : * - \f$ \vec{\xi}_{f3}=( 0, \frac{1}{2}, \frac{1}{2}) \f$
65 : : * - \f$ \vec{\xi}_{f4}=( \frac{1}{2}, \frac{1}{2}, 0) \f$
66 : : *
67 : : * and the mid-element coorindates are
68 : : * - \f$ \vec{\xi}_m=( \frac{1}{2}, \frac{1}{2}, \frac{1}{2}) \f$
69 : : */
70 [ - + ]: 392 : class MESQUITE_EXPORT LinearPyramid : public MappingFunction3D
71 : : {
72 : : public:
73 : : virtual EntityTopology element_topology() const;
74 : :
75 : : virtual int num_nodes() const;
76 : :
77 : : virtual NodeSet sample_points( NodeSet higher_order_nodes ) const;
78 : :
79 : : virtual void coefficients( Sample location, NodeSet nodeset, double* coeff_out, size_t* indices_out,
80 : : size_t& num_coeff_out, MsqError& err ) const;
81 : :
82 : : virtual void derivatives( Sample location, NodeSet nodeset, size_t* vertex_indices_out,
83 : : MsqVector< 3 >* d_coeff_d_xi_out, size_t& num_vtx, MsqError& err ) const;
84 : :
85 : : virtual void ideal( Sample location, MsqMatrix< 3, 3 >& J, MsqError& err ) const;
86 : : };
87 : :
88 : : } // namespace MBMesquite
89 : :
90 : : #endif
|