face_tri6.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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_FACE_TRI6_H
21 #define LIBMESH_FACE_TRI6_H
22 
23 // Local includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/face_tri.h"
26 
27 namespace libMesh
28 {
29 
56 class Tri6 : public Tri
57 {
58 public:
59 
63  explicit
64  Tri6 (Elem * p=nullptr) :
65  Tri(Tri6::n_nodes(), p, _nodelinks_data) {}
66 
67  Tri6 (Tri6 &&) = delete;
68  Tri6 (const Tri6 &) = delete;
69  Tri6 & operator= (const Tri6 &) = delete;
70  Tri6 & operator= (Tri6 &&) = delete;
71  virtual ~Tri6() = default;
72 
76  virtual ElemType type () const override { return TRI6; }
77 
81  virtual unsigned int n_nodes() const override { return num_nodes; }
82 
86  virtual unsigned int n_sub_elem() const override { return 4; }
87 
91  virtual bool is_vertex(const unsigned int i) const override;
92 
96  virtual bool is_edge(const unsigned int i) const override;
97 
101  virtual bool is_face(const unsigned int i) const override;
102 
107  virtual bool is_node_on_side(const unsigned int n,
108  const unsigned int s) const override;
109 
110  virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
111 
116  virtual bool is_node_on_edge(const unsigned int n,
117  const unsigned int e) const override
118  { return this->is_node_on_side(n,e); }
119 
124  virtual bool has_affine_map () const override;
125 
129  virtual Order default_order() const override;
130 
134  using Elem::key;
135 
145  virtual dof_id_type key (const unsigned int s) const override;
146 
150  virtual unsigned int which_node_am_i(unsigned int side,
151  unsigned int side_node) const override;
152 
153  virtual std::unique_ptr<Elem> build_side_ptr (const unsigned int i,
154  bool proxy) override;
155 
159  virtual void build_side_ptr (std::unique_ptr<Elem> & elem,
160  const unsigned int i) override;
161 
162  virtual void connectivity(const unsigned int sf,
163  const IOPackage iop,
164  std::vector<dof_id_type> & conn) const override;
165 
169  virtual unsigned int n_second_order_adjacent_vertices (const unsigned int) const override
170  { return 2; }
171 
178  virtual unsigned short int second_order_adjacent_vertex (const unsigned int n,
179  const unsigned int v) const override;
180 
186  virtual std::pair<unsigned short int, unsigned short int>
187  second_order_child_vertex (const unsigned int n) const override;
188 
192  static const int num_nodes = 6;
193  static const int num_sides = 3;
194  static const int num_children = 4;
195  static const int nodes_per_side = 3;
196 
201  static const unsigned int side_nodes_map[num_sides][nodes_per_side];
202 
207  virtual Real volume () const override;
208 
213  virtual BoundingBox loose_bounding_box () const override;
214 
215 protected:
216 
221 
222 
223 
224 #ifdef LIBMESH_ENABLE_AMR
225 
229  virtual float embedding_matrix (const unsigned int i,
230  const unsigned int j,
231  const unsigned int k) const override
232  { return _embedding_matrix[i][j][k]; }
233 
239 
241 
242 #endif // LIBMESH_ENABLE_AMR
243 
244 private:
245 
250  static const unsigned short int _second_order_adjacent_vertices[num_sides][2];
251 
255  static const unsigned short int _second_order_vertex_child_number[num_nodes];
256 
260  static const unsigned short int _second_order_vertex_child_index[num_nodes];
261 };
262 
263 
264 } // namespace libMesh
265 
266 #endif // LIBMESH_FACE_TRI6_H
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:52
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
Definition: face_tri6.h:201
virtual unsigned int n_nodes() const override
Definition: face_tri6.h:81
virtual Real volume() const override
Definition: face_tri6.C:380
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition: face_tri6.C:121
Tri6(Elem *p=nullptr)
Definition: face_tri6.h:64
virtual dof_id_type key() const
Definition: elem.C:401
Tri6 & operator=(const Tri6 &)=delete
static const float _embedding_matrix[num_children][num_nodes][num_nodes]
Definition: face_tri6.h:238
The base class for all geometric element types.
Definition: elem.h:100
virtual Order default_order() const override
Definition: face_tri6.C:155
The base class for all triangular element types.
Definition: face_tri.h:47
static const unsigned short int _second_order_adjacent_vertices[num_sides][2]
Definition: face_tri6.h:250
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition: face_tri6.h:116
static const int nodes_per_side
Definition: face_tri6.h:195
virtual float embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const override
Definition: face_tri6.h:229
virtual bool is_face(const unsigned int i) const override
Definition: face_tri6.C:116
A 2D triangular element with 6 nodes.
Definition: face_tri6.h:56
static const unsigned short int _second_order_vertex_child_number[num_nodes]
Definition: face_tri6.h:255
static const unsigned short int _second_order_vertex_child_index[num_nodes]
Definition: face_tri6.h:260
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: face_tri6.h:240
virtual dof_id_type key() const override final
Definition: face_tri.C:72
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
Definition: face_tri6.C:190
Node * _nodelinks_data[num_nodes]
Definition: face_tri6.h:220
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition: face_tri6.C:131
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const override
Definition: face_tri6.h:169
static const int num_sides
Definition: face_tri6.h:193
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy) override
Definition: face_tri6.C:201
virtual unsigned int n_sub_elem() const override
Definition: face_tri6.h:86
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
Definition: face_tri6.C:430
virtual bool has_affine_map() const override
Definition: face_tri6.C:137
virtual bool is_edge(const unsigned int i) const override
Definition: face_tri6.C:109
virtual BoundingBox loose_bounding_box() const override
Definition: face_tri6.C:349
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const int num_children
Definition: face_tri6.h:194
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition: face_tri6.C:232
virtual ElemType type() const override
Definition: face_tri6.h:76
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
Definition: face_tri6.C:451
static const int num_nodes
Definition: face_tri6.h:192
virtual bool is_vertex(const unsigned int i) const override
Definition: face_tri6.C:102
virtual ~Tri6()=default
std::unique_ptr< Elem > side(const unsigned int i) const
Definition: elem.h:2202
uint8_t dof_id_type
Definition: id_types.h:64