libMesh
Loading...
Searching...
No Matches
cell_pyramid13.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 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
26namespace libMesh
27{
28
73class Pyramid13 final : public Pyramid
74{
75public:
76
80 explicit
81 Pyramid13 (Elem * p=nullptr) :
83 {}
84
85 Pyramid13 (Pyramid13 &&) = delete;
86 Pyramid13 (const Pyramid13 &) = delete;
87 Pyramid13 & operator= (const Pyramid13 &) = delete;
89 virtual ~Pyramid13() = default;
90
94 virtual unsigned int n_nodes() const override { return num_nodes; }
95
99 virtual ElemType type () const override { return PYRAMID13; }
100
105 virtual unsigned int n_sub_elem() const override { return 1; }
106
110 virtual bool is_vertex(const unsigned int i) const override;
111
115 virtual bool is_edge(const unsigned int i) const override;
116
120 virtual bool is_face(const unsigned int i) const override;
121
126 virtual bool is_node_on_side(const unsigned int n,
127 const unsigned int s) const override;
128
129 virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
130
131 virtual std::vector<unsigned int> nodes_on_edge(const unsigned int e) const override;
132
137 virtual bool is_node_on_edge(const unsigned int n,
138 const unsigned int e) const override;
139
144 virtual bool has_affine_map () const override;
145
149 virtual Order default_order() const override;
150
154 virtual unsigned int local_side_node(unsigned int side,
155 unsigned int side_node) const override;
156
160 virtual unsigned int local_edge_node(unsigned int edge,
161 unsigned int edge_node) const override;
162
167 virtual std::unique_ptr<Elem> build_side_ptr (const unsigned int i) override;
168
172 virtual void build_side_ptr (std::unique_ptr<Elem> & elem,
173 const unsigned int i) override;
174
175 // Avoid hiding deprecated version with different signature
177
182 virtual std::unique_ptr<Elem> build_edge_ptr (const unsigned int i) override;
183
187 virtual void build_edge_ptr (std::unique_ptr<Elem> & edge, const unsigned int i) override;
188
189 virtual void connectivity(const unsigned int sc,
190 const IOPackage iop,
191 std::vector<dof_id_type> & conn) const override;
192
196 virtual unsigned int n_second_order_adjacent_vertices (const unsigned int n) const override;
197
202 virtual unsigned short int second_order_adjacent_vertex (const unsigned int n,
203 const unsigned int v) const override;
204
208 static const int num_nodes = 13;
209 static const int nodes_per_side = 8;
210 static const int nodes_per_edge = 3;
211
216 static const unsigned int side_nodes_map[num_sides][nodes_per_side];
217
222 static const unsigned int edge_nodes_map[num_edges][nodes_per_edge];
223
227 virtual Real volume () const override;
228
229 virtual void permute(unsigned int perm_num) override final;
230
231 virtual void flip(BoundaryInfo *) override final;
232
233 ElemType side_type (const unsigned int s) const override final;
234
235protected:
236
241
242
243
244#ifdef LIBMESH_ENABLE_AMR
245
249 virtual Real embedding_matrix (const unsigned int,
250 const unsigned int,
251 const unsigned int) const override
252 { libmesh_not_implemented(); return 0.; }
253
255
256#endif // LIBMESH_ENABLE_AMR
257
258};
259
260} // namespace libMesh
261
262
263#endif // LIBMESH_CELL_PYRAMID13_H
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
This is the base class from which all geometric element types are derived.
Definition elem.h:96
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i)=0
A Node is like a Point, but with more information.
Definition node.h:55
The Pyramid13 is an element in 3D composed of 13 nodes, designed to interface with a QUAD8 element on...
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Builds a QUAD8 or TRI6 coincident with face i.
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE3 coincident with edge i.
virtual bool is_face(const unsigned int i) const override
static const int nodes_per_side
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
virtual bool has_affine_map() const override
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int n) const override
static const int num_nodes
Geometric constants for Pyramid13.
Pyramid13(const Pyramid13 &)=delete
Pyramid13 & operator=(const Pyramid13 &)=delete
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
virtual Real embedding_matrix(const unsigned int, const unsigned int, const unsigned int) const override
Matrix used to create the elements children.
virtual ~Pyramid13()=default
Node * _nodelinks_data[num_nodes]
Data for links to nodes.
virtual Real volume() const override
Specialization for computing the volume of a Pyramid13.
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the edge to element node numbers.
virtual unsigned int n_nodes() const override
static const int nodes_per_edge
ElemType side_type(const unsigned int s) const override final
virtual bool is_edge(const unsigned int i) const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual unsigned int n_sub_elem() const override
FIXME: we don't yet have a refinement pattern for pyramids...
virtual bool is_vertex(const unsigned int i) const override
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Pyramid13(Elem *p=nullptr)
Constructor.
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index.
Pyramid13(Pyramid13 &&)=delete
virtual ElemType type() const override
virtual Order default_order() const override
The Pyramid is an element in 3D with 5 sides.
static const int num_edges
static const int num_sides
Geometric constants for all Pyramids.
The libMesh namespace provides an interface to certain functionality in the library.
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
ElemType
Defines an enum for geometric element types.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real