19#include "libmesh/edge_edge3.h"
20#include "libmesh/face_tri6.h"
21#include "libmesh/enum_io_package.h"
22#include "libmesh/enum_order.h"
36#ifdef LIBMESH_ENABLE_AMR
43 { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0},
44 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
45 { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
46 {.375, -.125, 0.0, .75, 0.0, 0.0},
47 { 0.0, -.125, -.125, 0.5, .25, 0.5},
48 {.375, 0.0, -.125, 0.0, 0.0, .75}
54 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
55 { 0.0, 1.0, 0.0, 0.0, 0.0, 0.0},
56 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
57 {-.125, .375, 0.0, .75, 0.0, 0.0},
58 { 0.0, .375, -.125, 0.0, .75, 0.0},
59 {-.125, 0.0, -.125, 0.5, 0.5, .25}
65 { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
66 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
67 { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0},
68 {-.125, -.125, 0.0, .25, 0.5, 0.5},
69 { 0.0, -.125, .375, 0.0, .75, 0.0},
70 {-.125, 0.0, .375, 0.0, 0.0, .75}
76 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
77 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
78 { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
79 {-.125, 0.0, -.125, 0.5, 0.5, .25},
80 {-.125, -.125, 0.0, .25, 0.5, 0.5},
81 { 0.0, -.125, -.125, 0.5, .25, 0.5}
112 const unsigned int s)
const
114 libmesh_assert_less (s,
n_sides());
123 libmesh_assert_less(s,
n_sides());
138 ((this->point(3) - this->point(0))*2,
affine_tol))
142 ((this->point(4) - this->point(1))*2,
affine_tol))
146 ((this->point(5) - this->point(0))*2,
affine_tol))
163 libmesh_assert_less (s, this->
n_sides());
183 libmesh_error_msg(
"Invalid side s = " << s);
190 unsigned int side_node)
const
192 libmesh_assert_less (side, this->
n_sides());
202 return this->simple_build_side_ptr<Edge3, Tri6>(i);
208 const unsigned int i)
210 this->simple_build_side_ptr<Tri6>(side, i,
EDGE3);
217 std::vector<dof_id_type> & conn)
const
266 libmesh_error_msg(
"Invalid sf = " << sf);
280 libmesh_error_msg(
"Unsupported IO package " << iop);
297 for (
unsigned d=0; d<LIBMESH_DIM; ++d)
300 for (
unsigned int p=1; p != 6; ++p)
301 center += this->
point(p)(d);
304 Real hd = std::abs(center - this->
point(0)(d));
305 for (
unsigned int p=1; p != 6; ++p)
306 hd = std::max(hd, std::abs(center - this->
point(p)(d)));
308 pmin(d) = center - hd;
309 pmax(d) = center + hd;
336 a1 = 4*x0 + 4*x1 - 8*x3,
337 b1 = 4*x0 - 4*x3 + 4*x4 - 4*x5,
338 c1 = -3*x0 - 1*x1 + 4*x3,
339 b2 = 4*x0 + 4*x2 - 8*x5,
340 c2 = -3*x0 - 1*x2 + 4*x5;
345 b1.relative_fuzzy_equals(
Point(0,0,0)) &&
346 b2.relative_fuzzy_equals(
Point(0,0,0)))
350 const unsigned int N = 7;
354 w1 =
Real(31)/480 + std::sqrt(
Real(15))/2400,
355 w2 =
Real(31)/480 - std::sqrt(
Real(15))/2400,
356 q1 =
Real(2)/7 + std::sqrt(
Real(15))/21,
357 q2 =
Real(2)/7 - std::sqrt(
Real(15))/21;
359 static const Real xi[N] = {
Real(1)/3, q1, q1, 1-2*q1, q2, q2, 1-2*q2};
360 static const Real eta[N] = {
Real(1)/3, q1, 1-2*q1, q1, q2, 1-2*q2, q2};
361 static const Real wts[N] = {
Real(9)/80, w1, w1, w1, w2, w2, w2};
364 for (
unsigned int q=0; q<N; ++q)
365 vol += wts[q] *
cross_norm(xi[q]*a1 + eta[q]*b1 + c1,
366 xi[q]*b1 + eta[q]*b2 + c2);
375 const unsigned int v)
const
377 libmesh_assert_greater_equal (n, this->
n_vertices());
378 libmesh_assert_less (n, this->
n_nodes());
379 libmesh_assert_less (v, 2);
394std::pair<unsigned short int, unsigned short int>
397 libmesh_assert_greater_equal (n, this->
n_vertices());
398 libmesh_assert_less (n, this->
n_nodes());
399 return std::pair<unsigned short int, unsigned short int>
423 libmesh_assert_less (perm_num, 3);
425 for (
unsigned int i = 0; i != perm_num; ++i)
456 libmesh_assert_less (s, 3);
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
Defines a Cartesian bounding box by the two corner extremum.
static constexpr Real affine_tol
Default tolerance to use in has_affine_map().
const Point & point(const unsigned int i) const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
void swap3neighbors(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three neighbor_ptrs, "rotating" them.
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
ElemMappingType mapping_type() const
static dof_id_type compute_key(dof_id_type n0)
void swap3nodes(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three node_ptrs, "rotating" them.
virtual Real volume() const
void swap2boundaryedges(unsigned short e1, unsigned short e2, BoundaryInfo *boundary_info) const
Swaps two edges in boundary_info, if it is non-null.
dof_id_type node_id(const unsigned int i) const
A Point defines a location in LIBMESH_DIM dimensional Real space.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
virtual bool has_affine_map() const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual bool is_edge(const unsigned int i) const override
static const int nodes_per_side
virtual bool is_vertex(const unsigned int i) const override
unsigned int center_node_on_side(const unsigned short side) const override final
ElemType side_type(const unsigned int s) const override final
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 unsigned short int _second_order_adjacent_vertices[num_sides][2]
Matrix that tells which vertices define the location of mid-side (or second-order) nodes.
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
virtual bool is_face(const unsigned int i) const override
static const unsigned short int _second_order_vertex_child_index[num_nodes]
Vector that names the child vertex index for each second order node.
virtual dof_id_type key() const
Don't hide Elem::key() defined in the base class.
virtual BoundingBox loose_bounding_box() const override
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
static const int num_nodes
Geometric constants for Tri6.
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
static const unsigned short int _second_order_vertex_child_number[num_nodes]
Vector that names a child sharing each second order node.
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
virtual Real volume() const override
An optimized method for approximating the area of a TRI6 using quadrature.
virtual unsigned int n_nodes() const override
virtual unsigned int n_sub_elem() const override
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
virtual Order default_order() const override
static constexpr const unsigned int(& side_nodes_map)[num_sides][nodes_per_side]
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
virtual unsigned int n_vertices() const override final
static const int num_children
virtual unsigned int n_sides() const override final
static const int num_sides
Geometric constants for all Tris.
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
The libMesh namespace provides an interface to certain functionality in the library.
LIBMESH_DEVICE_INLINE T cross_norm(const TypeVector< T > &b, const TypeVector< T > &c)
Calls cross_norm_sq() and takes the square root of the result.
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
ElemType
Defines an enum for geometric element types.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real