20#include "libmesh/cell_prism20.h"
21#include "libmesh/edge_edge3.h"
22#include "libmesh/face_quad9.h"
23#include "libmesh/face_tri7.h"
24#include "libmesh/enum_io_package.h"
25#include "libmesh/enum_order.h"
26#include "libmesh/int_range.h"
41 {0, 2, 1, 8, 7, 6, 18, 99, 99},
42 {0, 1, 4, 3, 6, 10, 12, 9, 15},
43 {1, 2, 5, 4, 7, 11, 13, 10, 16},
44 {2, 0, 3, 5, 8, 9, 14, 11, 17},
45 {3, 4, 5, 12, 13, 14, 19, 99, 99}
88 const unsigned int s)
const
90 libmesh_assert_less (s,
n_sides());
99 libmesh_assert_less(s,
n_sides());
100 auto trim = (s > 0 && s < 4) ? 0 : 2;
107 libmesh_assert_less(e,
n_edges());
112 const unsigned int e)
const
114 libmesh_assert_less (e,
n_edges());
172 libmesh_assert_less (s, this->
n_sides());
197 libmesh_error_msg(
"Invalid side " << s);
204 unsigned int side_node)
const
206 libmesh_assert_less (side, this->
n_sides());
220 unsigned int edge_node)
const
222 libmesh_assert_less(edge, this->
n_edges());
232 libmesh_assert_less (i, this->
n_sides());
234 std::unique_ptr<Elem> face;
241 face = std::make_unique<Tri7>();
248 face = std::make_unique<Quad9>();
252 libmesh_error_msg(
"Invalid side i = " << i);
256 for (
auto n : face->node_index_range())
259 face->set_interior_parent(
this);
260 face->inherit_data_from(*
this);
268 const unsigned int i)
270 libmesh_assert_less (i, this->
n_sides());
277 if (!side.get() || side->type() !=
TRI7)
289 if (!side.get() || side->type() !=
QUAD9)
298 libmesh_error_msg(
"Invalid side i = " << i);
301 side->inherit_data_from(*
this);
304 for (
auto n : side->node_index_range())
312 return this->simple_build_edge_ptr<Edge3,Prism20>(i);
319 this->simple_build_edge_ptr<Prism20>(edge, i,
EDGE3);
326 std::vector<dof_id_type> & )
const
328 libmesh_not_implemented();
520 libmesh_error_msg(
"Invalid node n = " << n);
529 const unsigned int v)
const
531 libmesh_assert_greater_equal (n, this->
n_vertices());
532 libmesh_assert_less (n, this->
n_nodes());
547 libmesh_assert_less (v, 4);
559 libmesh_assert_less (v, 2);
565 return static_cast<unsigned short int>(-1);
581std::pair<unsigned short int, unsigned short int>
584 libmesh_assert_greater_equal (n, this->
n_vertices());
585 libmesh_assert_less (n, this->
n_nodes());
587 return std::pair<unsigned short int, unsigned short int>
597 libmesh_assert_less (perm_num, 6);
598 const unsigned int side = perm_num % 2;
599 const unsigned int rotate = perm_num / 2;
601 for (
unsigned int i = 0; i != rotate; ++i)
656 if (side >= 1 && side <= 3)
667 libmesh_assert_less (s, 5);
668 if (s == 0 || s == 4)
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
static constexpr Real affine_tol
Default tolerance to use in has_affine_map().
const Point & point(const unsigned int i) const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
void swap3neighbors(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three neighbor_ptrs, "rotating" them.
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 swap3nodes(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three node_ptrs, "rotating" them.
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
A Point defines a location in LIBMESH_DIM dimensional Real space.
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
virtual bool is_face(const unsigned int i) const override
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE3 or INFEDGE2 built coincident with edge i.
virtual Order default_order() const override
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the edge to element node numbers.
static const int nodes_per_side
virtual bool is_edge(const unsigned int i) const override
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
unsigned int center_node_on_side(const unsigned short side) const override final
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
virtual unsigned int n_nodes() const override
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
virtual dof_id_type key() const
Don't hide Elem::key() defined in the base class.
virtual bool is_vertex(const unsigned int i) const override
static const int nodes_per_edge
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Builds a QUAD9 or TRI6 built coincident with face i.
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
ElemType side_type(const unsigned int s) const override final
virtual bool has_affine_map() const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index.
static const int num_nodes
Geometric constants for Prism20.
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const override
static const unsigned short int _remaining_second_order_adjacent_vertices[5][4]
Matrix that tells which vertices define the location of mid-side (or second-order) nodes.
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
virtual unsigned int n_vertices() const override final
virtual unsigned int n_edges() const override final
virtual unsigned int n_sides() const override final
static const unsigned short int _second_order_vertex_child_number[18]
Vector that names a child sharing each second order node.
static const int num_edges
static const int num_sides
Geometric constants for all Prisms.
static const unsigned short int _second_order_adjacent_vertices[9][2]
Matrix that tells which vertices define the location of mid-side (or second-order) nodes.
static const unsigned short int _second_order_vertex_child_index[18]
Vector that names the child vertex index for each second order node.
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
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.