cell_hex27.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_HEX27_H
21 #define LIBMESH_CELL_HEX27_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 
69 // ------------------------------------------------------------
70 // Hex27 class definition
71 class Hex27 : public Hex
72 {
73 public:
74 
78  explicit
79  Hex27 (Elem* p=NULL);
80 
84  ElemType type () const { return HEX27; }
85 
89  unsigned int n_nodes() const { return 27; }
90 
94  unsigned int n_sub_elem() const { return 8; }
95 
99  virtual bool is_vertex(const unsigned int i) const;
100 
104  virtual bool is_edge(const unsigned int i) const;
105 
109  virtual bool is_face(const unsigned int i) const;
110 
111  /*
112  * @returns true iff the specified (local) node number is on the
113  * specified side
114  */
115  virtual bool is_node_on_side(const unsigned int n,
116  const unsigned int s) const;
117 
118  /*
119  * @returns true iff the specified (local) node number is on the
120  * specified edge
121  */
122  virtual bool is_node_on_edge(const unsigned int n,
123  const unsigned int e) const;
124 
125  /*
126  * @returns true iff the element map is definitely affine within
127  * numerical tolerances
128  */
129  virtual bool has_affine_map () const;
130 
134  Order default_order() const { return SECOND; }
135 
145  dof_id_type key (const unsigned int s) const;
146 
151  AutoPtr<Elem> build_side (const unsigned int i,
152  bool proxy) const;
153 
158  AutoPtr<Elem> build_edge (const unsigned int i) const;
159 
160  virtual void connectivity(const unsigned int sc,
161  const IOPackage iop,
162  std::vector<dof_id_type>& conn) const;
163 
168  unsigned int n_second_order_adjacent_vertices (const unsigned int) const;
169 
175  unsigned short int second_order_adjacent_vertex (const unsigned int n,
176  const unsigned int v) const;
177 
187  virtual std::pair<unsigned short int, unsigned short int>
188  second_order_child_vertex (const unsigned int n) const;
189 
194  static const unsigned int side_nodes_map[6][9];
195 
200  static const unsigned int edge_nodes_map[12][3];
201 
202 
203 protected:
204 
205 
210 
211 
212 #ifdef LIBMESH_ENABLE_AMR
213 
217  float embedding_matrix (const unsigned int i,
218  const unsigned int j,
219  const unsigned int k) const
220  { return _embedding_matrix[i][j][k]; }
221 
226  static const float _embedding_matrix[8][27][27];
227 
228 #endif
229 
230 
231 private:
232 
244  static const unsigned short int _remaining_second_order_adjacent_vertices[6][4];
245 
246 };
247 
248 
249 
250 // ------------------------------------------------------------
251 // Hex27 class member functions
252 inline
254  Hex(Hex27::n_nodes(), p, _nodelinks_data)
255 {
256 }
257 
258 
259 } // namespace libMesh
260 
261 #endif // LIBMESH_CELL_HEX27_H

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

Hosted By:
SourceForge.net Logo