20 #include "libmesh/cell_tet4.h"    21 #include "libmesh/edge_edge2.h"    22 #include "libmesh/face_tri3.h"    23 #include "libmesh/tensor_value.h"    24 #include "libmesh/enum_io_package.h"    25 #include "libmesh/enum_order.h"    76                            const unsigned int e)
 const    78   libmesh_assert_less (e, 
n_edges());
    87 #ifdef LIBMESH_ENABLE_AMR    91                             const unsigned int s)
 const    96   const unsigned int nodes_opposite[4][3] =
   111                             const unsigned int )
 const   113   libmesh_not_implemented();
   117 #endif //LIBMESH_ENABLE_AMR   123   return this->
volume() > tol;
   129                            const unsigned int s)
 const   131   libmesh_assert_less (s, 
n_sides());
   137 std::vector<unsigned>
   140   libmesh_assert_less(s, 
n_sides());
   144 std::vector<unsigned>
   147   libmesh_assert_less(e, 
n_edges());
   158   return this->simple_build_side_ptr<Tri3, Tet4>(i);
   164                            const unsigned int i)
   166   this->simple_build_side_ptr<Tet4>(side, i, 
TRI3);
   173   return this->simple_build_edge_ptr<Edge2,Tet4>(i);
   180   this->simple_build_edge_ptr<Tet4>(edge, i, 
EDGE2);
   187                         std::vector<dof_id_type> & conn)
 const   221       libmesh_error_msg(
"Unsupported IO package " << iop);
   227 #ifdef LIBMESH_ENABLE_AMR   234       {1.0, 0.0, 0.0, 0.0}, 
   235       {0.5, 0.5, 0.0, 0.0}, 
   236       {0.5, 0.0, 0.5, 0.0}, 
   243       {0.5, 0.5, 0.0, 0.0}, 
   244       {0.0, 1.0, 0.0, 0.0}, 
   245       {0.0, 0.5, 0.5, 0.0}, 
   252       {0.5, 0.0, 0.5, 0.0}, 
   253       {0.0, 0.5, 0.5, 0.0}, 
   254       {0.0, 0.0, 1.0, 0.0}, 
   261       {0.5, 0.0, 0.0, 0.5}, 
   262       {0.0, 0.5, 0.0, 0.5}, 
   263       {0.0, 0.0, 0.5, 0.5}, 
   270       {0.5, 0.5, 0.0, 0.0}, 
   271       {0.0, 0.5, 0.0, 0.5}, 
   272       {0.5, 0.0, 0.5, 0.0}, 
   279       {0.5, 0.5, 0.0, 0.0}, 
   280       {0.0, 0.5, 0.5, 0.0}, 
   281       {0.5, 0.0, 0.5, 0.0}, 
   288       {0.5, 0.0, 0.5, 0.0}, 
   289       {0.0, 0.5, 0.5, 0.0}, 
   290       {0.0, 0.0, 0.5, 0.5}, 
   297       {0.5, 0.0, 0.5, 0.0}, 
   298       {0.0, 0.5, 0.0, 0.5}, 
   299       {0.0, 0.0, 0.5, 0.5}, 
   304 #endif // #ifdef LIBMESH_ENABLE_AMR   345   Real dihedral_angles[6]; 
   348   for (
unsigned int k=0,i=0; i<4; ++i)
   349     for (
unsigned int j=i+1; j<4; ++j,k+=1)
   350       dihedral_angles[k] = std::acos(n[i]*n[j] / n[i].
norm() / n[j].
norm()); 
   353   return std::make_pair(*std::min_element(dihedral_angles, dihedral_angles+6),
   354                         *std::max_element(dihedral_angles, dihedral_angles+6));
   384                       col1(1), col2(1), col3(1),
   385                       col1(2), col2(2), col3(2)).solve(p - 
point(0), r);
   401     r(0) + r(1) + r(2) < 1.0 + tol;
   406 #ifdef LIBMESH_ENABLE_AMR   408                              const unsigned int j,
   409                              const unsigned int k)
 const   574 #endif // #ifdef LIBMESH_ENABLE_AMR   578   libmesh_assert_less (perm_num, 12);
   580   const unsigned int side = perm_num % 4;
   581   const unsigned int rotate = perm_num / 4;
   583   for (
unsigned int i = 0; i != 
rotate; ++i)
   624   libmesh_assert_less (s, 4);
   632   libmesh_assert_less (s, 4);
   638   return pointing_out.
unit();
 virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index...
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. 
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
Node ** _nodes
Pointers to the nodes we are connected to. 
virtual Point true_centroid() const override
The centroid of a 4-node tetrahedron is simply given by the average of its vertex positions...
std::pair< Real, Real > min_and_max_angle() const
auto norm() const -> decltype(std::norm(T()))
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) 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 unsigned int n_sides() const override final
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. 
virtual Point side_vertex_average_normal(const unsigned int s) 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. 
static const int num_edges
virtual bool is_edge(const unsigned int i) const override
Diagonal _diagonal_selection
The currently-selected diagonal used during refinement. 
virtual unsigned int n_sub_elem() const override
The libMesh namespace provides an interface to certain functionality in the library. 
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual bool is_vertex(const unsigned int i) const override
virtual dof_id_type key() const override
void swap3neighbors(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three neighbor_ptrs, "rotating" them. 
TensorValue< Real > RealTensorValue
Useful typedefs to allow transparent switching between Real and Complex data types. 
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)
TypeVector< T > unit() const
static const int nodes_per_side
static const int num_nodes
Geometric constants for Tet4. 
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs. 
virtual Order default_order() 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. 
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
virtual unsigned int n_edges() const override final
ElemType side_type(const unsigned int s) const override final
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 is_node_on_edge(const unsigned int n, const unsigned int e) const override
TypeVector< typename CompareTypes< T, T2 >::supertype > cross(const TypeVector< T2 > &v) const
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Builds a TRI3 built coincident with face i. 
virtual bool is_face(const unsigned int i) const override
virtual bool has_invertible_map(Real tol) const override
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs. 
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const override
const Node * node_ptr(const unsigned int i) const
virtual Real volume() const override
An optimized method for computing the area of a 4-node tetrahedron. 
A class representing a solver's failure to converge, to be thrown by "libmesh_convergence_failure();"...
virtual bool contains_point(const Point &p, Real tol) const override
Uses simple geometric tests to determine if the point p is inside the tetrahedron. 
void choose_diagonal() const
Derived classes use this function to select an initial diagonal during refinement. 
static const int num_children
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the  node of the  edge to element node numbers. 
static dof_id_type compute_key(dof_id_type n0)
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE2 built coincident with face i. 
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...
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. 
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
static const int nodes_per_edge
Point vertex_average() const