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/enum_io_package.h" 30 #include "libmesh/enum_order.h" 67 const unsigned int s)
const 69 libmesh_assert_less (s,
n_sides());
78 libmesh_assert_less(s,
n_sides());
85 libmesh_assert_less(e,
n_edges());
90 const unsigned int e)
const 92 libmesh_assert_less (e,
n_edges());
109 libmesh_assert_less (i, this->
n_sides());
111 std::unique_ptr<Elem> face;
118 face = std::make_unique<Quad4>();
128 face = std::make_unique<InfQuad4>();
133 libmesh_error_msg(
"Invalid side i = " << i);
137 for (
auto n : face->node_index_range())
140 face->set_interior_parent(
this);
141 face->inherit_data_from(*
this);
148 const unsigned int i)
151 side->set_interior_parent(
this);
152 side->inherit_data_from(*
this);
160 return this->simple_build_edge_ptr<Edge2,InfHex8>(i);
163 return this->simple_build_edge_ptr<InfEdge2,InfHex8>(i);
169 const unsigned int i)
171 libmesh_assert_less (i, this->
n_edges());
181 if (!edge.get() || edge->type() !=
EDGE2)
195 if (!edge.get() || edge->type() !=
INFEDGE2)
204 libmesh_error_msg(
"Invalid edge i = " << i);
207 edge->inherit_data_from(*
this);
210 for (
auto n : edge->node_index_range())
218 std::vector<dof_id_type> & conn)
const 241 libmesh_error_msg(
"Unsupported IO package " << iop);
247 #ifdef LIBMESH_ENABLE_AMR 254 { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
255 { 0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
256 { 0.25, 0.25, 0.25, 0.25, 0.0, 0.0, 0.0, 0.0},
257 { 0.5, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0},
258 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0},
259 { 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0, 0.0, 0.5, 0.0, 0.0, 0.5},
298 { 0.0, 0.0, 0.0, 0.0, 0.25, 0.25, 0.25, 0.25},
299 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5},
300 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}
311 libmesh_assert_less (perm_num, 4);
313 for (
unsigned int i = 0; i != perm_num; ++i)
342 libmesh_assert_less (s, 5);
351 #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...
static const int num_children
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.
static const int num_sides
Geometric constants for all InfHexes.
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.
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
static const int num_edges
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
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
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
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
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_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