cell_pyramid5.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_PYRAMID5_H
21 #define LIBMESH_CELL_PYRAMID5_H
22 
23 // Local includes
24 #include "libmesh/cell_pyramid.h"
25 
26 // C++ includes
27 #include <cstddef>
28 
29 namespace libMesh
30 {
31 
32 
33 
34 
54 // ------------------------------------------------------------
55 // Pyramid class definition
56 class Pyramid5 : public Pyramid
57 {
58 public:
59 
63  explicit
64  Pyramid5 (Elem* p=NULL);
65 
69  ElemType type () const { return PYRAMID5; }
70 
74  unsigned int n_sub_elem() const { return 1; }
75 
79  virtual bool is_vertex(const unsigned int i) const;
80 
84  virtual bool is_edge(const unsigned int i) const;
85 
89  virtual bool is_face(const unsigned int i) const;
90 
91  /*
92  * @returns true iff the specified (local) node number is on the
93  * specified side
94  */
95  virtual bool is_node_on_side(const unsigned int n,
96  const unsigned int s) const;
97 
98  /*
99  * @returns true iff the specified (local) node number is on the
100  * specified edge
101  */
102  virtual bool is_node_on_edge(const unsigned int n,
103  const unsigned int e) const;
104 
105  /*
106  * @returns true iff the element map is definitely affine within
107  * numerical tolerances
108  */
109  virtual bool has_affine_map () const;
110 
114  Order default_order() const { return FIRST; }
115 
120  AutoPtr<Elem> build_side (const unsigned int i,
121  bool proxy) const;
122 
127  AutoPtr<Elem> build_edge (const unsigned int i) const;
128 
129  virtual void connectivity(const unsigned int sc,
130  const IOPackage iop,
131  std::vector<dof_id_type>& conn) const;
132 
137  static const unsigned int side_nodes_map[5][4];
138 
143  static const unsigned int edge_nodes_map[8][2];
144 
148  virtual Real volume () const;
149 
150 
151 protected:
152 
157 
158 
159 
160 #ifdef LIBMESH_ENABLE_AMR
161 
165  float embedding_matrix (const unsigned int,
166  const unsigned int,
167  const unsigned int) const
168  { libmesh_error(); return 0.; }
169 
170 #endif
171 };
172 
173 
174 
175 // ------------------------------------------------------------
176 // Pyramid5 class member functions
177 inline
179  Pyramid(Pyramid5::n_nodes(), p, _nodelinks_data)
180 {
181 }
182 
183 } // namespace libMesh
184 
185 
186 #endif // LIBMESH_CELL_PYRAMID5_H

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

Hosted By:
SourceForge.net Logo