18#include "libmesh/libmesh_config.h"
20#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
23#include "libmesh/cell_inf_prism12.h"
24#include "libmesh/edge_edge3.h"
25#include "libmesh/edge_inf_edge2.h"
26#include "libmesh/face_tri6.h"
27#include "libmesh/face_inf_quad6.h"
28#include "libmesh/enum_io_package.h"
29#include "libmesh/enum_order.h"
63 const unsigned int s)
const
65 libmesh_assert_less (s,
n_sides());
74 libmesh_assert_less(s,
n_sides());
81 libmesh_assert_less(e,
n_edges());
82 auto trim = (e < 3) ? 0 : 1;
87 const unsigned int e)
const
89 libmesh_assert_less (e,
n_edges());
101 unsigned int side_node)
const
103 libmesh_assert_less (side, this->
n_sides());
114 unsigned int edge_node)
const
116 libmesh_assert_less (edge, this->
n_edges());
131 libmesh_assert_less (i, this->
n_sides());
133 std::unique_ptr<Elem> face;
139 face = std::make_unique<Tri6>();
147 face = std::make_unique<InfQuad6>();
152 libmesh_error_msg(
"Invalid side i = " << i);
156 for (
auto n : face->node_index_range())
159 face->set_interior_parent(
this);
160 face->inherit_data_from(*
this);
167 const unsigned int i)
169 libmesh_assert_less (i, this->
n_sides());
175 if (!side.get() || side->type() !=
TRI6)
187 if (!side.get() || side->type() !=
INFQUAD6)
196 libmesh_error_msg(
"Invalid side i = " << i);
199 side->inherit_data_from(*
this);
202 for (
auto n : side->node_index_range())
211 return this->simple_build_edge_ptr<Edge3,InfPrism12>(i);
214 return this->simple_build_edge_ptr<InfEdge2,InfPrism12>(i);
220 const unsigned int i)
222 libmesh_assert_less (i, this->
n_edges());
231 if (!edge.get() || edge->type() !=
EDGE3)
244 if (!edge.get() || edge->type() !=
INFEDGE2)
253 libmesh_error_msg(
"Invalid edge i = " << i);
256 edge->inherit_data_from(*
this);
259 for (
auto n : edge->node_index_range())
267 std::vector<dof_id_type> & conn)
const
334 libmesh_error_msg(
"Invalid sc = " << sc);
339 libmesh_error_msg(
"Unsupported IO package " << iop);
348 const unsigned int v)
const
350 libmesh_assert_greater_equal (n, this->
n_vertices());
351 libmesh_assert_less (n, this->
n_nodes());
352 libmesh_assert_less (v, 2);
371std::pair<unsigned short int, unsigned short int>
374 libmesh_assert_greater_equal (n, this->
n_vertices());
375 libmesh_assert_less (n, this->
n_nodes());
377 return std::pair<unsigned short int, unsigned short int>
402#ifdef LIBMESH_ENABLE_AMR
409 { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
410 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0},
411 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0},
412 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
413 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
414 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
415 { 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0},
416 { 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.5, 0.25, 0.5, 0.0, 0.0, 0.0},
417 { 0.375, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0},
418 { 0.0, 0.0, 0.0, 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0},
419 { 0.0, 0.0, 0.0, 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.5, 0.25, 0.5},
420 { 0.0, 0.0, 0.0, 0.375, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75}
426 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0},
427 { 0.0, 1.0, 0.0, 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0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
449 { -0.125, -0.125, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.5, 0.0, 0.0, 0.0},
450 { 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0},
451 { -0.125, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0},
452 { 0.0, 0.0, 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.5},
453 { 0.0, 0.0, 0.0, 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0},
454 { 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75}
460 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0},
461 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0},
462 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0},
463 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
464 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
465 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
466 { -0.125, 0.0, -0.125, 0.0, 0.0, 0.0, 0.5, 0.5, 0.25, 0.0, 0.0, 0.0},
467 { -0.125, -0.125, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.5, 0.0, 0.0, 0.0},
468 { 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.5, 0.25, 0.5, 0.0, 0.0, 0.0},
469 { 0.0, 0.0, 0.0, -0.125, 0.0, -0.125, 0.0, 0.0, 0.0, 0.5, 0.5, 0.25},
470 { 0.0, 0.0, 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.5},
471 { 0.0, 0.0, 0.0, 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.5, 0.25, 0.5}
483 libmesh_assert_less (perm_num, 3);
485 for (
unsigned int i = 0; i != perm_num; ++i)
514 libmesh_assert_less (s, 4);
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
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.
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.
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
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
ElemType side_type(const unsigned int s) const override final
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) 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 std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
static const int nodes_per_edge
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
static const int nodes_per_side
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
static const unsigned short int _second_order_vertex_child_number[num_nodes]
Vector that names a child sharing each second order node.
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
static const int num_nodes
Geometric constants for InfPrism12.
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the edge to element node numbers.
virtual unsigned int n_sub_elem() const override
virtual unsigned int n_nodes() const override
virtual Order default_order() const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) 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 short int _second_order_adjacent_vertices[num_edges][2]
Matrix that tells which vertices define the location of mid-side (or second-order) nodes.
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
static const unsigned short int _second_order_vertex_child_index[num_nodes]
Vector that names the child vertex index for each second order node.
virtual unsigned int n_vertices() const override final
static const int num_edges
virtual unsigned int n_edges() const override final
static const int num_sides
Geometric constants for all InfPrisms.
virtual unsigned int n_sides() const override final
static const int num_children
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real