19 #include "libmesh/libmesh_config.h" 21 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 24 #include "libmesh/cell_inf_hex8.h" 25 #include "libmesh/edge_edge2.h" 26 #include "libmesh/edge_inf_edge2.h" 27 #include "libmesh/face_quad4.h" 28 #include "libmesh/face_inf_quad4.h" 29 #include "libmesh/side.h" 30 #include "libmesh/enum_io_package.h" 31 #include "libmesh/enum_order.h" 71 const unsigned int s)
const 73 libmesh_assert_less (s,
n_sides());
82 libmesh_assert_less(s,
n_sides());
89 libmesh_assert_less(e,
n_edges());
94 const unsigned int e)
const 96 libmesh_assert_less (e,
n_edges());
114 libmesh_assert_less (i, this->
n_sides());
116 std::unique_ptr<Elem> face;
119 #ifdef LIBMESH_ENABLE_DEPRECATED 120 libmesh_deprecated();
126 face = std::make_unique<Side<Quad4,InfHex8>>(
this,i);
136 face = std::make_unique<Side<InfQuad4,InfHex8>>(
this,i);
141 libmesh_error_msg(
"Invalid side i = " << i);
145 #endif // LIBMESH_ENABLE_DEPRECATED 154 face = std::make_unique<Quad4>();
164 face = std::make_unique<InfQuad4>();
169 libmesh_error_msg(
"Invalid side i = " << i);
173 for (
auto n : face->node_index_range())
174 face->set_node(n) = this->
node_ptr(InfHex8::side_nodes_map[i][n]);
177 #ifdef LIBMESH_ENABLE_DEPRECATED 180 face->set_parent(
nullptr);
181 face->set_interior_parent(
this);
185 #ifdef LIBMESH_ENABLE_AMR 186 face->set_p_level(this->
p_level());
194 const unsigned int i)
204 return this->simple_build_edge_ptr<Edge2,InfHex8>(i);
207 return this->simple_build_edge_ptr<InfEdge2,InfHex8>(i);
213 const unsigned int i)
215 libmesh_assert_less (i, this->
n_edges());
225 if (!edge.get() || edge->type() !=
EDGE2)
239 if (!edge.get() || edge->type() !=
INFEDGE2)
248 libmesh_error_msg(
"Invalid edge i = " << i);
253 #ifdef LIBMESH_ENABLE_AMR 254 edge->set_p_level(this->
p_level());
258 for (
auto n : edge->node_index_range())
259 edge->set_node(n) = this->
node_ptr(InfHex8::edge_nodes_map[i][n]);
266 std::vector<dof_id_type> & conn)
const 289 libmesh_error_msg(
"Unsupported IO package " << iop);
295 #ifdef LIBMESH_ENABLE_AMR 302 { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
303 { 0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
304 { 0.25, 0.25, 0.25, 0.25, 0.0, 0.0, 0.0, 0.0},
305 { 0.5, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0},
306 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0},
307 { 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0},
308 { 0.0, 0.0, 0.0, 0.0, 0.25, 0.25, 0.25, 0.25},
309 { 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.5}
315 { 0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
316 { 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
317 { 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0},
318 { 0.25, 0.25, 0.25, 0.25, 0.0, 0.0, 0.0, 0.0},
319 { 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0},
320 { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
321 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0},
322 { 0.0, 0.0, 0.0, 0.0, 0.25, 0.25, 0.25, 0.25}
328 { 0.25, 0.25, 0.25, 0.25, 0.0, 0.0, 0.0, 0.0},
329 { 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0},
330 { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0},
331 { 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0},
332 { 0.0, 0.0, 0.0, 0.0, 0.25, 0.25, 0.25, 0.25},
333 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0},
334 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
335 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5}
341 { 0.5, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0},
342 { 0.25, 0.25, 0.25, 0.25, 0.0, 0.0, 0.0, 0.0},
343 { 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0},
344 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0},
345 { 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.5},
346 { 0.0, 0.0, 0.0, 0.0, 0.25, 0.25, 0.25, 0.25},
347 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5},
348 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}
359 libmesh_assert_less (perm_num, 4);
361 for (
unsigned int i = 0; i != perm_num; ++i)
388 libmesh_assert_less (s, 5);
397 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index...
ElemType
Defines an enum for geometric element types.
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
void swap2boundaryedges(unsigned short e1, unsigned short e2, BoundaryInfo *boundary_info) const
Swaps two edges in boundary_info, if it is non-null.
ElemType side_type(const unsigned int s) const override final
Order
defines an enum for polynomial orders.
Node ** _nodes
Pointers to the nodes we are connected to.
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 void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
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 nodes_per_side
The libMesh namespace provides an interface to certain functionality in the library.
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
virtual std::unique_ptr< Elem > side_ptr(const unsigned int i) override final
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 connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
ElemMappingType mapping_type() const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
static const int num_children
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
virtual std::vector< unsigned int > nodes_on_side(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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const int num_sides
subdomain_id_type subdomain_id() const
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 unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the side to element node numbers.
virtual unsigned int n_edges() const override final
static const int num_edges
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=false) override
static const int num_nodes
Geometric constants for InfHex8.
dof_id_type node_id(const unsigned int i) const
static const int nodes_per_edge
virtual unsigned int n_sides() const override final
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override