20 #include "libmesh/side.h" 21 #include "libmesh/cell_tet10.h" 22 #include "libmesh/edge_edge3.h" 23 #include "libmesh/face_tri6.h" 24 #include "libmesh/enum_io_package.h" 25 #include "libmesh/enum_order.h" 82 const unsigned int s)
const 84 libmesh_assert_less (s,
n_sides());
93 libmesh_assert_less(s,
n_sides());
100 libmesh_assert_less(e,
n_edges());
105 const unsigned int e)
const 107 libmesh_assert_less (e,
n_edges());
114 #ifdef LIBMESH_ENABLE_AMR 118 const unsigned int s)
const 122 const unsigned int midedge_nodes_opposite[4][3] =
137 const unsigned int )
const 139 libmesh_not_implemented();
143 #endif //LIBMESH_ENABLE_AMR 187 unsigned int side_node)
const 189 libmesh_assert_less (side, this->
n_sides());
198 unsigned int edge_node)
const 200 libmesh_assert_less (edge, this->
n_edges());
211 return this->simple_build_side_ptr<Tri6, Tet10>(i, proxy);
217 const unsigned int i)
219 this->simple_build_side_ptr<Tet10>(side, i,
TRI6);
226 return this->simple_build_edge_ptr<Edge3,Tet10>(i);
233 this->simple_build_edge_ptr<Tet10>(edge, i,
EDGE3);
240 std::vector<dof_id_type> & conn)
const 369 libmesh_error_msg(
"Invalid sc = " << sc);
383 libmesh_error_msg(
"Unsupported IO package " << iop);
405 std::pair<unsigned short int, unsigned short int>
408 libmesh_assert_greater_equal (n, this->
n_vertices());
409 libmesh_assert_less (n, this->
n_nodes());
410 return std::pair<unsigned short int, unsigned short int>
418 const unsigned int v)
const 420 libmesh_assert_greater_equal (n, this->
n_vertices());
421 libmesh_assert_less (n, this->
n_nodes());
422 libmesh_assert_less (v, 2);
442 #ifdef LIBMESH_ENABLE_AMR 449 { 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.},
450 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
451 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
452 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
453 { 0.375,-0.125, 0., 0., 0.75, 0., 0., 0., 0., 0.},
454 { 0.,-0.125,-0.125, 0., 0.5, 0.25, 0.5, 0., 0., 0.},
455 { 0.375, 0.,-0.125, 0., 0., 0., 0.75, 0., 0., 0.},
456 { 0.375, 0., 0.,-0.125, 0., 0., 0., 0.75, 0., 0.},
457 { 0.,-0.125, 0.,-0.125, 0.5, 0., 0., 0.5, 0.25, 0.},
458 { 0., 0.,-0.125,-0.125, 0., 0., 0.5, 0.5, 0., 0.25}
464 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
465 { 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.},
466 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
467 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
468 {-0.125, 0.375, 0., 0., 0.75, 0., 0., 0., 0., 0.},
469 { 0., 0.375,-0.125, 0., 0., 0.75, 0., 0., 0., 0.},
470 {-0.125, 0.,-0.125, 0., 0.5, 0.5, 0.25, 0., 0., 0.},
471 {-0.125, 0., 0.,-0.125, 0.5, 0., 0., 0.25, 0.5, 0.},
472 { 0., 0.375, 0.,-0.125, 0., 0., 0., 0., 0.75, 0.},
473 { 0., 0.,-0.125,-0.125, 0., 0.5, 0., 0., 0.5, 0.25}
479 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
480 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
481 { 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.},
482 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.},
483 {-0.125,-0.125, 0., 0., 0.25, 0.5, 0.5, 0., 0., 0.},
484 { 0.,-0.125, 0.375, 0., 0., 0.75, 0., 0., 0., 0.},
485 {-0.125, 0., 0.375, 0., 0., 0., 0.75, 0., 0., 0.},
486 {-0.125, 0., 0.,-0.125, 0., 0., 0.5, 0.25, 0., 0.5},
487 { 0.,-0.125, 0.,-0.125, 0., 0.5, 0., 0., 0.25, 0.5},
488 { 0., 0., 0.375,-0.125, 0., 0., 0., 0., 0., 0.75}
494 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
495 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
496 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.},
497 { 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.},
498 {-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5, 0.},
499 { 0.,-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5},
500 {-0.125, 0.,-0.125, 0., 0., 0., 0.25, 0.5, 0., 0.5},
501 {-0.125, 0., 0., 0.375, 0., 0., 0., 0.75, 0., 0.},
502 { 0.,-0.125, 0., 0.375, 0., 0., 0., 0., 0.75, 0.},
503 { 0., 0.,-0.125, 0.375, 0., 0., 0., 0., 0., 0.75}
509 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
510 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
511 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
512 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
513 {-0.125, 0., 0.,-0.125, 0.5, 0., 0., 0.25, 0.5, 0.},
514 {-0.125,-0.125,-0.125,-0.125, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25},
515 { 0.,-0.125,-0.125, 0., 0.5, 0.25, 0.5, 0., 0., 0.},
516 { 0.,-0.125, 0.,-0.125, 0.5, 0., 0., 0.5, 0.25, 0.},
517 {-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5, 0.},
518 { 0., 0.,-0.125,-0.125, 0., 0., 0.5, 0.5, 0., 0.25}
524 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
525 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
526 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
527 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
528 {-0.125, 0.,-0.125, 0., 0.5, 0.5, 0.25, 0., 0., 0.},
529 {-0.125,-0.125, 0., 0., 0.25, 0.5, 0.5, 0., 0., 0.},
530 { 0.,-0.125,-0.125, 0., 0.5, 0.25, 0.5, 0., 0., 0.},
531 {-0.125, 0., 0.,-0.125, 0.5, 0., 0., 0.25, 0.5, 0.},
532 { 0., 0.,-0.125,-0.125, 0., 0.5, 0., 0., 0.5, 0.25},
533 {-0.125,-0.125,-0.125,-0.125, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25}
539 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
540 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
541 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.},
542 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
543 {-0.125,-0.125, 0., 0., 0.25, 0.5, 0.5, 0., 0., 0.},
544 { 0.,-0.125, 0.,-0.125, 0., 0.5, 0., 0., 0.25, 0.5},
545 {-0.125, 0., 0.,-0.125, 0., 0., 0.5, 0.25, 0., 0.5},
546 {-0.125,-0.125,-0.125,-0.125, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25},
547 { 0., 0.,-0.125,-0.125, 0., 0.5, 0., 0., 0.5, 0.25},
548 { 0.,-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5}
554 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
555 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
556 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.},
557 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
558 {-0.125,-0.125,-0.125,-0.125, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25},
559 { 0.,-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5},
560 {-0.125, 0., 0.,-0.125, 0., 0., 0.5, 0.25, 0., 0.5},
561 { 0., 0.,-0.125,-0.125, 0., 0., 0.5, 0.5, 0., 0.25},
562 {-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5, 0.},
563 {-0.125, 0.,-0.125, 0., 0., 0., 0.25, 0.5, 0., 0.5}
570 const unsigned int j,
571 const unsigned int k)
const 591 const unsigned int perms[2][10] =
593 {1, 2, 0, 3, 5, 6, 4, 8, 9, 7},
594 {2, 0, 1, 3, 6, 4, 5, 9, 7, 8}
623 #endif // #ifdef LIBMESH_ENABLE_AMR 644 4*x0 - 4*x4 - 4*x7 + 4*x8,
645 4*x0 - 4*x4 + 4*x5 - 4*x6,
654 4*x0 - 4*x6 - 4*x7 + 4*x9,
656 4*x0 - 4*x4 + 4*x5 - 4*x6
665 4*x0 - 4*x6 - 4*x7 + 4*x9,
666 4*x0 - 4*x4 - 4*x7 + 4*x8
674 static const Real w[N] =
676 Real(3.6979856358852914509238091810505e-02L),
677 Real(1.6027040598476613723156741868689e-02L),
678 Real(2.1157006454524061178256145400082e-02L),
679 Real(9.1694299214797439226823542540576e-03L),
680 Real(3.6979856358852914509238091810505e-02L),
681 Real(1.6027040598476613723156741868689e-02L),
682 Real(2.1157006454524061178256145400082e-02L),
683 Real(9.1694299214797439226823542540576e-03L)
686 static const Real xi[N] =
688 Real(1.2251482265544137786674043037115e-01L),
689 Real(5.4415184401122528879992623629551e-01L),
690 Real(1.2251482265544137786674043037115e-01L),
691 Real(5.4415184401122528879992623629551e-01L),
692 Real(1.2251482265544137786674043037115e-01L),
693 Real(5.4415184401122528879992623629551e-01L),
694 Real(1.2251482265544137786674043037115e-01L),
695 Real(5.4415184401122528879992623629551e-01L)
698 static const Real eta[N] =
700 Real(1.3605497680284601717109468420738e-01L),
701 Real(7.0679724159396903069267439165167e-02L),
702 Real(5.6593316507280088053551297149570e-01L),
703 Real(2.9399880063162286589079157179842e-01L),
704 Real(1.3605497680284601717109468420738e-01L),
705 Real(7.0679724159396903069267439165167e-02L),
706 Real(5.6593316507280088053551297149570e-01L),
707 Real(2.9399880063162286589079157179842e-01L)
710 static const Real zeta[N] =
712 Real(1.5668263733681830907933725249176e-01L),
713 Real(8.1395667014670255076709592007207e-02L),
714 Real(6.5838687060044409936029672711329e-02L),
715 Real(3.4202793236766414300604458388142e-02L),
716 Real(5.8474756320489429588282763292971e-01L),
717 Real(3.0377276481470755305409673253211e-01L),
718 Real(2.4571332521171333166171692542182e-01L),
719 Real(1.2764656212038543100867773351792e-01L)
723 for (
int q=0; q<N; ++q)
727 dx_dxi_q = dx_dxi[0] + zeta[q]*dx_dxi[1] + eta[q]*dx_dxi[2] + xi[q]*dx_dxi[3],
728 dx_deta_q = dx_deta[0] + zeta[q]*dx_deta[1] + eta[q]*dx_deta[2] + xi[q]*dx_deta[3],
729 dx_dzeta_q = dx_dzeta[0] + zeta[q]*dx_dzeta[1] + eta[q]*dx_dzeta[2] + xi[q]*dx_dzeta[3];
741 libmesh_assert_less (perm_num, 12);
743 const unsigned int side = perm_num % 4;
744 const unsigned int rotate = perm_num / 4;
746 for (
unsigned int i = 0; i !=
rotate; ++i)
795 libmesh_assert_less (s, 4);
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.
virtual Order default_order() const override
Order
defines an enum for polynomial orders.
Node ** _nodes
Pointers to the nodes we are connected to.
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE3 built coincident with edge i.
virtual unsigned int n_nodes() const override
virtual bool has_affine_map() const override
virtual unsigned int n_sides() const override final
static const unsigned short int _second_order_adjacent_vertices[6][2]
Matrix that tells which vertices define the location of mid-side (or second-order) nodes...
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the edge to element node numbers.
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
Diagonal _diagonal_selection
The currently-selected diagonal used during refinement.
The libMesh namespace provides an interface to certain functionality in the library.
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index...
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) 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.
virtual unsigned int n_sub_elem() const override
void swap3neighbors(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three neighbor_ptrs, "rotating" them.
virtual unsigned int n_vertices() const override final
static const int num_children
void swap3nodes(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three node_ptrs, "rotating" them.
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
static const unsigned short int _second_order_vertex_child_number[10]
Vector that names a child sharing each second order node.
ElemMappingType mapping_type() const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const override
virtual Real volume() const override
A specialization for computing the volume of a Tet10.
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
virtual unsigned int n_edges() const override final
virtual Real embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const override
Matrix used to create the elements children.
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) 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...
static constexpr Real affine_tol
Default tolerance to use in has_affine_map().
static const int num_sides
static const int nodes_per_edge
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ElemType side_type(const unsigned int s) const override final
virtual bool is_vertex(const unsigned int i) const override
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=false) override
Builds a TRI6 built coincident with face i.
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
virtual Real volume() const
void choose_diagonal() const
Derived classes use this function to select an initial diagonal during refinement.
virtual bool is_face(const unsigned int i) const override
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
static const unsigned short int _second_order_vertex_child_index[10]
Vector that names the child vertex index for each second order node.
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
virtual bool is_edge(const unsigned int i) const override
static const int num_nodes
Geometric constants for Tet10.
static const int num_edges
bool is_child_on_side_helper(const unsigned int c, const unsigned int s, const unsigned int checked_nodes[][3]) const
Called by descendant classes with appropriate data to determine if child c is on side s...
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...
static const int nodes_per_side