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"
66 const unsigned int s)
const
68 libmesh_assert_less (s,
n_sides());
77 libmesh_assert_less(s,
n_sides());
78 auto trim = (s > 0 && s < 4) ? 0 : 2;
85 libmesh_assert_less(e,
n_edges());
90 const unsigned int e)
const
92 libmesh_assert_less (e,
n_edges());
150 libmesh_assert_less (s, this->
n_sides());
175 libmesh_error_msg(
"Invalid side " << s);
182 unsigned int side_node)
const
184 libmesh_assert_less (side, this->
n_sides());
198 unsigned int edge_node)
const
200 libmesh_assert_less(edge, this->
n_edges());
210 libmesh_assert_less (i, this->
n_sides());
212 std::unique_ptr<Elem> face;
219 face = std::make_unique<Tri7>();
226 face = std::make_unique<Quad9>();
230 libmesh_error_msg(
"Invalid side i = " << i);
234 for (
auto n : face->node_index_range())
237 face->set_interior_parent(
this);
238 face->inherit_data_from(*
this);
246 const unsigned int i)
248 libmesh_assert_less (i, this->
n_sides());
255 if (!side.get() || side->type() !=
TRI7)
267 if (!side.get() || side->type() !=
QUAD9)
276 libmesh_error_msg(
"Invalid side i = " << i);
279 side->inherit_data_from(*
this);
282 for (
auto n : side->node_index_range())
290 return this->simple_build_edge_ptr<Edge3,Prism20>(i);
297 this->simple_build_edge_ptr<Prism20>(edge, i,
EDGE3);
304 std::vector<dof_id_type> & )
const
306 libmesh_not_implemented();
498 libmesh_error_msg(
"Invalid node n = " << n);
507 const unsigned int v)
const
509 libmesh_assert_greater_equal (n, this->
n_vertices());
510 libmesh_assert_less (n, this->
n_nodes());
525 libmesh_assert_less (v, 4);
537 libmesh_assert_less (v, 2);
543 return static_cast<unsigned short int>(-1);
559std::pair<unsigned short int, unsigned short int>
562 libmesh_assert_greater_equal (n, this->
n_vertices());
563 libmesh_assert_less (n, this->
n_nodes());
565 return std::pair<unsigned short int, unsigned short int>
575 libmesh_assert_less (perm_num, 6);
576 const unsigned int side = perm_num % 2;
577 const unsigned int rotate = perm_num / 2;
579 for (
unsigned int i = 0; i != rotate; ++i)
634 if (side >= 1 && side <= 3)
645 libmesh_assert_less (s, 5);
646 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 int nodes_per_side
static constexpr const unsigned int(& edge_nodes_map)[num_edges][nodes_per_edge]
virtual bool is_edge(const unsigned int i) const override
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
static constexpr const unsigned int(& side_nodes_map)[num_sides][nodes_per_side]
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_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.