cell_pyramid14.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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_PYRAMID14_H
21 #define LIBMESH_CELL_PYRAMID14_H
22 
23 // Local includes
24 #include "libmesh/cell_pyramid.h"
25 
26 namespace libMesh
27 {
28 
71 class Pyramid14 final : public Pyramid
72 {
73 public:
74 
78  explicit
79  Pyramid14 (Elem * p=nullptr) :
81  {}
82 
83  Pyramid14 (Pyramid14 &&) = delete;
84  Pyramid14 (const Pyramid14 &) = delete;
85  Pyramid14 & operator= (const Pyramid14 &) = delete;
86  Pyramid14 & operator= (Pyramid14 &&) = delete;
87  virtual ~Pyramid14() = default;
88 
92  virtual unsigned int n_nodes() const override { return num_nodes; }
93 
97  virtual ElemType type () const override { return PYRAMID14; }
98 
103  virtual unsigned int n_sub_elem() const override { return 1; }
104 
108  virtual bool is_vertex(const unsigned int i) const override;
109 
113  virtual bool is_edge(const unsigned int i) const override;
114 
118  virtual bool is_face(const unsigned int i) const override;
119 
124  virtual bool is_node_on_side(const unsigned int n,
125  const unsigned int s) const override;
126 
127  virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
128 
133  virtual bool is_node_on_edge(const unsigned int n,
134  const unsigned int e) const override;
135 
140  virtual bool has_affine_map () const override;
141 
145  virtual Order default_order() const override;
146 
150  using Pyramid::key;
151 
161  virtual dof_id_type key (const unsigned int s) const override;
162 
166  virtual unsigned int which_node_am_i(unsigned int side,
167  unsigned int side_node) const override;
168 
173  virtual std::unique_ptr<Elem> build_side_ptr (const unsigned int i,
174  bool proxy) override;
175 
179  virtual void build_side_ptr (std::unique_ptr<Elem> & elem,
180  const unsigned int i) override;
181 
186  virtual std::unique_ptr<Elem> build_edge_ptr (const unsigned int i) override;
187 
188  virtual void connectivity(const unsigned int sc,
189  const IOPackage iop,
190  std::vector<dof_id_type> & conn) const override;
191 
195  virtual unsigned int n_second_order_adjacent_vertices (const unsigned int n) const override;
196 
201  virtual unsigned short int second_order_adjacent_vertex (const unsigned int n,
202  const unsigned int v) const override;
203 
207  static const int num_nodes = 14;
208  static const int num_sides = 5;
209  static const int num_edges = 8;
210  static const int num_children = 0; // not implemented
211  static const int nodes_per_side = 9;
212  static const int nodes_per_edge = 3;
213 
218  static const unsigned int side_nodes_map[num_sides][nodes_per_side];
219 
224  static const unsigned int edge_nodes_map[num_edges][nodes_per_edge];
225 
229  virtual Real volume () const override;
230 
231 protected:
232 
237 
238 
239 
240 #ifdef LIBMESH_ENABLE_AMR
241 
245  virtual float embedding_matrix (const unsigned int,
246  const unsigned int,
247  const unsigned int) const override
248  { libmesh_not_implemented(); return 0.; }
249 
251 
252 #endif // LIBMESH_ENABLE_AMR
253 
254 };
255 
256 } // namespace libMesh
257 
258 
259 #endif // LIBMESH_CELL_PYRAMID14_H
The base class for all pyramid element types.
Definition: cell_pyramid.h:39
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy) override
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:52
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
static const int num_children
virtual bool has_affine_map() const override
virtual dof_id_type key() const
Definition: elem.C:401
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
virtual Order default_order() const override
static const int num_edges
The base class for all geometric element types.
Definition: elem.h:100
virtual bool is_face(const unsigned int i) const override
virtual bool is_edge(const unsigned int i) const override
virtual unsigned int n_sub_elem() const override
static const int nodes_per_side
virtual float embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
Node * _nodelinks_data[num_nodes]
static const int num_sides
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
static const int num_nodes
Pyramid14 & operator=(const Pyramid14 &)=delete
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned int n_nodes() const override
virtual bool is_vertex(const unsigned int i) const override
virtual Real volume() const override
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
virtual ElemType type() const override
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int n) const override
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
A 3D pyramid element with 14 nodes.
static const int nodes_per_edge
virtual ~Pyramid14()=default
std::unique_ptr< Elem > side(const unsigned int i) const
Definition: elem.h:2202
Pyramid14(Elem *p=nullptr)
uint8_t dof_id_type
Definition: id_types.h:64
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override