cell_pyramid.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_PYRAMID_H
21 #define LIBMESH_CELL_PYRAMID_H
22 
23 // Local includes
24 #include "libmesh/cell.h"
25 
26 namespace libMesh
27 {
28 
29 
30 
31 
36 // ------------------------------------------------------------
37 // Pyramid class definition
38 class Pyramid : public Cell
39 {
40 public:
41 
47  Pyramid(const unsigned int nn, Elem* p, Node** nodelinkdata);
48 
53  unsigned int n_nodes() const { return 5; }
54 
58  unsigned int n_sides() const { return 5; }
59 
63  unsigned int n_vertices() const { return 5; }
64 
68  unsigned int n_edges() const { return 8; }
69 
73  unsigned int n_faces() const { return 5; }
74 
78  unsigned int n_children() const { return 10; }
79 
80  /*
81  * @returns true iff the specified child is on the
82  * specified side
83  */
84  virtual bool is_child_on_side(const unsigned int c,
85  const unsigned int s) const;
86 
87  /*
88  * @returns true iff the specified edge is on the specified side
89  */
90  virtual bool is_edge_on_side(const unsigned int e,
91  const unsigned int s) const;
92 
98  dof_id_type key (const unsigned int s) const;
99 
104  AutoPtr<Elem> side (const unsigned int i) const;
105 
106 
107  protected:
108 
112  Elem* _elemlinks_data[6+(LIBMESH_DIM>3)];
113 
114 
115 #ifdef LIBMESH_ENABLE_AMR
116 
120  unsigned int side_children_matrix (const unsigned int,
121  const unsigned int) const
122  { libmesh_error(); return 0; }
123 
124 #endif
125 
126 };
127 
128 
129 
130 // ------------------------------------------------------------
131 // Pyramid class member functions
132 inline
133 Pyramid::Pyramid(const unsigned int nn, Elem* p, Node** nodelinkdata) :
134  Cell(nn, Pyramid::n_sides(), p, _elemlinks_data, nodelinkdata)
135 {
136 }
137 
138 } // namespace libMesh
139 
140 #endif // LIBMESH_CELL_PYRAMID_H

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

Hosted By:
SourceForge.net Logo