20 #include "libmesh/cell_tet10.h" 21 #include "libmesh/edge_edge3.h" 22 #include "libmesh/face_tri6.h" 23 #include "libmesh/enum_io_package.h" 24 #include "libmesh/enum_order.h" 78 const unsigned int s)
const 80 libmesh_assert_less (s,
n_sides());
89 libmesh_assert_less(s,
n_sides());
96 libmesh_assert_less(e,
n_edges());
101 const unsigned int e)
const 103 libmesh_assert_less (e,
n_edges());
110 #ifdef LIBMESH_ENABLE_AMR 114 const unsigned int s)
const 118 const unsigned int midedge_nodes_opposite[4][3] =
133 const unsigned int )
const 135 libmesh_not_implemented();
139 #endif //LIBMESH_ENABLE_AMR 183 unsigned int side_node)
const 185 libmesh_assert_less (side, this->
n_sides());
194 unsigned int edge_node)
const 196 libmesh_assert_less (edge, this->
n_edges());
206 return this->simple_build_side_ptr<Tri6, Tet10>(i);
212 const unsigned int i)
214 this->simple_build_side_ptr<Tet10>(side, i,
TRI6);
221 return this->simple_build_edge_ptr<Edge3,Tet10>(i);
228 this->simple_build_edge_ptr<Tet10>(edge, i,
EDGE3);
235 std::vector<dof_id_type> & conn)
const 364 libmesh_error_msg(
"Invalid sc = " << sc);
378 libmesh_error_msg(
"Unsupported IO package " << iop);
400 std::pair<unsigned short int, unsigned short int>
403 libmesh_assert_greater_equal (n, this->
n_vertices());
404 libmesh_assert_less (n, this->
n_nodes());
405 return std::pair<unsigned short int, unsigned short int>
413 const unsigned int v)
const 415 libmesh_assert_greater_equal (n, this->
n_vertices());
416 libmesh_assert_less (n, this->
n_nodes());
417 libmesh_assert_less (v, 2);
437 #ifdef LIBMESH_ENABLE_AMR 444 { 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.},
445 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
446 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
447 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
448 { 0.375,-0.125, 0., 0., 0.75, 0., 0., 0., 0., 0.},
449 { 0.,-0.125,-0.125, 0., 0.5, 0.25, 0.5, 0., 0., 0.},
450 { 0.375, 0.,-0.125, 0., 0., 0., 0.75, 0., 0., 0.},
451 { 0.375, 0., 0.,-0.125, 0., 0., 0., 0.75, 0., 0.},
452 { 0.,-0.125, 0.,-0.125, 0.5, 0., 0., 0.5, 0.25, 0.},
453 { 0., 0.,-0.125,-0.125, 0., 0., 0.5, 0.5, 0., 0.25}
459 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
460 { 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.},
461 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
462 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
463 {-0.125, 0.375, 0., 0., 0.75, 0., 0., 0., 0., 0.},
464 { 0., 0.375,-0.125, 0., 0., 0.75, 0., 0., 0., 0.},
465 {-0.125, 0.,-0.125, 0., 0.5, 0.5, 0.25, 0., 0., 0.},
466 {-0.125, 0., 0.,-0.125, 0.5, 0., 0., 0.25, 0.5, 0.},
467 { 0., 0.375, 0.,-0.125, 0., 0., 0., 0., 0.75, 0.},
468 { 0., 0.,-0.125,-0.125, 0., 0.5, 0., 0., 0.5, 0.25}
474 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
475 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
476 { 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.},
477 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.},
478 {-0.125,-0.125, 0., 0., 0.25, 0.5, 0.5, 0., 0., 0.},
479 { 0.,-0.125, 0.375, 0., 0., 0.75, 0., 0., 0., 0.},
480 {-0.125, 0., 0.375, 0., 0., 0., 0.75, 0., 0., 0.},
481 {-0.125, 0., 0.,-0.125, 0., 0., 0.5, 0.25, 0., 0.5},
482 { 0.,-0.125, 0.,-0.125, 0., 0.5, 0., 0., 0.25, 0.5},
483 { 0., 0., 0.375,-0.125, 0., 0., 0., 0., 0., 0.75}
489 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
490 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
491 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.},
492 { 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.},
493 {-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5, 0.},
494 { 0.,-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5},
495 {-0.125, 0.,-0.125, 0., 0., 0., 0.25, 0.5, 0., 0.5},
496 {-0.125, 0., 0., 0.375, 0., 0., 0., 0.75, 0., 0.},
497 { 0.,-0.125, 0., 0.375, 0., 0., 0., 0., 0.75, 0.},
498 { 0., 0.,-0.125, 0.375, 0., 0., 0., 0., 0., 0.75}
504 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
505 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
506 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
507 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
508 {-0.125, 0., 0.,-0.125, 0.5, 0., 0., 0.25, 0.5, 0.},
509 {-0.125,-0.125,-0.125,-0.125, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25},
510 { 0.,-0.125,-0.125, 0., 0.5, 0.25, 0.5, 0., 0., 0.},
511 { 0.,-0.125, 0.,-0.125, 0.5, 0., 0., 0.5, 0.25, 0.},
512 {-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5, 0.},
513 { 0., 0.,-0.125,-0.125, 0., 0., 0.5, 0.5, 0., 0.25}
519 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.},
520 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
521 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
522 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
523 {-0.125, 0.,-0.125, 0., 0.5, 0.5, 0.25, 0., 0., 0.},
524 {-0.125,-0.125, 0., 0., 0.25, 0.5, 0.5, 0., 0., 0.},
525 { 0.,-0.125,-0.125, 0., 0.5, 0.25, 0.5, 0., 0., 0.},
526 {-0.125, 0., 0.,-0.125, 0.5, 0., 0., 0.25, 0.5, 0.},
527 { 0., 0.,-0.125,-0.125, 0., 0.5, 0., 0., 0.5, 0.25},
528 {-0.125,-0.125,-0.125,-0.125, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25}
534 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
535 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.},
536 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.},
537 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
538 {-0.125,-0.125, 0., 0., 0.25, 0.5, 0.5, 0., 0., 0.},
539 { 0.,-0.125, 0.,-0.125, 0., 0.5, 0., 0., 0.25, 0.5},
540 {-0.125, 0., 0.,-0.125, 0., 0., 0.5, 0.25, 0., 0.5},
541 {-0.125,-0.125,-0.125,-0.125, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25},
542 { 0., 0.,-0.125,-0.125, 0., 0.5, 0., 0., 0.5, 0.25},
543 { 0.,-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5}
549 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.},
550 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.},
551 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.},
552 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.},
553 {-0.125,-0.125,-0.125,-0.125, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25},
554 { 0.,-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5},
555 {-0.125, 0., 0.,-0.125, 0., 0., 0.5, 0.25, 0., 0.5},
556 { 0., 0.,-0.125,-0.125, 0., 0., 0.5, 0.5, 0., 0.25},
557 {-0.125,-0.125, 0., 0., 0.25, 0., 0., 0.5, 0.5, 0.},
558 {-0.125, 0.,-0.125, 0., 0., 0., 0.25, 0.5, 0., 0.5}
565 const unsigned int j,
566 const unsigned int k)
const 586 const unsigned int perms[2][10] =
588 {1, 2, 0, 3, 5, 6, 4, 8, 9, 7},
589 {2, 0, 1, 3, 6, 4, 5, 9, 7, 8}
618 #endif // #ifdef LIBMESH_ENABLE_AMR 639 4*x0 - 4*x4 - 4*x7 + 4*x8,
640 4*x0 - 4*x4 + 4*x5 - 4*x6,
649 4*x0 - 4*x6 - 4*x7 + 4*x9,
651 4*x0 - 4*x4 + 4*x5 - 4*x6
660 4*x0 - 4*x6 - 4*x7 + 4*x9,
661 4*x0 - 4*x4 - 4*x7 + 4*x8
669 static const Real w[N] =
671 3.6979856358852914509238091810505e-02_R,
672 1.6027040598476613723156741868689e-02_R,
673 2.1157006454524061178256145400082e-02_R,
674 9.1694299214797439226823542540576e-03_R,
675 3.6979856358852914509238091810505e-02_R,
676 1.6027040598476613723156741868689e-02_R,
677 2.1157006454524061178256145400082e-02_R,
678 9.1694299214797439226823542540576e-03_R
681 static const Real xi[N] =
683 1.2251482265544137786674043037115e-01_R,
684 5.4415184401122528879992623629551e-01_R,
685 1.2251482265544137786674043037115e-01_R,
686 5.4415184401122528879992623629551e-01_R,
687 1.2251482265544137786674043037115e-01_R,
688 5.4415184401122528879992623629551e-01_R,
689 1.2251482265544137786674043037115e-01_R,
690 5.4415184401122528879992623629551e-01_R
693 static const Real eta[N] =
695 1.3605497680284601717109468420738e-01_R,
696 7.0679724159396903069267439165167e-02_R,
697 5.6593316507280088053551297149570e-01_R,
698 2.9399880063162286589079157179842e-01_R,
699 1.3605497680284601717109468420738e-01_R,
700 7.0679724159396903069267439165167e-02_R,
701 5.6593316507280088053551297149570e-01_R,
702 2.9399880063162286589079157179842e-01_R
705 static const Real zeta[N] =
707 1.5668263733681830907933725249176e-01_R,
708 8.1395667014670255076709592007207e-02_R,
709 6.5838687060044409936029672711329e-02_R,
710 3.4202793236766414300604458388142e-02_R,
711 5.8474756320489429588282763292971e-01_R,
712 3.0377276481470755305409673253211e-01_R,
713 2.4571332521171333166171692542182e-01_R,
714 1.2764656212038543100867773351792e-01_R
718 for (
int q=0; q<N; ++q)
722 dx_dxi_q = dx_dxi[0] + zeta[q]*dx_dxi[1] + eta[q]*dx_dxi[2] + xi[q]*dx_dxi[3],
723 dx_deta_q = dx_deta[0] + zeta[q]*dx_deta[1] + eta[q]*dx_deta[2] + xi[q]*dx_deta[3],
724 dx_dzeta_q = dx_dzeta[0] + zeta[q]*dx_dzeta[1] + eta[q]*dx_dzeta[2] + xi[q]*dx_dzeta[3];
736 libmesh_assert_less (perm_num, 12);
738 const unsigned int side = perm_num % 4;
739 const unsigned int rotate = perm_num / 4;
741 for (
unsigned int i = 0; i !=
rotate; ++i)
792 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
static const int num_sides
Geometric constants for all Tets.
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.
static const int num_edges
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
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 std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Builds a TRI6 built coincident with face i.
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 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
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.
static const int num_children
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.
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