libMesh
cell_pyramid13.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_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=true) 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
libMesh::Pyramid13::~Pyramid13
virtual ~Pyramid13()=default
libMesh::Pyramid13::nodes_per_edge
static const int nodes_per_edge
Definition: cell_pyramid13.h:193
libMesh::Pyramid13::n_nodes
virtual unsigned int n_nodes() const override
Definition: cell_pyramid13.h:89
libMesh::Pyramid13
The Pyramid13 is an element in 3D composed of 13 nodes, designed to interface with a QUAD8 element on...
Definition: cell_pyramid13.h:68
libMesh::Pyramid13::Pyramid13
Pyramid13(Elem *p=nullptr)
Constructor.
Definition: cell_pyramid13.h:76
libMesh::Pyramid
The Pyramid is an element in 3D with 5 sides.
Definition: cell_pyramid.h:39
libMesh::Pyramid13::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_pyramid13.h:205
libMesh::IOPackage
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
Definition: enum_io_package.h:37
libMesh::Pyramid13::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_pyramid13.h:226
libMesh::Pyramid13::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_pyramid13.h:199
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::Pyramid13::nodes_on_side
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition: cell_pyramid13.C:104
libMesh::Order
Order
Definition: enum_order.h:40
libMesh::Pyramid13::default_order
virtual Order default_order() const override
Definition: cell_pyramid13.C:131
libMesh::Pyramid13::which_node_am_i
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
Definition: cell_pyramid13.C:138
libMesh::Pyramid13::connectivity
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition: cell_pyramid13.C:262
libMesh::Pyramid13::is_node_on_edge
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition: cell_pyramid13.C:111
libMesh::Pyramid13::LIBMESH_ENABLE_TOPOLOGY_CACHES
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: cell_pyramid13.h:231
libMesh::Pyramid13::num_nodes
static const int num_nodes
Geometric constants for Pyramid13.
Definition: cell_pyramid13.h:188
libMesh::Pyramid13::is_node_on_side
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition: cell_pyramid13.C:94
libMesh::Pyramid13::volume
virtual Real volume() const override
Specialization for computing the volume of a Pyramid13.
Definition: cell_pyramid13.C:356
libMesh::Pyramid13::nodes_per_side
static const int nodes_per_side
Definition: cell_pyramid13.h:192
libMesh::Node
A Node is like a Point, but with more information.
Definition: node.h:52
libMesh::Pyramid13::num_edges
static const int num_edges
Definition: cell_pyramid13.h:190
libMesh::Pyramid13::n_sub_elem
virtual unsigned int n_sub_elem() const override
FIXME: we don't yet have a refinement pattern for pyramids...
Definition: cell_pyramid13.h:100
libMesh::Pyramid13::is_edge
virtual bool is_edge(const unsigned int i) const override
Definition: cell_pyramid13.C:78
libMesh::Pyramid13::build_side_ptr
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=true) override
Builds a QUAD8 or TRI6 coincident with face i.
Definition: cell_pyramid13.C:154
libMesh::Pyramid13::type
virtual ElemType type() const override
Definition: cell_pyramid13.h:94
libMesh::Pyramid13::second_order_adjacent_vertex
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
Definition: cell_pyramid13.C:311
libMesh::Pyramid13::is_face
virtual bool is_face(const unsigned int i) const override
Definition: cell_pyramid13.C:87
libMesh::Pyramid13::has_affine_map
virtual bool has_affine_map() const override
Definition: cell_pyramid13.C:122
libMesh::Pyramid13::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_pyramid13.C:253
libMesh::Pyramid13::operator=
Pyramid13 & operator=(const Pyramid13 &)=delete
libMesh::Pyramid13::num_children
static const int num_children
Definition: cell_pyramid13.h:191
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::Pyramid13::n_second_order_adjacent_vertices
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int n) const override
Definition: cell_pyramid13.C:291
libMesh::Pyramid13::num_sides
static const int num_sides
Definition: cell_pyramid13.h:189
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121
libMesh::Pyramid13::_nodelinks_data
Node * _nodelinks_data[num_nodes]
Data for links to nodes.
Definition: cell_pyramid13.h:217
libMesh::Pyramid13::is_vertex
virtual bool is_vertex(const unsigned int i) const override
Definition: cell_pyramid13.C:69
libMesh::PYRAMID13
Definition: enum_elem_type.h:54
libMesh::ElemType
ElemType
Defines an enum for geometric element types.
Definition: enum_elem_type.h:33