19 #include "libmesh/libmesh_config.h" 21 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 24 #include "libmesh/cell_inf_hex18.h" 25 #include "libmesh/edge_edge3.h" 26 #include "libmesh/edge_inf_edge2.h" 27 #include "libmesh/face_quad9.h" 28 #include "libmesh/face_inf_quad6.h" 29 #include "libmesh/enum_io_package.h" 30 #include "libmesh/enum_order.h" 44 { 0, 1, 2, 3, 8, 9, 10, 11, 16},
45 { 0, 1, 4, 5, 8, 12, 99, 99, 99},
46 { 1, 2, 5, 6, 9, 13, 99, 99, 99},
47 { 2, 3, 6, 7, 10, 14, 99, 99, 99},
48 { 3, 0, 7, 4, 11, 15, 99, 99, 99}
72 const unsigned int s)
const 74 libmesh_assert_less (s,
n_sides());
83 libmesh_assert_less(s,
n_sides());
84 auto trim = (s == 0) ? 0 : 3;
91 libmesh_assert_less(e,
n_edges());
92 auto trim = (e < 4) ? 0 : 1;
97 const unsigned int e)
const 99 libmesh_assert_less (e,
n_edges());
109 libmesh_assert_less (s, this->
n_sides());
124 libmesh_error_msg(
"Invalid side s = " << s);
131 unsigned int side_node)
const 133 libmesh_assert_less (side, this->
n_sides());
147 unsigned int edge_node)
const 149 libmesh_assert_less (edge, this->
n_edges());
164 libmesh_assert_less (i, this->
n_sides());
166 std::unique_ptr<Elem> face;
174 face = std::make_unique<Quad9>();
184 face = std::make_unique<InfQuad6>();
189 libmesh_error_msg(
"Invalid side i = " << i);
192 for (
auto n : face->node_index_range())
195 face->set_interior_parent(
this);
196 face->inherit_data_from(*
this);
204 const unsigned int i)
206 libmesh_assert_less (i, this->
n_sides());
214 if (!side.get() || side->type() !=
QUAD9)
228 if (!side.get() || side->type() !=
INFQUAD6)
237 libmesh_error_msg(
"Invalid side i = " << i);
240 side->inherit_data_from(*
this);
243 for (
auto n : side->node_index_range())
252 return this->simple_build_edge_ptr<Edge3,InfHex18>(i);
255 return this->simple_build_edge_ptr<InfEdge2,InfHex18>(i);
261 const unsigned int i)
263 libmesh_assert_less (i, this->
n_edges());
273 if (!edge.get() || edge->type() !=
EDGE3)
287 if (!edge.get() || edge->type() !=
INFEDGE2)
296 libmesh_error_msg(
"Invalid edge i = " << i);
299 edge->inherit_data_from(*
this);
302 for (
auto n : edge->node_index_range())
310 std::vector<dof_id_type> & conn)
const 375 libmesh_error_msg(
"Invalid sc = " << sc);
380 libmesh_error_msg(
"Unsupported IO package " << iop);
406 libmesh_error_msg(
"Invalid node n = " << n);
413 const unsigned int v)
const 415 libmesh_assert_greater_equal (n, this->
n_vertices());
416 libmesh_assert_less (n, this->
n_nodes());
427 return static_cast<unsigned short int>(v);
434 return static_cast<unsigned short int>(v+4);
447 std::pair<unsigned short int, unsigned short int>
450 libmesh_assert_greater_equal (n, this->
n_vertices());
451 libmesh_assert_less (n, this->
n_nodes());
457 return std::pair<unsigned short int, unsigned short int>
468 #ifdef LIBMESH_ENABLE_AMR 475 { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
476 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
477 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
478 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
479 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
480 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0},
481 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
482 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
483 { 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
484 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.375, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0},
485 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0},
486 { 0.375, 0.0, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
487 { 0.0, 0.0, 0.0, 0.0, 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0},
488 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.375, 0.0, -0.125, 0.0, 0.0, 0.75},
489 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.75},
490 { 0.0, 0.0, 0.0, 0.0, 0.375, 0.0, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0},
491 { 0.140625, -0.046875, 0.015625, -0.046875, 0.0, 0.0, 0.0, 0.0, 0.28125, -0.09375, -0.09375, 0.28125, 0.0, 0.0, 0.0,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 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
508 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.375, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0},
509 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.375, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0},
510 { 0.0, 0.0, 0.0, 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0},
511 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0},
512 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.375, 0.0, -0.125, 0.0, 0.75},
513 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.375, 0.0, -0.125, 0.0, 0.0, 0.75},
514 { -0.046875, 0.140625, -0.046875, 0.015625, 0.0, 0.0, 0.0, 0.0, 0.28125, 0.28125, -0.09375, -0.09375, 0.0, 0.0, 0.0, 0.0, 0.5625, 0.0},
515 { 0.0, 0.0, 0.0, 0.0, -0.046875, 0.140625, -0.046875, 0.015625, 0.0, 0.0, 0.0, 0.0, 0.28125, 0.28125, -0.09375, -0.09375, 0.0, 0.5625}
521 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
522 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
523 { 0.0, 0.0, 1.0, 0.0, 0.0, 0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.0, 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0},
535 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0},
536 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.0, 0.75},
537 { 0.015625, -0.046875, 0.140625, -0.046875, 0.0, 0.0, 0.0, 0.0, -0.09375, 0.28125, 0.28125, -0.09375, 0.0, 0.0, 0.0, 0.0, 0.5625, 0.0},
538 { 0.0, 0.0, 0.0, 0.0, 0.015625, -0.046875, 0.140625, -0.046875, 0.0, 0.0, 0.0, 0.0, -0.09375, 0.28125, 0.28125, -0.09375, 0.0, 0.5625}
544 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
545 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
546 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
547 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
548 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
549 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
550 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0},
551 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
552 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0},
553 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0},
554 { 0.0, 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
555 { -0.125, 0.0, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
556 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.75},
557 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.0, 0.75},
558 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0},
559 { 0.0, 0.0, 0.0, 0.0, -0.125, 0.0, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0},
560 { -0.046875, 0.015625, -0.046875, 0.140625, 0.0, 0.0, 0.0, 0.0, -0.09375, -0.09375, 0.28125, 0.28125, 0.0, 0.0, 0.0, 0.0, 0.5625, 0.0},
561 { 0.0, 0.0, 0.0, 0.0, -0.046875, 0.015625, -0.046875, 0.140625, 0.0, 0.0, 0.0, 0.0, -0.09375, -0.09375, 0.28125, 0.28125, 0.0, 0.5625}
572 libmesh_assert_less (perm_num, 4);
574 for (
unsigned int i = 0; i != perm_num; ++i)
607 libmesh_assert_less (s, 5);
616 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS static const int num_nodes
Geometric constants for InfHex18.
static const int nodes_per_edge
static const int num_children
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.
Order
defines an enum for polynomial orders.
static const int num_sides
Geometric constants for all InfHexes.
Node ** _nodes
Pointers to the nodes we are connected to.
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
virtual dof_id_type key() const
virtual unsigned int n_sub_elem() const override
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
virtual Order default_order() const override
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
The libMesh namespace provides an interface to certain functionality in the library.
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
static const unsigned short int _second_order_adjacent_vertices[8][2]
For higher-order elements, namely InfHex16 and InfHex18, the matrices for adjacent vertices of second...
static const int num_edges
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
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.
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
virtual unsigned int n_vertices() const override final
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
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
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
static const unsigned short int _second_order_vertex_child_index[18]
Vector that names the child vertex index for each second order node.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
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::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
void swap4neighbors(unsigned int n1, unsigned int n2, unsigned int n3, unsigned int n4)
Swaps four neighbor_ptrs, "rotating" them.
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 unsigned int n_edges() const override final
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
static dof_id_type compute_key(dof_id_type n0)
dof_id_type node_id(const unsigned int i) const
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
static const unsigned short int _second_order_vertex_child_number[18]
Vector that names a child sharing each second order node.
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
virtual unsigned int n_sides() const override final
virtual unsigned int n_nodes() const override