19 #include "libmesh/libmesh_config.h" 21 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 24 #include "libmesh/cell_inf_hex16.h" 25 #include "libmesh/edge_edge3.h" 26 #include "libmesh/edge_inf_edge2.h" 27 #include "libmesh/face_quad8.h" 28 #include "libmesh/face_inf_quad6.h" 29 #include "libmesh/side.h" 30 #include "libmesh/enum_io_package.h" 31 #include "libmesh/enum_order.h" 48 { 0, 1, 2, 3, 8, 9, 10, 11},
49 { 0, 1, 4, 5, 8, 12, 99, 99},
50 { 1, 2, 5, 6, 9, 13, 99, 99},
51 { 2, 3, 6, 7, 10, 14, 99, 99},
52 { 3, 0, 7, 4, 11, 15, 99, 99}
71 const unsigned int s)
const 73 libmesh_assert_less (s,
n_sides());
82 libmesh_assert_less(s,
n_sides());
83 auto trim = (s == 0) ? 0 : 2;
90 libmesh_assert_less(e,
n_edges());
91 auto trim = (e < 4) ? 0 : 1;
96 const unsigned int e)
const 98 libmesh_assert_less (e,
n_edges());
114 unsigned int side_node)
const 116 libmesh_assert_less (side, this->
n_sides());
130 unsigned int edge_node)
const 132 libmesh_assert_less (edge, this->
n_edges());
148 libmesh_assert_less (i, this->
n_sides());
150 std::unique_ptr<Elem> face;
153 #ifdef LIBMESH_ENABLE_DEPRECATED 154 libmesh_deprecated();
160 face = std::make_unique<Side<Quad8,InfHex16>>(
this,i);
170 face = std::make_unique<Side<InfQuad6,InfHex16>>(
this,i);
175 libmesh_error_msg(
"Invalid side i = " << i);
179 #endif // LIBMESH_ENABLE_DEPRECATED 189 face = std::make_unique<Quad8>(
this);
199 face = std::make_unique<InfQuad6>(
this);
204 libmesh_error_msg(
"Invalid side i = " << i);
208 for (
auto n : face->node_index_range())
209 face->set_node(n) = this->
node_ptr(InfHex16::side_nodes_map[i][n]);
212 #ifdef LIBMESH_ENABLE_DEPRECATED 215 face->set_parent(
nullptr);
216 face->set_interior_parent(
this);
220 #ifdef LIBMESH_ENABLE_AMR 221 face->set_p_level(this->
p_level());
230 const unsigned int i)
232 libmesh_assert_less (i, this->
n_sides());
240 if (!side.get() || side->type() !=
QUAD8)
254 if (!side.get() || side->type() !=
INFQUAD6)
263 libmesh_error_msg(
"Invalid side i = " << i);
270 for (
auto n : side->node_index_range())
271 side->set_node(n) = this->
node_ptr(InfHex16::side_nodes_map[i][n]);
279 return this->simple_build_edge_ptr<Edge3,InfHex16>(i);
282 return this->simple_build_edge_ptr<InfEdge2,InfHex16>(i);
288 const unsigned int i)
290 libmesh_assert_less (i, this->
n_edges());
300 if (!edge.get() || edge->type() !=
EDGE3)
314 if (!edge.get() || edge->type() !=
INFEDGE2)
323 libmesh_error_msg(
"Invalid edge i = " << i);
328 #ifdef LIBMESH_ENABLE_AMR 329 edge->set_p_level(this->
p_level());
333 for (
auto n : edge->node_index_range())
334 edge->set_node(n) = this->
node_ptr(InfHex16::edge_nodes_map[i][n]);
341 std::vector<dof_id_type> & conn)
const 366 libmesh_error_msg(
"Invalid sc = " << sc);
371 libmesh_error_msg(
"Unsupported IO package " << iop);
379 const unsigned int v)
const 381 libmesh_assert_greater_equal (n, this->
n_vertices());
382 libmesh_assert_less (n, this->
n_nodes());
383 libmesh_assert_less (v, 2);
391 std::pair<unsigned short int, unsigned short int>
394 libmesh_assert_greater_equal (n, this->
n_vertices());
395 libmesh_assert_less (n, this->
n_nodes());
401 return std::pair<unsigned short int, unsigned short int>
410 #ifdef LIBMESH_ENABLE_AMR 417 { 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},
418 { 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},
419 { -0.25, -0.25, -0.25, -0.25, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0},
420 { 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},
421 { 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},
422 { 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},
423 { 0.0, 0.0, 0.0, 0.0, -0.25, -0.25, -0.25, -0.25, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.5},
424 { 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},
425 { 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},
426 { -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.75, 0.375, 0.25, 0.375, 0.0, 0.0, 0.0, 0.0},
427 { -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.375, 0.25, 0.375, 0.75, 0.0, 0.0, 0.0, 0.0},
428 { 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},
429 { 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},
430 { 0.0, 0.0, 0.0, 0.0, -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.75, 0.375, 0.25, 0.375},
431 { 0.0, 0.0, 0.0, 0.0, -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.375, 0.25, 0.375, 0.75},
432 { 0.0, 0.0, 0.0, 0.0, 0.375, 0.0, 0.0, -0.125, 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.0, 0.0, 0.0, 1.0, 0.0},
467 { -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.375, 0.75, 0.375, 0.25, 0.0, 0.0, 0.0, 0.0},
468 { 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},
469 { 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},
470 { -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.25, 0.375, 0.75, 0.375, 0.0, 0.0, 0.0, 0.0},
471 { 0.0, 0.0, 0.0, 0.0, -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.375, 0.75, 0.375, 0.25},
472 { 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},
473 { 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},
474 { 0.0, 0.0, 0.0, 0.0, -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.25, 0.375, 0.75, 0.375}
480 { 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},
481 { -0.25, -0.25, -0.25, -0.25, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0},
482 { 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},
483 { 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},
484 { 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},
485 { 0.0, 0.0, 0.0, 0.0, -0.25, -0.25, -0.25, -0.25, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, 0.5},
486 { 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},
487 { 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},
488 { -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.375, 0.25, 0.375, 0.75, 0.0, 0.0, 0.0, 0.0},
489 { -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.25, 0.375, 0.75, 0.375, 0.0, 0.0, 0.0, 0.0},
490 { 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},
491 { -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},
492 { 0.0, 0.0, 0.0, 0.0, -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.375, 0.25, 0.375, 0.75},
493 { 0.0, 0.0, 0.0, 0.0, -0.1875, -0.1875, -0.1875, -0.1875, 0.0, 0.0, 0.0, 0.0, 0.25, 0.375, 0.75, 0.375},
494 { 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},
495 { 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}
506 libmesh_assert_less (perm_num, 4);
508 for (
unsigned int i = 0; i != perm_num; ++i)
539 libmesh_assert_less (s, 5);
548 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 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.
Node ** _nodes
Pointers to the nodes we are connected to.
static const int nodes_per_edge
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) 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_side(const unsigned int s) const override
static const int num_edges
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
unsigned int p_level() const
static const int num_nodes
Geometric constants for InfHex16.
The libMesh namespace provides an interface to certain functionality in the library.
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 unsigned short int _second_order_adjacent_vertices[8][2]
For higher-order elements, namely InfHex16 and InfHex18, the matrices for adjacent vertices of second...
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
virtual Order default_order() const override
void swap4nodes(unsigned int n1, unsigned int n2, unsigned int n3, unsigned int n4)
Swaps four node_ptrs, "rotating" them.
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
ElemMappingType mapping_type() const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
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 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
static const int num_children
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index...
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
virtual unsigned int n_vertices() const override final
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
virtual unsigned int n_sub_elem() const override
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
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
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
subdomain_id_type subdomain_id() const
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual unsigned int n_nodes() const override
const Node * node_ptr(const unsigned int i) const
void swap4neighbors(unsigned int n1, unsigned int n2, unsigned int n3, unsigned int n4)
Swaps four neighbor_ptrs, "rotating" them.
static const int nodes_per_side
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=false) override
static const int num_sides
virtual unsigned int n_edges() const override final
dof_id_type node_id(const unsigned int i) const
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
static const unsigned short int _second_order_vertex_child_number[18]
Vector that names a child sharing each second order node.
virtual unsigned int n_sides() const override final