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 : : #ifndef MSQ_QUAD_LAGRANGE_SHAPE_HPP
28 : : #define MSQ_QUAD_LAGRANGE_SHAPE_HPP
29 : :
30 : : /** \file QuadLagrangeShape.hpp
31 : : * \brief Lagrange mapping funtion for a 9-node quad.
32 : : * \author Jason Kraftcheck
33 : : */
34 : :
35 : : #include "MappingFunction.hpp"
36 : :
37 : : namespace MBMesquite
38 : : {
39 : :
40 : : /**\brief Lagrange shape function for 9-node quadrilateral elements
41 : : *
42 : : * This class implements the MappingFunction interface, providing
43 : : * a Lagrange shape function for quadrilateral elements.
44 : : *
45 : : * \f$\vec{x}(\xi,\eta) = \sum_{i=0}^{n-1} N_i(\xi,\eta) \vec{x_i}\f$
46 : : *
47 : : * \f$N_a = l^2_b(\xi) l^2_c(\eta)\f$
48 : : *
49 : : * \f$l^2_1(\xi) = (\xi - 1) (2 \xi - 1)\f$
50 : : *
51 : : * \f$l^2_2(\xi) = 4 \xi (1 - \xi)\f$
52 : : *
53 : : * \f$l^2_3(\xi) = \xi (2 \xi - 1)\f$
54 : : *
55 : : * \f$\begin{array}{ccc}
56 : : * a & b & c \\ \hline
57 : : * 0 & 1 & 1 \\
58 : : * 1 & 3 & 1 \\
59 : : * 2 & 3 & 3 \\
60 : : * 3 & 1 & 3 \\
61 : : * 4 & 2 & 1 \\
62 : : * 5 & 3 & 2 \\
63 : : * 6 & 2 & 3 \\
64 : : * 7 & 1 & 2 \\
65 : : * 8 & 2 & 2 \end{array}\f$
66 : : *
67 : : */
68 [ - + ]: 394 : class MESQUITE_EXPORT QuadLagrangeShape : public MappingFunction2D
69 : : {
70 : : public:
71 : : virtual EntityTopology element_topology() const;
72 : :
73 : : virtual int num_nodes() const;
74 : :
75 : : virtual void coefficients( Sample location, NodeSet nodeset, double* coeff_out, size_t* indices_out,
76 : : size_t& num_coeff_out, MsqError& err ) const;
77 : :
78 : : virtual void derivatives( Sample location, NodeSet nodeset, size_t* vertex_indices_out,
79 : : MsqVector< 2 >* d_coeff_d_xi_out, size_t& num_vtx, MsqError& err ) const;
80 : :
81 : : virtual void ideal( Sample location, MsqMatrix< 3, 2 >& jacobian_out, MsqError& err ) const;
82 : : };
83 : :
84 : : } // namespace MBMesquite
85 : :
86 : : #endif
|