cell_prism.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_PRISM_H
21 #define LIBMESH_CELL_PRISM_H
22 
23 // Local includes
24 #include "libmesh/cell.h"
25 
26 namespace libMesh
27 {
28 
29 
30 
31 
36 // ------------------------------------------------------------
37 // Prism class definition
38 class Prism : public Cell
39 {
40 public:
41 
46  Prism(const unsigned int nn, Elem* p, Node** nodelinkdata);
47 
52  unsigned int n_nodes() const { return 6; }
53 
57  unsigned int n_sides() const { return 5; }
58 
62  unsigned int n_vertices() const { return 6; }
63 
67  unsigned int n_edges() const { return 9; }
68 
72  unsigned int n_faces() const { return 5; }
73 
77  unsigned int n_children() const { return 8; }
78 
79  /*
80  * @returns true iff the specified child is on the
81  * specified side
82  */
83  virtual bool is_child_on_side(const unsigned int c,
84  const unsigned int s) const;
85 
86  /*
87  * @returns true iff the specified edge is on the specified side
88  */
89  virtual bool is_edge_on_side(const unsigned int e,
90  const unsigned int s) const;
91 
97  dof_id_type key (const unsigned int s) const;
98 
103  AutoPtr<Elem> side (const unsigned int i) const;
104 
105 
106 
107 protected:
108 
112  Elem* _elemlinks_data[6+(LIBMESH_DIM>3)];
113 
114 
115 
122  static const unsigned short int _second_order_adjacent_vertices[9][2];
123 
127  static const unsigned short int _second_order_vertex_child_number[18];
128 
132  static const unsigned short int _second_order_vertex_child_index[18];
133 };
134 
135 
136 
137 // ------------------------------------------------------------
138 // Prism class member functions
139 inline
140 Prism::Prism(const unsigned int nn, Elem* p, Node** nodelinkdata) :
141  Cell(nn, Prism::n_sides(), p, _elemlinks_data, nodelinkdata)
142 {
143 }
144 
145 } // namespace libMesh
146 
147 #endif // LIBMESH_CELL_PRISM_H

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

Hosted By:
SourceForge.net Logo