cell_inf_prism12.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_PRISM12_H
21 #define LIBMESH_CELL_INF_PRISM12_H
22 
23 #include "libmesh/libmesh_config.h"
24 
25 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
26 
27 // Local includes
28 #include "libmesh/cell_inf_prism.h"
29 
30 // C++ includes
31 #include <cstddef>
32 
33 namespace libMesh
34 {
35 
36 
37 
38 
64 // ------------------------------------------------------------
65 // InfPrism12 class definition
66 class InfPrism12 : public InfPrism
67 {
68 public:
69 
73  explicit
74  InfPrism12 (Elem* p=NULL);
75 
79  unsigned int n_nodes() const { return 12; }
80 
84  ElemType type () const { return INFPRISM12; }
85 
89  unsigned int n_sub_elem() const { return 4; }
90 
94  virtual bool is_vertex(const unsigned int i) const;
95 
99  virtual bool is_edge(const unsigned int i) const;
100 
104  virtual bool is_face(const unsigned int i) const;
105 
106  /*
107  * @returns true iff the specified (local) node number is on the
108  * specified side
109  */
110  virtual bool is_node_on_side(const unsigned int n,
111  const unsigned int s) const;
112 
113  /*
114  * @returns true iff the specified (local) node number is on the
115  * specified edge
116  */
117  virtual bool is_node_on_edge(const unsigned int n,
118  const unsigned int e) const;
119 
123  Order default_order() const { return SECOND; }
124 
130  AutoPtr<Elem> build_side (const unsigned int i,
131  bool proxy) const;
132 
138  AutoPtr<Elem> build_edge (const unsigned int i) const;
139 
140  virtual void connectivity(const unsigned int sc,
141  const IOPackage iop,
142  std::vector<dof_id_type>& conn) const;
143 
144 // void tecplot_connectivity(const unsigned int sc,
145 // std::vector<unsigned int>& conn) const;
146 
147 // void vtk_connectivity(const unsigned int,
148 // std::vector<unsigned int>*) const
149 // { libmesh_error(); }
150 
151 // unsigned int vtk_element_type (const unsigned int) const
152 // { return 13; }
153 
157  unsigned int n_second_order_adjacent_vertices (const unsigned int) const
158  { return 2; }
159 
165  unsigned short int second_order_adjacent_vertex (const unsigned int n,
166  const unsigned int v) const;
167 
177  virtual std::pair<unsigned short int, unsigned short int>
178  second_order_child_vertex (const unsigned int n) const;
179 
184  static const unsigned int side_nodes_map[4][6];
185 
190  static const unsigned int edge_nodes_map[6][3];
191 
192 
193 
194 protected:
195 
200 
201 
202 #ifdef LIBMESH_ENABLE_AMR
203 
207  float embedding_matrix (const unsigned int i,
208  const unsigned int j,
209  const unsigned int k) const
210  { return _embedding_matrix[i][j][k]; }
211 
216  static const float _embedding_matrix[4][12][12];
217 
218 #endif
219 
220 
221 private:
222 
227  static const unsigned short int _second_order_adjacent_vertices[6][2];
228 
232  static const unsigned short int _second_order_vertex_child_number[12];
233 
237  static const unsigned short int _second_order_vertex_child_index[12];
238 };
239 
240 
241 
242 // ------------------------------------------------------------
243 // InfPrism12 class member functions
244 inline
246  InfPrism(InfPrism12::n_nodes(), p, _nodelinks_data)
247 {
248 }
249 
250 
251 } // namespace libMesh
252 
253 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
254 
255 #endif // LIBMESH_CELL_INF_PRISM12_H

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

Hosted By:
SourceForge.net Logo