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_LINEAR_HEXAHEDRON_HPP
28 : : #define MSQ_LINEAR_HEXAHEDRON_HPP
29 : :
30 : : #include "Mesquite.hpp"
31 : : #include "MappingFunction.hpp"
32 : :
33 : : namespace MBMesquite
34 : : {
35 : :
36 : : /**\brief Linear mapping function for a hexahedral element
37 : : *
38 : : * This class implements the MappingFunction interface, providing
39 : : * a Linear shape function for hexahedral elements.
40 : : *
41 : : * \f$\vec{x}(\xi,\eta,\zeta) = \sum_{i=0}^{7} N_i(\xi,\eta,\zeta) \vec{x_i}\f$
42 : : *
43 : : * \f$N_0(\xi,\eta,\zeta) = (1-\xi)(1-\eta)(1-\zeta)\f$
44 : : *
45 : : * \f$N_1(\xi,\eta,\zeta) = \xi (1-\eta)(1-\zeta)\f$
46 : : *
47 : : * \f$N_2(\xi,\eta,\zeta) = \xi \eta (1-\zeta)\f$
48 : : *
49 : : * \f$N_3(\xi,\eta,\zeta) = (1-\xi) \eta (1-\zeta)\f$
50 : : *
51 : : * \f$N_4(\xi,\eta,\zeta) = (1-\xi)(1-\eta) \zeta \f$
52 : : *
53 : : * \f$N_5(\xi,\eta,\zeta) = \xi (1-\eta) \zeta \f$
54 : : *
55 : : * \f$N_6(\xi,\eta,\zeta) = \xi \eta \zeta \f$
56 : : *
57 : : * \f$N_7(\xi,\eta,\zeta) = (1-\xi) \eta \zeta \f$
58 : : *
59 : : */
60 [ - + ]: 392 : class MESQUITE_EXPORT LinearHexahedron : public MappingFunction3D
61 : : {
62 : : public:
63 : : virtual EntityTopology element_topology() const;
64 : :
65 : : virtual int num_nodes() const;
66 : :
67 : : virtual void coefficients( Sample location, NodeSet nodeset, double* coeff_out, size_t* indices_out,
68 : : size_t& num_coeff_out, MsqError& err ) const;
69 : :
70 : : virtual void derivatives( Sample location, NodeSet nodeset, size_t* vertex_indices_out,
71 : : MsqVector< 3 >* d_coeff_d_xi_out, size_t& num_vtx, MsqError& err ) const;
72 : :
73 : : virtual void ideal( Sample location, MsqMatrix< 3, 3 >& jacobian_out, MsqError& err ) const;
74 : : };
75 : :
76 : : } // namespace MBMesquite
77 : :
78 : : #endif
|