cell_inf_hex18.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_INF_HEX18_H
21 #define LIBMESH_CELL_INF_HEX18_H
22 
23 #include "libmesh/libmesh_config.h"
24 
25 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
26 
27 // Local includes
28 #include "libmesh/cell_inf_hex.h"
29 
30 // C++ includes
31 #include <cstddef>
32 
33 namespace libMesh
34 {
35 
36 
37 
38 
73 // ------------------------------------------------------------
74 // InfHex18 class definition
75 class InfHex18 : public InfHex
76 {
77 public:
78 
82  explicit
83  InfHex18 (Elem* p=NULL);
84 
88  unsigned int n_nodes() const { return 18; }
89 
93  ElemType type () const { return INFHEX18; }
94 
98  unsigned int n_sub_elem() const { return 4; }
99 
103  Order default_order() const { return SECOND; }
104 
108  virtual bool is_vertex(const unsigned int i) const;
109 
113  virtual bool is_edge(const unsigned int i) const;
114 
118  virtual bool is_face(const unsigned int i) const;
119 
120  /*
121  * @returns true iff the specified (local) node number is on the
122  * specified side
123  */
124  virtual bool is_node_on_side(const unsigned int n,
125  const unsigned int s) const;
126 
127  /*
128  * @returns true iff the specified (local) node number is on the
129  * specified edge
130  */
131  virtual bool is_node_on_edge(const unsigned int n,
132  const unsigned int e) const;
133 
139  AutoPtr<Elem> build_side (const unsigned int i,
140  bool proxy) const;
141 
147  AutoPtr<Elem> build_edge (const unsigned int i) const;
148 
158  dof_id_type key (const unsigned int s) const;
159 
160  virtual void connectivity(const unsigned int sc,
161  const IOPackage iop,
162  std::vector<dof_id_type>& conn) const;
163 
164 // void tecplot_connectivity(const unsigned int sc,
165 // std::vector<unsigned int>& conn) const;
166 
167 // void vtk_connectivity(const unsigned int,
168 // std::vector<unsigned int>*) const
169 // { libmesh_error(); }
170 
171  unsigned int vtk_element_type (const unsigned int) const
172  { return 12; }
173 
177  unsigned int n_second_order_adjacent_vertices (const unsigned int) const;
178 
184  unsigned short int second_order_adjacent_vertex (const unsigned int n,
185  const unsigned int v) const;
186 
196  virtual std::pair<unsigned short int, unsigned short int>
197  second_order_child_vertex (const unsigned int n) const;
198 
203  static const unsigned int side_nodes_map[5][9];
204 
209  static const unsigned int edge_nodes_map[8][3];
210 
211 
212 protected:
213 
218 
219 
220 
221 #ifdef LIBMESH_ENABLE_AMR
222 
226  float embedding_matrix (const unsigned int i,
227  const unsigned int j,
228  const unsigned int k) const
229  { return _embedding_matrix[i][j][k]; }
230 
235  static const float _embedding_matrix[4][18][18];
236 
237 
238 #endif
239 
240 };
241 
242 
243 
244 // ------------------------------------------------------------
245 // InfHex18 class member functions
246 inline
248  InfHex(InfHex18::n_nodes(), p, _nodelinks_data)
249 {
250 }
251 
252 
253 } // namespace libMesh
254 
255 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
256 
257 
258 #endif // LIBMESH_CELL_INF_HEX18_H

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

Hosted By:
SourceForge.net Logo