20#include "libmesh/cell_pyramid18.h"
21#include "libmesh/edge_edge3.h"
22#include "libmesh/face_tri7.h"
23#include "libmesh/face_quad9.h"
24#include "libmesh/enum_io_package.h"
25#include "libmesh/enum_order.h"
41 {0, 1, 4, 5, 10, 9, 14, 99, 99},
42 {1, 2, 4, 6, 11, 10, 15, 99, 99},
43 {2, 3, 4, 7, 12, 11, 16, 99, 99},
44 {3, 0, 4, 8, 9, 12, 17, 99, 99},
45 {0, 3, 2, 1, 8, 7, 6, 5, 13}
93 const unsigned int s)
const
95 libmesh_assert_less (s,
n_sides());
104 libmesh_assert_less(s,
n_sides());
105 auto trim = (s == 4) ? 0 : 2;
112 libmesh_assert_less(e,
n_edges());
117 const unsigned int e)
const
119 libmesh_assert_less (e,
n_edges());
145 libmesh_assert_less (s, this->
n_sides());
159 libmesh_error_msg(
"Invalid side s = " << s);
166 unsigned int side_node)
const
168 libmesh_assert_less (side, this->
n_sides());
182 unsigned int edge_node)
const
184 libmesh_assert_less(edge, this->
n_edges());
194 libmesh_assert_less (i, this->
n_sides());
196 std::unique_ptr<Elem> face;
205 face = std::make_unique<Tri7>();
210 face = std::make_unique<Quad9>();
214 libmesh_error_msg(
"Invalid side i = " << i);
218 for (
auto n : face->node_index_range())
221 face->set_interior_parent(
this);
222 face->inherit_data_from(*
this);
230 const unsigned int i)
232 libmesh_assert_less (i, this->
n_sides());
241 if (!side.get() || side->type() !=
TRI7)
250 if (!side.get() || side->type() !=
QUAD9)
258 libmesh_error_msg(
"Invalid side i = " << i);
261 side->inherit_data_from(*
this);
264 for (
auto n : side->node_index_range())
272 return this->simple_build_edge_ptr<Edge3,Pyramid18>(i);
279 this->simple_build_edge_ptr<Pyramid18>(edge, i,
EDGE3);
286 std::vector<dof_id_type> & )
const
297 libmesh_not_implemented();
303 libmesh_not_implemented();
307 libmesh_error_msg(
"Unsupported IO package " << iop);
337 libmesh_error_msg(
"Invalid node n = " << n);
343 const unsigned int v)
const
345 libmesh_assert_greater_equal (n, this->
n_vertices());
346 libmesh_assert_less (n, this->
n_nodes());
359 libmesh_assert_less (v, 2);
365 constexpr unsigned short node_list[8][2] =
377 return node_list[n-5][v];
383 libmesh_assert_less (v, 4);
387 return cast_int<unsigned short>(v);
396 libmesh_assert_less (v, 3);
398 constexpr unsigned short node_list[4][3] =
406 return node_list[n-14][v];
410 libmesh_error_msg(
"Invalid n = " << n);
419 libmesh_assert_less (perm_num, 4);
421 for (
unsigned int i = 0; i != perm_num; ++i)
453 return side == 4 ? 13 : side+14;
459 libmesh_assert_less (s, 5);
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
void swap4nodes(unsigned int n1, unsigned int n2, unsigned int n3, unsigned int n4)
Swaps four node_ptrs, "rotating" them.
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
Node ** _nodes
Pointers to the nodes we are connected to.
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
static dof_id_type compute_key(dof_id_type n0)
void swap2boundaryedges(unsigned short e1, unsigned short e2, BoundaryInfo *boundary_info) const
Swaps two edges in boundary_info, if it is non-null.
dof_id_type node_id(const unsigned int i) const
void swap4neighbors(unsigned int n1, unsigned int n2, unsigned int n3, unsigned int n4)
Swaps four neighbor_ptrs, "rotating" them.
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
static const int nodes_per_edge
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index.
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Builds a QUAD9 or TRI7 coincident with face i.
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int n) const override
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) 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
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
virtual unsigned int n_nodes() const override
virtual bool has_affine_map() const override
static const int nodes_per_side
virtual bool is_edge(const unsigned int i) const override
virtual dof_id_type key() const
Don't hide Pyramid::key() defined in the base class.
virtual unsigned int n_sub_elem() const override
FIXME: we don't yet have a refinement pattern for pyramids...
virtual bool is_face(const unsigned int i) const override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
virtual bool is_vertex(const unsigned int i) const override
static const int num_nodes
Geometric constants for Pyramid18.
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the edge to element node numbers.
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE3 coincident with edge i.
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 Order default_order() const override
ElemType side_type(const unsigned int s) const override final
unsigned int center_node_on_side(const unsigned short side) const override final
virtual unsigned int n_sides() const override
virtual unsigned int n_edges() const override
static const int num_edges
static const int num_sides
Geometric constants for all Pyramids.
virtual unsigned int n_vertices() const override
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.