cell_inf_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_INF_HEX8_H
21 #define LIBMESH_CELL_INF_HEX8_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 
59 // ------------------------------------------------------------
60 // InfHex8 class definition
61 class InfHex8 : public InfHex
62 {
63 public:
64 
68  explicit
69  InfHex8 (Elem* p=NULL);
70 
74  unsigned int n_nodes() const { return 8; }
75 
79  ElemType type() const { return INFHEX8; }
80 
84  unsigned int n_sub_elem() const { return 1; }
85 
89  virtual bool is_vertex(const unsigned int i) const;
90 
94  virtual bool is_edge(const unsigned int i) const;
95 
99  virtual bool is_face(const unsigned int i) const;
100 
101  /*
102  * @returns true iff the specified (local) node number is on the
103  * specified side
104  */
105  virtual bool is_node_on_side(const unsigned int n,
106  const unsigned int s) const;
107 
108  /*
109  * @returns true iff the specified (local) node number is on the
110  * specified edge
111  */
112  virtual bool is_node_on_edge(const unsigned int n,
113  const unsigned int e) const;
114 
118  Order default_order() const { return FIRST; }
119 
125  AutoPtr<Elem> build_side (const unsigned int i,
126  bool proxy) const;
127 /* { */
128 /* // side() returns an AutoPtr to a DofObject, hence need to cast to Elem* */
129 /* AutoPtr<DofObject> ap_dof_object(this->side(i)); */
130 /* Elem* side = libmesh_cast_ptr<Elem*>(ap_dof_object.release()); */
131 /* libmesh_assert(side); // libmesh_assert that the cast was successful */
132 
133 /* AutoPtr<Elem> ap(side); */
134 /* return ap; */
135 /* } */
136 
142  AutoPtr<Elem> build_edge (const unsigned int i) const;
143 
144  virtual void connectivity(const unsigned int sc,
145  const IOPackage iop,
146  std::vector<dof_id_type>& conn) const;
147 
148 // void tecplot_connectivity(const unsigned int sc,
149 // std::vector<unsigned int>& conn) const;
150 
151 // void vtk_connectivity(const unsigned int,
152 // std::vector<unsigned int>*) const
153 // { libmesh_error(); }
154 
155  unsigned int vtk_element_type (const unsigned int) const
156  { return 12; }
157 
163  bool contains_point (const Point& p, Real tol=TOLERANCE) const;
164 
169  static const unsigned int side_nodes_map[5][4];
170 
175  static const unsigned int edge_nodes_map[8][2];
176 
177 
178 protected:
179 
184 
185 
186 
187 #ifdef LIBMESH_ENABLE_AMR
188 
192  float embedding_matrix (const unsigned int i,
193  const unsigned int j,
194  const unsigned int k) const
195  { return _embedding_matrix[i][j][k]; }
196 
201  static const float _embedding_matrix[4][8][8];
202 
203 #endif
204 
205 };
206 
207 
208 
209 // ------------------------------------------------------------
210 // InfHex8 class member functions
211 inline
213  InfHex(InfHex8::n_nodes(), p, _nodelinks_data)
214 {
215 }
216 
217 
218 } // namespace libMesh
219 
220 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
221 
222 #endif // LIBMESH_CELL_INF_HEX8_H

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

Hosted By:
SourceForge.net Logo