Go to the documentation of this file.
   20 #include "libmesh/side.h" 
   21 #include "libmesh/cell_tet4.h" 
   22 #include "libmesh/edge_edge2.h" 
   23 #include "libmesh/face_tri3.h" 
   24 #include "libmesh/tensor_value.h" 
   25 #include "libmesh/enum_io_package.h" 
   26 #include "libmesh/enum_order.h" 
   80                            const unsigned int e)
 const 
   82   libmesh_assert_less (e, 
n_edges());
 
   91 #ifdef LIBMESH_ENABLE_AMR 
   95                             const unsigned int s)
 const 
  100   const unsigned int nodes_opposite[4][3] =
 
  115                             const unsigned int )
 const 
  117   libmesh_not_implemented();
 
  121 #endif //LIBMESH_ENABLE_AMR 
  127                            const unsigned int s)
 const 
  129   libmesh_assert_less (s, 
n_sides());
 
  135 std::vector<unsigned>
 
  138   libmesh_assert_less(s, 
n_sides());
 
  150   libmesh_assert_less (i, this->
n_sides());
 
  153     return libmesh_make_unique<Side<Tri3,Tet4>>(
this,i);
 
  157       std::unique_ptr<Elem> face = libmesh_make_unique<Tri3>();
 
  160       for (
auto n : face->node_index_range())
 
  161         face->set_node(n) = this->
node_ptr(Tet4::side_nodes_map[i][n]);
 
  170                            const unsigned int i)
 
  172   this->simple_build_side_ptr<Tet4>(side, i, 
TRI3);
 
  179   libmesh_assert_less (i, this->
n_edges());
 
  181   return libmesh_make_unique<SideEdge<Edge2,Tet4>>(
this,i);
 
  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 
  338   Real dihedral_angles[6]; 
 
  341   for (
unsigned int k=0,i=0; i<4; ++i)
 
  342     for (
unsigned int j=i+1; j<4; ++j,k+=1)
 
  343       dihedral_angles[k] = std::acos(n[i]*n[j] / n[i].
norm() / n[j].
norm()); 
 
  346   return std::make_pair(*std::min_element(dihedral_angles, dihedral_angles+6),
 
  347                         *std::max_element(dihedral_angles, dihedral_angles+6));
 
  377                       col1(1), col2(1), col3(1),
 
  378                       col1(2), col2(2), col3(2)).solve(p - 
point(0), r);
 
  394     r(0) + r(1) + r(2) < 1.0 + tol;
 
  399 #ifdef LIBMESH_ENABLE_AMR 
  401                               const unsigned int j,
 
  402                               const unsigned int k)
 const 
  567 #endif // #ifdef LIBMESH_ENABLE_AMR 
  
virtual bool is_child_on_side(const unsigned int c, 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 bool contains_point(const Point &p, Real tol) const override
Uses simple geometric tests to determine if the point p is inside the tetrahedron.
 
static dof_id_type compute_key(dof_id_type n0)
 
void choose_diagonal() const
Derived classes use this function to select an initial diagonal during refinement.
 
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
 
The libMesh namespace provides an interface to certain functionality in the library.
 
IterBase * end
Also have a polymorphic pointer to the end object, this prevents iterating past the end.
 
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
 
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy=true) override
Builds a TRI3 built coincident with face i.
 
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
 
virtual float embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const override
Matrix used to create the elements children.
 
Node ** _nodes
Pointers to the nodes we are connected to.
 
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.
 
const Point & point(const unsigned int i) const
 
static const int nodes_per_side
 
virtual unsigned int n_sub_elem() const override
 
virtual bool is_edge(const unsigned int i) const override
 
static const int nodes_per_edge
 
static const int num_children
 
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE2 built coincident with face i.
 
virtual dof_id_type key() const override
 
TensorValue< Real > RealTensorValue
Useful typedefs to allow transparent switching between Real and Complex data types.
 
A Point defines a location in LIBMESH_DIM dimensional Real space.
 
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
 
virtual Order default_order() const override
 
static const int num_edges
 
Diagonal _diagonal_selection
The currently-selected diagonal used during refinement.
 
virtual Real volume() const override
An optimized method for computing the area of a 4-node tetrahedron.
 
static const float _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 Tet4.
 
subdomain_id_type subdomain_id() const
 
virtual bool is_face(const unsigned int i) const override
 
virtual unsigned int n_sides() const override final
 
MetaPhysicL::DualNumber< T, D > norm(const MetaPhysicL::DualNumber< T, D > &in)
 
std::pair< Real, Real > min_and_max_angle() const
 
virtual unsigned int n_edges() const override final
 
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
 
dof_id_type node_id(const unsigned int i) const
 
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
 
static const int num_sides
 
auto norm() const -> decltype(std::norm(T()))
 
const Node * node_ptr(const unsigned int i) const
 
A class representing a solver's failure to converge, to be thrown by "libmesh_convergence_failure();"...
 
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the  node of the  edge to element node numbers.
 
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override