libMesh
cell_pyramid14.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 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=true) 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
libMesh::Pyramid14::is_node_on_side
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition: cell_pyramid14.C:98
libMesh::dof_id_type
uint8_t dof_id_type
Definition: id_types.h:67
libMesh::Pyramid14::num_edges
static const int num_edges
Definition: cell_pyramid14.h:209
libMesh::Pyramid14::n_second_order_adjacent_vertices
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int n) const override
Definition: cell_pyramid14.C:317
libMesh::Pyramid14::n_nodes
virtual unsigned int n_nodes() const override
Definition: cell_pyramid14.h:92
libMesh::Pyramid14::num_nodes
static const int num_nodes
Geometric constants for Pyramid14.
Definition: cell_pyramid14.h:207
libMesh::Pyramid14::second_order_adjacent_vertex
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
Definition: cell_pyramid14.C:340
libMesh::Pyramid14::LIBMESH_ENABLE_TOPOLOGY_CACHES
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: cell_pyramid14.h:250
libMesh::Pyramid
The Pyramid is an element in 3D with 5 sides.
Definition: cell_pyramid.h:39
libMesh::IOPackage
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
Definition: enum_io_package.h:37
libMesh::Pyramid14::has_affine_map
virtual bool has_affine_map() const override
Definition: cell_pyramid14.C:126
libMesh::Pyramid14::connectivity
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition: cell_pyramid14.C:288
libMesh::Pyramid14::embedding_matrix
virtual float embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
Matrix used to create the elements children.
Definition: cell_pyramid14.h:245
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::Order
Order
Definition: enum_order.h:40
libMesh::Pyramid14::which_node_am_i
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
Definition: cell_pyramid14.C:164
libMesh::Pyramid14::Pyramid14
Pyramid14(Elem *p=nullptr)
Constructor.
Definition: cell_pyramid14.h:79
libMesh::Pyramid14::nodes_on_side
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition: cell_pyramid14.C:108
libMesh::Pyramid14::is_face
virtual bool is_face(const unsigned int i) const override
Definition: cell_pyramid14.C:89
libMesh::Pyramid14
The Pyramid14 is an element in 3D composed of 14 nodes, designed to interface with a QUAD9 element on...
Definition: cell_pyramid14.h:71
libMesh::Pyramid14::default_order
virtual Order default_order() const override
Definition: cell_pyramid14.C:135
libMesh::Pyramid14::edge_nodes_map
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the edge to element node numbers.
Definition: cell_pyramid14.h:224
libMesh::Pyramid14::is_edge
virtual bool is_edge(const unsigned int i) const override
Definition: cell_pyramid14.C:78
libMesh::Elem::key
virtual dof_id_type key() const
Definition: elem.C:410
libMesh::Node
A Node is like a Point, but with more information.
Definition: node.h:52
libMesh::Pyramid14::num_children
static const int num_children
Definition: cell_pyramid14.h:210
libMesh::Pyramid14::_nodelinks_data
Node * _nodelinks_data[num_nodes]
Data for links to nodes.
Definition: cell_pyramid14.h:236
libMesh::Pyramid14::type
virtual ElemType type() const override
Definition: cell_pyramid14.h:97
libMesh::Pyramid14::n_sub_elem
virtual unsigned int n_sub_elem() const override
FIXME: we don't yet have a refinement pattern for pyramids...
Definition: cell_pyramid14.h:103
libMesh::Pyramid14::side_nodes_map
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
Definition: cell_pyramid14.h:218
libMesh::Pyramid14::build_edge_ptr
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE3 coincident with edge i.
Definition: cell_pyramid14.C:279
libMesh::Pyramid14::operator=
Pyramid14 & operator=(const Pyramid14 &)=delete
libMesh::Pyramid14::volume
virtual Real volume() const override
Specialization for computing the volume of a Pyramid14.
Definition: cell_pyramid14.C:396
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::Pyramid14::is_vertex
virtual bool is_vertex(const unsigned int i) const override
Definition: cell_pyramid14.C:69
libMesh::Pyramid14::nodes_per_edge
static const int nodes_per_edge
Definition: cell_pyramid14.h:212
libMesh::Pyramid14::~Pyramid14
virtual ~Pyramid14()=default
libMesh::Pyramid14::num_sides
static const int num_sides
Definition: cell_pyramid14.h:208
libMesh::Pyramid14::nodes_per_side
static const int nodes_per_side
Definition: cell_pyramid14.h:211
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::Pyramid14::is_node_on_edge
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition: cell_pyramid14.C:115
libMesh::Pyramid14::build_side_ptr
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=true) override
Builds a QUAD9 or TRI6 coincident with face i.
Definition: cell_pyramid14.C:180
libMesh::PYRAMID14
Definition: enum_elem_type.h:55
libMesh::ElemType
ElemType
Defines an enum for geometric element types.
Definition: enum_elem_type.h:33