cell_hex8.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_CELL_HEX8_H
21 #define LIBMESH_CELL_HEX8_H
22 
23 // Local includes
24 #include "libmesh/cell_hex.h"
25 
26 // C++ includes
27 #include <cstddef>
28 
29 namespace libMesh
30 {
31 
32 
33 
34 
55 // ------------------------------------------------------------
56 // Hex class definition
57 class Hex8 : public Hex
58 {
59 public:
60 
64  explicit
65  Hex8 (Elem* p=NULL);
66 
70  ElemType type () const { return HEX8; }
71 
75  unsigned int n_nodes() const { return 8; }
76 
80  unsigned int n_sub_elem() const { return 1; }
81 
85  virtual bool is_vertex(const unsigned int i) const;
86 
90  virtual bool is_edge(const unsigned int i) const;
91 
95  virtual bool is_face(const unsigned int i) const;
96 
97  /*
98  * @returns true iff the specified (local) node number is on the
99  * specified side
100  */
101  virtual bool is_node_on_side(const unsigned int n,
102  const unsigned int s) const;
103 
104  /*
105  * @returns true iff the specified (local) node number is on the
106  * specified edge
107  */
108  virtual bool is_node_on_edge(const unsigned int n,
109  const unsigned int e) const;
110 
111  /*
112  * @returns true iff the element map is definitely affine within
113  * numerical tolerances
114  */
115  virtual bool has_affine_map () const;
116 
120  Order default_order() const { return FIRST; }
121 
126  AutoPtr<Elem> build_side (const unsigned int i,
127  bool proxy) const;
128 
133  AutoPtr<Elem> build_edge (const unsigned int i) const;
134 
135  virtual void connectivity(const unsigned int sc,
136  const IOPackage iop,
137  std::vector<dof_id_type>& conn) const;
138 
143  static const unsigned int side_nodes_map[6][4];
144 
149  static const unsigned int edge_nodes_map[12][2];
150 
155  virtual Real volume () const;
156 
157 
158 protected:
159 
164 
165 
166 
167 #ifdef LIBMESH_ENABLE_AMR
168 
172  float embedding_matrix (const unsigned int i,
173  const unsigned int j,
174  const unsigned int k) const
175  { return _embedding_matrix[i][j][k]; }
176 
181  static const float _embedding_matrix[8][8][8];
182 
183 #endif
184 
185 };
186 
187 
188 
189 // ------------------------------------------------------------
190 // Hex8 class member functions
191 inline
193  Hex(Hex8::n_nodes(), p, _nodelinks_data)
194 {
195 }
196 
197 
198 } // namespace libMesh
199 
200 #endif // LIBMESH_CELL_HEX8_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:04 UTC

Hosted By:
SourceForge.net Logo