18#include "libmesh/libmesh_config.h"
20#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
23#include "libmesh/cell_inf_prism.h"
24#include "libmesh/cell_inf_prism6.h"
25#include "libmesh/face_tri3.h"
26#include "libmesh/face_inf_quad4.h"
27#include "libmesh/fe_type.h"
28#include "libmesh/fe_interface.h"
29#include "libmesh/inf_fe_map.h"
30#include "libmesh/enum_order.h"
82 libmesh_assert_less (s, this->
n_sides());
100 libmesh_error_msg(
"Invalid side s = " << s);
108 libmesh_assert_less (s, this->
n_sides());
126 libmesh_error_msg(
"Invalid side s = " << s);
133 unsigned int side_node)
const
135 libmesh_assert_less (side, this->
n_sides());
149 unsigned int edge_node)
const
151 libmesh_assert_less(edge, this->
n_edges());
161 libmesh_assert_less (i, this->
n_sides());
163 std::unique_ptr<Elem> face;
169 face = std::make_unique<Tri3>();
177 face = std::make_unique<InfQuad4>();
182 libmesh_error_msg(
"Invalid side i = " << i);
186 for (
auto n : face->node_index_range())
195 const unsigned int i)
197 libmesh_assert_less (i, this->
n_sides());
204 if (!side.get() || side->type() !=
TRI3)
218 if (!side.get() || side->type() !=
INFQUAD4)
227 libmesh_error_msg(
"Invalid side i = " << i);
233 for (
auto n : side->node_index_range())
240 const unsigned int s)
const
243 libmesh_assert_less (s, this->
n_sides());
245 return (s == 0 || c+1 == s || c == s%3);
251 const unsigned int s)
const
253 libmesh_assert_less (e, this->
n_edges());
254 libmesh_assert_less (s, this->
n_sides());
280 const Real tmp_min_distance_sq = std::min(pt0_o.
norm_sq(),
288 const Real min_distance_sq = tmp_min_distance_sq
295 const Real conservative_p_dist_sq = 1.01 * (
Point(p - my_origin).
norm_sq());
297 if (conservative_p_dist_sq < min_distance_sq)
305 Point p_o(p - my_origin);
306 pt0_o /= pt0_o.
norm();
307 pt1_o /= pt1_o.
norm();
308 pt2_o /= pt2_o.
norm();
314 if ((p_o - pt0_o).norm_sq() > std::max((pt0_o - pt1_o).norm_sq(), (pt0_o - pt2_o).norm_sq()) ||
315 (p_o - pt1_o).norm_sq() > std::max((pt1_o - pt2_o).norm_sq(), (pt1_o - pt0_o).norm_sq()) ||
316 (p_o - pt2_o).norm_sq() > std::max((pt2_o - pt0_o).norm_sq(), (pt2_o - pt1_o).norm_sq()) )
338 libmesh_assert_less(e,
n_edges());
351std::vector<unsigned int>
354 libmesh_assert_less(n, this->
n_nodes());
363 auto trim = (n < 3) ? 0 : 2;
376 const Real eps)
const
378 const Real & xi = p(0);
379 const Real & eta = p(1);
380 const Real & zeta = p(2);
383 return ((xi >= 0.-eps) &&
387 ((xi + eta) <= 1.+eps));
const Point & point(const unsigned int i) const
virtual unsigned int n_nodes() const =0
virtual Order default_order() const =0
subdomain_id_type subdomain_id() const
static dof_id_type compute_key(dof_id_type n0)
bool is_internal(const unsigned int i) const
dof_id_type node_id(const unsigned int i) const
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
virtual Point origin() const override
virtual unsigned short dim() 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 int nodes_per_edge
static const int nodes_per_side
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 int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
std::vector< unsigned int > sides_on_edge(const unsigned int e) const override final
virtual unsigned int n_vertices() const override final
static const Real _master_points[12][3]
Master element node locations.
virtual std::unique_ptr< Elem > side_ptr(const unsigned int i) override final
static const int num_edges
virtual unsigned int n_edges() const override final
static const int num_sides
Geometric constants for all InfPrisms.
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
virtual std::vector< unsigned int > edges_adjacent_to_node(const unsigned int n) const override
virtual bool is_flipped() const override final
virtual bool on_reference_element(const Point &p, const Real eps=TOLERANCE) const override final
virtual bool is_vertex(const unsigned int i) const override final
We number vertices first.
virtual bool is_edge_on_side(const unsigned int e, const unsigned int s) const override final
static const unsigned int adjacent_edges_map[6][3]
This maps the node to the 3 (or fewer) edge ids adjacent to the node.
virtual dof_id_type key() const
Don't hide Elem::key() defined in the base class.
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const override final
virtual unsigned int n_sides() const override final
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
virtual dof_id_type low_order_key(const unsigned int s) const override
static const unsigned int edge_sides_map[6][2]
This maps each edge to the sides that contain said edge.
virtual unsigned int n_children() const override final
virtual bool is_edge(const unsigned int i) const override final
We number edges next.
static const int num_children
virtual bool is_face(const unsigned int i) const override final
We number faces last.
virtual bool contains_point(const Point &p, Real tol=TOLERANCE) const override
A Point defines a location in LIBMESH_DIM dimensional Real space.
The libMesh namespace provides an interface to certain functionality in the library.
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real