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" 43 #ifdef LIBMESH_ENABLE_AMR 50 { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0},
51 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
52 { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
53 {.375, -.125, 0.0, .75, 0.0, 0.0},
54 { 0.0, -.125, -.125, 0.5, .25, 0.5},
55 {.375, 0.0, -.125, 0.0, 0.0, .75}
61 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
62 { 0.0, 1.0, 0.0, 0.0, 0.0, 0.0},
63 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
64 {-.125, .375, 0.0, .75, 0.0, 0.0},
65 { 0.0, .375, -.125, 0.0, .75, 0.0},
66 {-.125, 0.0, -.125, 0.5, 0.5, .25}
72 { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
73 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
74 { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0},
75 {-.125, -.125, 0.0, .25, 0.5, 0.5},
76 { 0.0, -.125, .375, 0.0, .75, 0.0},
77 {-.125, 0.0, .375, 0.0, 0.0, .75}
83 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0},
84 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0},
85 { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0},
86 {-.125, 0.0, -.125, 0.5, 0.5, .25},
87 {-.125, -.125, 0.0, .25, 0.5, 0.5},
88 { 0.0, -.125, -.125, 0.5, .25, 0.5}
119 const unsigned int s)
const 121 libmesh_assert_less (s,
n_sides());
127 std::vector<unsigned>
130 libmesh_assert_less(s,
n_sides());
134 std::vector<unsigned>
170 libmesh_assert_less (s, this->
n_sides());
190 libmesh_error_msg(
"Invalid side s = " << s);
197 unsigned int side_node)
const 199 libmesh_assert_less (side, this->
n_sides());
209 return this->simple_build_side_ptr<Edge3, Tri6>(i);
215 const unsigned int i)
217 this->simple_build_side_ptr<Tri6>(side, i,
EDGE3);
224 std::vector<dof_id_type> & conn)
const 273 libmesh_error_msg(
"Invalid sf = " << sf);
287 libmesh_error_msg(
"Unsupported IO package " << iop);
304 for (
unsigned d=0; d<LIBMESH_DIM; ++d)
307 for (
unsigned int p=1; p != 6; ++p)
308 center += this->
point(p)(d);
311 Real hd = std::abs(center - this->
point(0)(d));
312 for (
unsigned int p=1; p != 6; ++p)
313 hd = std::max(hd, std::abs(center - this->
point(p)(d)));
315 pmin(d) = center - hd;
316 pmax(d) = center + hd;
343 a1 = 4*x0 + 4*x1 - 8*x3,
344 b1 = 4*x0 - 4*x3 + 4*x4 - 4*x5,
345 c1 = -3*x0 - 1*x1 + 4*x3,
346 b2 = 4*x0 + 4*x2 - 8*x5,
347 c2 = -3*x0 - 1*x2 + 4*x5;
352 b1.relative_fuzzy_equals(
Point(0,0,0)) &&
353 b2.relative_fuzzy_equals(
Point(0,0,0)))
357 const unsigned int N = 7;
361 w1 =
Real(31)/480 + std::sqrt(
Real(15))/2400,
362 w2 =
Real(31)/480 - std::sqrt(
Real(15))/2400,
363 q1 =
Real(2)/7 + std::sqrt(
Real(15))/21,
364 q2 =
Real(2)/7 - std::sqrt(
Real(15))/21;
366 static const Real xi[N] = {
Real(1)/3, q1, q1, 1-2*q1, q2, q2, 1-2*q2};
367 static const Real eta[N] = {
Real(1)/3, q1, 1-2*q1, q1, q2, 1-2*q2, q2};
368 static const Real wts[N] = {
Real(9)/80, w1, w1, w1, w2, w2, w2};
371 for (
unsigned int q=0; q<N; ++q)
372 vol += wts[q] *
cross_norm(xi[q]*a1 + eta[q]*b1 + c1,
373 xi[q]*b1 + eta[q]*b2 + c2);
374 #endif // LIBMESH_DIM > 1 382 const unsigned int v)
const 384 libmesh_assert_greater_equal (n, this->
n_vertices());
385 libmesh_assert_less (n, this->
n_nodes());
386 libmesh_assert_less (v, 2);
401 std::pair<unsigned short int, unsigned short int>
404 libmesh_assert_greater_equal (n, this->
n_vertices());
405 libmesh_assert_less (n, this->
n_nodes());
406 return std::pair<unsigned short int, unsigned short int>
430 libmesh_assert_less (perm_num, 3);
432 for (
unsigned int i = 0; i != perm_num; ++i)
463 libmesh_assert_less (s, 3);
ElemType
Defines an enum for geometric element types.
void swap2boundaryedges(unsigned short e1, unsigned short e2, BoundaryInfo *boundary_info) const
Swaps two edges in boundary_info, if it is non-null.
Order
defines an enum for polynomial orders.
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
virtual unsigned int n_nodes() const override
virtual Real volume() const override
An optimized method for approximating the area of a TRI6 using quadrature.
ElemType side_type(const unsigned int s) const override final
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
static const int num_sides
Geometric constants for all Tris.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
T cross_norm(const TypeVector< T > &b, const TypeVector< T > &c)
Calls cross_norm_sq() and takes the square root of the result.
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual Order default_order() const override
virtual unsigned int n_vertices() const override final
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 void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index...
unsigned int center_node_on_side(const unsigned short side) const override final
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
The libMesh namespace provides an interface to certain functionality in the library.
static const int num_children
static const int nodes_per_side
virtual bool is_face(const unsigned int i) const override
void swap3neighbors(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three neighbor_ptrs, "rotating" them.
static const unsigned short int _second_order_vertex_child_number[num_nodes]
Vector that names a child sharing each second order node.
virtual unsigned int n_sides() const override final
static const unsigned short int _second_order_vertex_child_index[num_nodes]
Vector that names the child vertex index for each second order node.
void swap3nodes(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three node_ptrs, "rotating" them.
ElemMappingType mapping_type() const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
virtual dof_id_type key() const override final
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
static constexpr Real affine_tol
Default tolerance to use in has_affine_map().
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
virtual unsigned int n_sub_elem() const override
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
Defines a Cartesian bounding box by the two corner extremum.
virtual bool has_affine_map() const override
virtual bool is_edge(const unsigned int i) const override
virtual BoundingBox loose_bounding_box() const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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 Real volume() const
static const int num_nodes
Geometric constants for Tri6.
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
static dof_id_type compute_key(dof_id_type n0)
virtual bool is_vertex(const unsigned int i) const override
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
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...