20 #include "libmesh/cell_pyramid5.h" 21 #include "libmesh/edge_edge2.h" 22 #include "libmesh/face_tri3.h" 23 #include "libmesh/face_quad4.h" 24 #include "libmesh/enum_io_package.h" 25 #include "libmesh/enum_order.h" 26 #include "libmesh/cell_hex8.h" 81 const unsigned int s)
const 83 libmesh_assert_less (s,
n_sides());
92 libmesh_assert_less(s,
n_sides());
93 auto trim = (s == 4) ? 0 : 1;
100 libmesh_assert_less(e,
n_edges());
105 const unsigned int e)
const 107 libmesh_assert_less (e,
n_edges());
133 libmesh_assert_less (i, this->
n_sides());
135 std::unique_ptr<Elem> face;
144 face = std::make_unique<Tri3>();
149 face = std::make_unique<Quad4>();
153 libmesh_error_msg(
"Invalid side i = " << i);
157 for (
auto n : face->node_index_range())
160 face->set_interior_parent(
this);
161 face->inherit_data_from(*
this);
169 const unsigned int i)
172 side->set_interior_parent(
this);
173 side->inherit_data_from(*
this);
180 return this->simple_build_edge_ptr<Edge2,Pyramid5>(i);
187 this->simple_build_edge_ptr<Pyramid5>(edge, i,
EDGE2);
194 std::vector<dof_id_type> & conn)
const 228 libmesh_error_msg(
"Unsupported IO package " << iop);
276 libmesh_assert_less (perm_num, 4);
278 for (
unsigned int i = 0; i != perm_num; ++i)
302 libmesh_assert_less (s, 5);
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE2 built coincident with edge i.
ElemType side_type(const unsigned int s) const override final
virtual Point true_centroid() const override
We compute the centroid of the Pyramid by treating it as a degenerate Hex8 element.
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
ElemType
Defines an enum for geometric element types.
void swap2boundaryedges(unsigned short e1, unsigned short e2, BoundaryInfo *boundary_info) const
Swaps two edges in boundary_info, if it is non-null.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
Order
defines an enum for polynomial orders.
Node ** _nodes
Pointers to the nodes we are connected to.
virtual bool is_face(const unsigned int i) const override
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
static const int num_edges
virtual BoundingBox loose_bounding_box() const override
Builds a bounding box out of the nodal positions.
static const int nodes_per_edge
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the edge to element node numbers.
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
virtual BoundingBox loose_bounding_box() const
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual Real volume() const override
Specialization for computing the volume of a pyramid.
virtual unsigned int n_sides() const override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
virtual bool has_affine_map() const override
virtual bool is_edge(const unsigned int i) const override
The libMesh namespace provides an interface to certain functionality in the library.
static const int num_nodes
Geometric constants for Pyramid5.
virtual std::unique_ptr< Elem > side_ptr(const unsigned int i) override
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
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.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
static const int nodes_per_side
static const int num_sides
Geometric constants for all Pyramids.
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
Defines a Cartesian bounding box by the two corner extremum.
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned int n_edges() const override
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Builds a QUAD4 or TRI3 built coincident with face i.
virtual bool is_vertex(const unsigned int i) const override
void swap4neighbors(unsigned int n1, unsigned int n2, unsigned int n3, unsigned int n4)
Swaps four neighbor_ptrs, "rotating" them.
static Point centroid_from_points(const Point &x0, const Point &x1, const Point &x2, const Point &x3, const Point &x4, const Point &x5, const Point &x6, const Point &x7)
Class static helper function that computes the centroid of a hexahedral region from a set of input po...
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
virtual unsigned int n_sub_elem() const override
A Point defines a location in LIBMESH_DIM dimensional Real space.
dof_id_type node_id(const unsigned int i) const
const Point & point(const unsigned int i) const
virtual Order default_order() const override