cell_pyramid13.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2012 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_PYRAMID13_H
21 #define LIBMESH_CELL_PYRAMID13_H
22 
23 // Local includes
24 #include "libmesh/cell_pyramid.h"
25 
26 namespace libMesh
27 {
28 
68 class Pyramid13 final : public Pyramid
69 {
70 public:
71 
75  explicit
76  Pyramid13 (Elem * p=nullptr) :
78  {}
79 
80  Pyramid13 (Pyramid13 &&) = delete;
81  Pyramid13 (const Pyramid13 &) = delete;
82  Pyramid13 & operator= (const Pyramid13 &) = delete;
83  Pyramid13 & operator= (Pyramid13 &&) = delete;
84  virtual ~Pyramid13() = default;
85 
89  virtual unsigned int n_nodes() const override { return num_nodes; }
90 
94  virtual ElemType type () const override { return PYRAMID13; }
95 
100  virtual unsigned int n_sub_elem() const override { return 1; }
101 
105  virtual bool is_vertex(const unsigned int i) const override;
106 
110  virtual bool is_edge(const unsigned int i) const override;
111 
115  virtual bool is_face(const unsigned int i) const override;
116 
121  virtual bool is_node_on_side(const unsigned int n,
122  const unsigned int s) const override;
123 
124  virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
125 
130  virtual bool is_node_on_edge(const unsigned int n,
131  const unsigned int e) const override;
132 
137  virtual bool has_affine_map () const override;
138 
142  virtual Order default_order() const override;
143 
147  virtual unsigned int which_node_am_i(unsigned int side,
148  unsigned int side_node) const override;
149 
154  virtual std::unique_ptr<Elem> build_side_ptr (const unsigned int i,
155  bool proxy) override;
156 
160  virtual void build_side_ptr (std::unique_ptr<Elem> & elem,
161  const unsigned int i) override;
162 
167  virtual std::unique_ptr<Elem> build_edge_ptr (const unsigned int i) override;
168 
169  virtual void connectivity(const unsigned int sc,
170  const IOPackage iop,
171  std::vector<dof_id_type> & conn) const override;
172 
176  virtual unsigned int n_second_order_adjacent_vertices (const unsigned int n) const override;
177 
182  virtual unsigned short int second_order_adjacent_vertex (const unsigned int n,
183  const unsigned int v) const override;
184 
188  static const int num_nodes = 13;
189  static const int num_sides = 5;
190  static const int num_edges = 8;
191  static const int num_children = 0; // not implemented
192  static const int nodes_per_side = 8;
193  static const int nodes_per_edge = 3;
194 
199  static const unsigned int side_nodes_map[num_sides][nodes_per_side];
200 
205  static const unsigned int edge_nodes_map[num_edges][nodes_per_edge];
206 
210  virtual Real volume () const override;
211 
212 protected:
213 
218 
219 
220 
221 #ifdef LIBMESH_ENABLE_AMR
222 
226  virtual float embedding_matrix (const unsigned int,
227  const unsigned int,
228  const unsigned int) const override
229  { libmesh_not_implemented(); return 0.; }
230 
232 
233 #endif // LIBMESH_ENABLE_AMR
234 
235 };
236 
237 } // namespace libMesh
238 
239 
240 #endif // LIBMESH_CELL_PYRAMID13_H
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
The base class for all pyramid element types.
Definition: cell_pyramid.h:39
virtual bool has_affine_map() const override
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:52
virtual unsigned int n_nodes() const override
virtual Real volume() const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int n) const override
static const int nodes_per_edge
The base class for all geometric element types.
Definition: elem.h:100
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
virtual float embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
static const int nodes_per_side
Pyramid13 & operator=(const Pyramid13 &)=delete
static const int num_children
Pyramid13(Elem *p=nullptr)
virtual ~Pyramid13()=default
virtual bool is_edge(const unsigned int i) const override
Node * _nodelinks_data[num_nodes]
virtual bool is_vertex(const unsigned int i) const override
virtual unsigned int n_sub_elem() const override
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
static const int num_sides
static const int num_nodes
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy) override
A 3D pyramid element with 13 nodes.
virtual bool is_face(const unsigned int i) const override
virtual ElemType type() const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
static const int num_edges
virtual Order default_order() const override
std::unique_ptr< Elem > side(const unsigned int i) const
Definition: elem.h:2202
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override