19 #include "libmesh/libmesh_config.h" 21 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 28 #include "libmesh/cell_inf_hex.h" 29 #include "libmesh/cell_inf_hex8.h" 30 #include "libmesh/face_quad4.h" 31 #include "libmesh/face_inf_quad4.h" 32 #include "libmesh/fe_type.h" 33 #include "libmesh/fe_interface.h" 34 #include "libmesh/inf_fe_map.h" 35 #include "libmesh/enum_elem_quality.h" 88 libmesh_assert_less (s, this->
n_sides());
102 libmesh_assert_less (s, this->
n_sides());
115 unsigned int side_node)
const 117 libmesh_assert_less (side, this->
n_sides());
126 unsigned int edge_node)
const 128 libmesh_assert_less (edge, this->
n_edges());
138 libmesh_assert_less (i, this->
n_sides());
141 std::unique_ptr<Elem> face;
159 face = std::make_unique<Quad4>();
169 face = std::make_unique<InfQuad4>();
174 libmesh_error_msg(
"Invalid side i = " << i);
178 for (
auto n : face->node_index_range())
187 const unsigned int i)
189 libmesh_assert_less (i, this->
n_sides());
197 if (!side.get() || side->type() !=
QUAD4)
211 if (!side.get() || side->type() !=
INFQUAD4)
220 libmesh_error_msg(
"Invalid side i = " << i);
226 for (
auto n : side->node_index_range())
233 const unsigned int s)
const 236 libmesh_assert_less (s, this->
n_sides());
238 return (s == 0 || c+1 == s || c == s%4);
244 const unsigned int s)
const 246 libmesh_assert_less (e, this->
n_edges());
247 libmesh_assert_less (s, this->
n_sides());
256 libmesh_assert_less(e, this->
n_edges());
294 const Real min = std::min(d02, d13);
295 const Real max = std::max(d02, d13);
297 libmesh_assert_not_equal_to (max, 0.0);
322 std::vector<Real> edge_ratios(2);
325 edge_ratios[0] = std::min(d01, d23) / std::max(d01, d23);
326 edge_ratios[1] = std::min(d03, d12) / std::max(d03, d12);
328 return *(std::min_element(edge_ratios.begin(), edge_ratios.end())) ;
346 const Real sqrt3 = 1.73205080756888;
353 const Real max_diag = std::max(d02, d13);
355 libmesh_assert_not_equal_to ( max_diag, 0.0 );
360 std::vector<Real> edges(4);
361 edges[0] = this->
length(0,1);
362 edges[1] = this->
length(1,2);
363 edges[2] = this->
length(2,3);
364 edges[3] = this->
length(0,3);
366 const Real min_edge = *(std::min_element(edges.begin(), edges.end()));
367 return sqrt3 * min_edge / max_diag ;
384 libmesh_not_implemented();
452 return std::pair<Real,Real>();
476 99,99,99,99,99,99,99,99,
486 99,99,99,99,99,99,99,99,
514 const Real tmp_min_distance_sq = std::min(pt0_o.
norm_sq(),
523 const Real min_distance_sq = tmp_min_distance_sq
529 const Real conservative_p_dist_sq = 1.01 * (
Point(p - my_origin).
norm_sq());
533 if (conservative_p_dist_sq < min_distance_sq)
541 Point p_o(p - my_origin);
542 pt0_o /= pt0_o.
norm();
543 pt1_o /= pt1_o.
norm();
544 pt2_o /= pt2_o.
norm();
545 pt3_o /= pt3_o.
norm();
552 (pt1_o - pt3_o).
norm_sq())*1.01;
554 if ((p_o - pt0_o).
norm_sq() > max_h ||
555 (p_o - pt1_o).
norm_sq() > max_h ||
556 (p_o - pt2_o).
norm_sq() > max_h ||
557 (p_o - pt3_o).
norm_sq() > max_h )
578 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
virtual std::vector< unsigned int > sides_on_edge(const unsigned int e) const override final
virtual dof_id_type low_order_key(const unsigned int s) const override
auto norm() const -> decltype(std::norm(T()))
virtual dof_id_type key() const
virtual std::pair< Real, Real > qual_bounds(const ElemQuality q) const override
static const int nodes_per_side
virtual bool is_edge_on_side(const unsigned int e, const unsigned int s) const override final
The libMesh namespace provides an interface to certain functionality in the library.
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true)
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 std::unique_ptr< Elem > side_ptr(const unsigned int i) override final
static const Real _master_points[18][3]
Master element node locations.
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
auto norm_sq() const -> decltype(std::norm(T()))
Real length(const unsigned int n1, const unsigned int n2) const
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
ElemQuality
Defines an enum for element quality metrics.
virtual unsigned int n_children() const override final
static bool on_reference_element(const Point &p, const ElemType t, const Real eps=TOLERANCE)
virtual bool is_flipped() const override final
virtual Point origin() 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 int edge_sides_map[8][2]
This maps each edge to the sides that contain said edge.
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
subdomain_id_type subdomain_id() const
const Node * node_ptr(const unsigned int i) const
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const override
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const override final
virtual Real quality(const ElemQuality q) const
virtual unsigned short dim() const override
virtual Real quality(const ElemQuality q) const override
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 dof_id_type compute_key(dof_id_type n0)
virtual Order default_order() const =0
virtual ElemType type() const =0
A Point defines a location in LIBMESH_DIM dimensional Real space.
dof_id_type node_id(const unsigned int i) const
const Point & point(const unsigned int i) const
static const unsigned short int _second_order_vertex_child_number[18]
Vector that names a child sharing each second order node.
static const int nodes_per_edge
virtual unsigned int n_sides() const override final