cell_inf_hex.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_HEX_H
21 #define LIBMESH_CELL_INF_HEX_H
22 
23 #include "libmesh/libmesh_config.h"
24 
25 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
26 
27 // Local includes
28 #include "libmesh/cell_inf.h"
29 
30 namespace libMesh
31 {
32 
33 
34 
35 
46 // ------------------------------------------------------------
47 // InfHex class definition
48 class InfHex : public InfCell
49 {
50 public:
51 
56  InfHex(const unsigned int nn, Elem* p, Node** nodelinkdata);
57 
58 // /**
59 // * @returns 4 for the base \p s=0 and 2 for side faces.
60 // */
61 // unsigned int n_children_per_side(const unsigned int s) const;
62 
68  unsigned int n_sides() const { return 5; }
69 
74  unsigned int n_vertices() const { return 8; }
75 
80  unsigned int n_edges() const { return 8; }
81 
85  unsigned int n_faces() const { return 5; }
86 
90  unsigned int n_children() const { return 4; }
91 
92  /*
93  * @returns true iff the specified child is on the
94  * specified side
95  */
96  virtual bool is_child_on_side(const unsigned int c,
97  const unsigned int s) const;
98 
99  /*
100  * @returns true iff the specified edge is on the specified side
101  */
102  virtual bool is_edge_on_side(const unsigned int e,
103  const unsigned int s) const;
104 
110  dof_id_type key (const unsigned int s) const;
111 
116  AutoPtr<Elem> side (const unsigned int i) const;
117 
122  Real quality (const ElemQuality q) const;
123 
129  std::pair<Real, Real> qual_bounds (const ElemQuality q) const;
130 
131 
132 
133 protected:
134 
138  Elem* _elemlinks_data[6+(LIBMESH_DIM>3)];
139 
140 
141 
151  static const unsigned short int _second_order_adjacent_vertices[8][2];
152 
156  static const unsigned short int _second_order_vertex_child_number[18];
157 
161  static const unsigned short int _second_order_vertex_child_index[18];
162 };
163 
164 
165 
166 // ------------------------------------------------------------
167 // InfHex class member functions
168 inline
169 InfHex::InfHex(const unsigned int nn, Elem* p, Node** nodelinkdata) :
170  InfCell(nn, InfHex::n_sides(), p, _elemlinks_data, nodelinkdata)
171 {
172 }
173 
174 
175 // inline
176 // unsigned int InfHex::n_children_per_side(const unsigned int s) const
177 // {
178 // libmesh_assert_less (s, this->n_sides());
179 
180 // switch (s)
181 // {
182 // case 0:
183 // // every infinite element has 4 children in the base side
184 // return 4;
185 
186 // default:
187 // // on infinite faces (sides), only 2 children exist
188 // //
189 // // note that the face at infinity is already caught by the libmesh_assertion
190 // return 2;
191 // }
192 // }
193 
194 
195 } // namespace libMesh
196 
197 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
198 
199 #endif // LIBMESH_CELL_INF_HEX_H

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

Hosted By:
SourceForge.net Logo