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"
72 const unsigned int s)
const
74 libmesh_assert_less (s,
n_sides());
83 libmesh_assert_less(s,
n_sides());
84 auto trim = (s == 4) ? 0 : 2;
91 libmesh_assert_less(e,
n_edges());
96 const unsigned int e)
const
98 libmesh_assert_less (e,
n_edges());
124 libmesh_assert_less (s, this->
n_sides());
138 libmesh_error_msg(
"Invalid side s = " << s);
145 unsigned int side_node)
const
147 libmesh_assert_less (side, this->
n_sides());
161 unsigned int edge_node)
const
163 libmesh_assert_less(edge, this->
n_edges());
173 libmesh_assert_less (i, this->
n_sides());
175 std::unique_ptr<Elem> face;
184 face = std::make_unique<Tri7>();
189 face = std::make_unique<Quad9>();
193 libmesh_error_msg(
"Invalid side i = " << i);
197 for (
auto n : face->node_index_range())
200 face->set_interior_parent(
this);
201 face->inherit_data_from(*
this);
209 const unsigned int i)
211 libmesh_assert_less (i, this->
n_sides());
220 if (!side.get() || side->type() !=
TRI7)
229 if (!side.get() || side->type() !=
QUAD9)
237 libmesh_error_msg(
"Invalid side i = " << i);
240 side->inherit_data_from(*
this);
243 for (
auto n : side->node_index_range())
251 return this->simple_build_edge_ptr<Edge3,Pyramid18>(i);
258 this->simple_build_edge_ptr<Pyramid18>(edge, i,
EDGE3);
265 std::vector<dof_id_type> & )
const
276 libmesh_not_implemented();
282 libmesh_not_implemented();
286 libmesh_error_msg(
"Unsupported IO package " << iop);
316 libmesh_error_msg(
"Invalid node n = " << n);
322 const unsigned int v)
const
324 libmesh_assert_greater_equal (n, this->
n_vertices());
325 libmesh_assert_less (n, this->
n_nodes());
338 libmesh_assert_less (v, 2);
344 constexpr unsigned short node_list[8][2] =
356 return node_list[n-5][v];
362 libmesh_assert_less (v, 4);
366 return cast_int<unsigned short>(v);
375 libmesh_assert_less (v, 3);
377 constexpr unsigned short node_list[4][3] =
385 return node_list[n-14][v];
389 libmesh_error_msg(
"Invalid n = " << n);
398 libmesh_assert_less (perm_num, 4);
400 for (
unsigned int i = 0; i != perm_num; ++i)
432 return side == 4 ? 13 : side+14;
438 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.
static constexpr const unsigned int(& edge_nodes_map)[num_edges][nodes_per_edge]
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
static constexpr const unsigned int(& side_nodes_map)[num_sides][nodes_per_side]
virtual bool is_vertex(const unsigned int i) const override
static const int num_nodes
Geometric constants for Pyramid18.
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE3 coincident with edge i.
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_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.