libMesh
cell_tet4.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_CELL_TET4_H
21 #define LIBMESH_CELL_TET4_H
22 
23 // Local includes
24 #include "libmesh/cell_tet.h"
25 
26 namespace libMesh
27 {
28 
51 class Tet4 libmesh_final : public Tet
52 {
53 public:
54 
58  explicit
60  Tet(Tet4::n_nodes(), p, _nodelinks_data)
61  {}
62 
66  virtual ElemType type () const libmesh_override { return TET4; }
67 
71  virtual unsigned int n_nodes() const libmesh_override { return 4; }
72 
76  virtual unsigned int n_sub_elem() const libmesh_override { return 1; }
77 
81  virtual bool is_vertex(const unsigned int i) const libmesh_override;
82 
86  virtual bool is_edge(const unsigned int i) const libmesh_override;
87 
91  virtual bool is_face(const unsigned int i) const libmesh_override;
92 
97  virtual bool is_node_on_side(const unsigned int n,
98  const unsigned int s) const libmesh_override;
99 
104  virtual bool is_node_on_edge(const unsigned int n,
105  const unsigned int e) const libmesh_override;
106 
111  virtual bool is_child_on_side(const unsigned int c,
112  const unsigned int s) const libmesh_override;
113 
118  virtual bool has_affine_map () const libmesh_override { return true; }
119 
124  virtual bool is_linear () const libmesh_override { return true; }
125 
129  virtual Order default_order() const libmesh_override { return FIRST; }
130 
135  virtual UniquePtr<Elem> build_side_ptr (const unsigned int i,
136  bool proxy) libmesh_override;
137 
142  virtual UniquePtr<Elem> build_edge_ptr (const unsigned int i) libmesh_override;
143 
144  virtual void connectivity(const unsigned int sc,
145  const IOPackage iop,
146  std::vector<dof_id_type> & conn) const libmesh_override;
147 
152  static const unsigned int side_nodes_map[4][3];
153 
158  static const unsigned int edge_nodes_map[6][2];
159 
164  virtual Real volume () const libmesh_override;
165 
175  std::pair<Real, Real> min_and_max_angle() const;
176 
180  using Tet::key;
181 
187  virtual dof_id_type key () const libmesh_override;
188 
193  virtual bool contains_point (const Point & p, Real tol) const libmesh_override;
194 
195 protected:
196 
200  Node * _nodelinks_data[4];
201 
202 
203 
204 #ifdef LIBMESH_ENABLE_AMR
205 
209  virtual float embedding_matrix (const unsigned int i,
210  const unsigned int j,
211  const unsigned int k) const libmesh_override;
212 
217  static const float _embedding_matrix[8][4][4];
218 
219  LIBMESH_ENABLE_TOPOLOGY_CACHES;
220 
221 #endif
222 
223 };
224 
225 } // namespace libMesh
226 
227 
228 #endif // LIBMESH_CELL_TET4_H
Tet4(Elem *p=libmesh_nullptr)
Constructor.
Definition: cell_tet4.h:59
A Node is like a Point, but with more information.
Definition: node.h:52
ElemType
Defines an enum for geometric element types.
virtual bool has_affine_map() const libmesh_override
Definition: cell_tet4.h:118
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
const class libmesh_nullptr_t libmesh_nullptr
The libMesh namespace provides an interface to certain functionality in the library.
The Tet is an element in 3D composed of 4 sides.
Definition: cell_tet.h:36
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
virtual unsigned int n_nodes() const libmesh_override
Definition: cell_tet4.h:71
const dof_id_type n_nodes
Definition: tecplot_io.C:67
virtual dof_id_type key() const
Definition: elem.C:503
virtual ElemType type() const libmesh_override
Definition: cell_tet4.h:66
virtual bool is_linear() const libmesh_override
Definition: cell_tet4.h:124
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Order default_order() const libmesh_override
Definition: cell_tet4.h:129
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:38
virtual unsigned int n_sub_elem() const libmesh_override
Definition: cell_tet4.h:76
uint8_t dof_id_type
Definition: id_types.h:64