Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2006 Sandia National Laboratories. Developed at the
5 : : University of Wisconsin--Madison under SNL contract number
6 : : 624796. The U.S. Government and the University of Wisconsin
7 : : retain certain rights to 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 TriLagrangeShape.hpp
28 : : * \brief
29 : : * \author Jason Kraftcheck
30 : : */
31 : :
32 : : #ifndef MSQ_TRI_LAGRANGE_SHAPE_HPP
33 : : #define MSQ_TRI_LAGRANGE_SHAPE_HPP
34 : :
35 : : #include "Mesquite.hpp"
36 : : #include "MappingFunction.hpp"
37 : :
38 : : namespace MBMesquite
39 : : {
40 : :
41 : : /**\brief Lagrange shape function for triangle elements
42 : : *
43 : : * This class implements the MappingFunction interface, providing
44 : : * a Lagrange shape function for 6-node triangle.
45 : : *
46 : : * \f$\vec{x}(r,s) = sum_{i=0}^{n-1} N_i(r,s) \vec{x_i}\f$
47 : : *
48 : : * \f$N_1 = t(2t - 1)\f$
49 : : *
50 : : * \f$N_2 = r(2r - 1)\f$
51 : : *
52 : : * \f$N_3 = s(2s - 1)\f$
53 : : *
54 : : * \f$N_4 = 4rt\f$
55 : : *
56 : : * \f$N_5 = 4rs\f$
57 : : *
58 : : * \f$N_6 = 4st\f$
59 : : *
60 : : * \f$t = 1 - r - s\f$
61 : : */
62 [ - + ]: 394 : class MESQUITE_EXPORT TriLagrangeShape : public MappingFunction2D
63 : : {
64 : : public:
65 : : virtual EntityTopology element_topology() const;
66 : :
67 : : virtual int num_nodes() const;
68 : :
69 : : virtual NodeSet sample_points( NodeSet higher_order_nodes ) const;
70 : :
71 : : virtual void coefficients( Sample location, NodeSet nodeset, double* coeff_out, size_t* indices_out,
72 : : size_t& num_coeff_out, MsqError& err ) const;
73 : :
74 : : virtual void derivatives( Sample location, NodeSet nodeset, size_t* vertex_indices_out,
75 : : MsqVector< 2 >* d_coeff_d_xi_out, size_t& num_vtx, MsqError& err ) const;
76 : :
77 : : virtual void ideal( Sample location, MsqMatrix< 3, 2 >& jacobian_out, MsqError& err ) const;
78 : : };
79 : :
80 : : } // namespace MBMesquite
81 : :
82 : : #endif
|