libMesh
face_tri6.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_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 
49 class Tri6 : public Tri
50 {
51 public:
52 
56  explicit
58  Tri(Tri6::n_nodes(), p, _nodelinks_data) {}
59 
63  virtual ElemType type () const libmesh_override { return TRI6; }
64 
68  virtual unsigned int n_nodes() const libmesh_override { return 6; }
69 
73  virtual unsigned int n_sub_elem() const libmesh_override { return 4; }
74 
78  virtual bool is_vertex(const unsigned int i) const libmesh_override;
79 
83  virtual bool is_edge(const unsigned int i) const libmesh_override;
84 
88  virtual bool is_face(const unsigned int i) const libmesh_override;
89 
94  virtual bool is_node_on_side(const unsigned int n,
95  const unsigned int s) const libmesh_override;
96 
101  virtual bool is_node_on_edge(const unsigned int n,
102  const unsigned int e) const libmesh_override
103  { return this->is_node_on_side(n,e); }
104 
109  virtual bool has_affine_map () const libmesh_override;
110 
114  virtual Order default_order() const libmesh_override { return SECOND; }
115 
119  using Elem::key;
120 
130  virtual dof_id_type key (const unsigned int s) const libmesh_override;
131 
135  virtual unsigned int which_node_am_i(unsigned int side,
136  unsigned int side_node) const libmesh_override;
137 
138  virtual UniquePtr<Elem> build_side_ptr (const unsigned int i,
139  bool proxy) libmesh_override;
140 
141  virtual void connectivity(const unsigned int sf,
142  const IOPackage iop,
143  std::vector<dof_id_type> & conn) const libmesh_override;
144 
148  virtual unsigned int n_second_order_adjacent_vertices (const unsigned int) const libmesh_override
149  { return 2; }
150 
157  virtual unsigned short int second_order_adjacent_vertex (const unsigned int n,
158  const unsigned int v) const libmesh_override;
159 
165  virtual std::pair<unsigned short int, unsigned short int>
166  second_order_child_vertex (const unsigned int n) const libmesh_override;
167 
172  static const unsigned int side_nodes_map[3][3];
173 
178  virtual Real volume () const libmesh_override;
179 
184  virtual BoundingBox loose_bounding_box () const libmesh_override;
185 
186 protected:
187 
192 
193 
194 
195 #ifdef LIBMESH_ENABLE_AMR
196 
200  virtual float embedding_matrix (const unsigned int i,
201  const unsigned int j,
202  const unsigned int k) const libmesh_override
203  { return _embedding_matrix[i][j][k]; }
204 
209  static const float _embedding_matrix[4][6][6];
210 
212 
213 #endif // LIBMESH_ENABLE_AMR
214 
215 private:
216 
221  static const unsigned short int _second_order_adjacent_vertices[3][2];
222 
226  static const unsigned short int _second_order_vertex_child_number[6];
227 
231  static const unsigned short int _second_order_vertex_child_index[6];
232 };
233 
234 
235 } // namespace libMesh
236 
237 #endif // LIBMESH_FACE_TRI6_H
A Node is like a Point, but with more information.
Definition: node.h:52
UniquePtr< Elem > side(const unsigned int i) const
Definition: elem.h:2105
virtual UniquePtr< Elem > build_side_ptr(const unsigned int i, bool proxy) libmesh_override
Definition: face_tri6.C:188
ElemType
Defines an enum for geometric element types.
virtual unsigned int n_sub_elem() const libmesh_override
Definition: face_tri6.h:73
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
The Tri is an element in 2D composed of 3 sides.
Definition: face_tri.h:47
const class libmesh_nullptr_t libmesh_nullptr
virtual bool is_edge(const unsigned int i) const libmesh_override
Definition: face_tri6.C:104
Tri6(Elem *p=libmesh_nullptr)
Constructor.
Definition: face_tri6.h:57
The libMesh namespace provides an interface to certain functionality in the library.
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const libmesh_override
Definition: face_tri6.C:411
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const libmesh_override
Definition: face_tri6.h:148
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const libmesh_override
Definition: face_tri6.C:213
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
The Tri6 is an element in 2D composed of 6 nodes.
Definition: face_tri6.h:49
virtual bool has_affine_map() const libmesh_override
Definition: face_tri6.C:128
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const libmesh_override
Definition: face_tri6.h:101
virtual dof_id_type key() const
Definition: elem.C:503
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: face_tri6.h:211
Node * _nodelinks_data[6]
Data for links to nodes.
Definition: face_tri6.h:191
virtual unsigned int n_nodes() const libmesh_override
Definition: face_tri6.h:68
virtual bool is_face(const unsigned int i) const libmesh_override
Definition: face_tri6.C:111
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const libmesh_override
Definition: face_tri6.C:177
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const libmesh_override
Definition: face_tri6.C:116
virtual BoundingBox loose_bounding_box() const libmesh_override
Definition: face_tri6.C:330
Defines a Cartesian bounding box by the two corner extremum.
Definition: bounding_box.h:40
static const unsigned short int _second_order_vertex_child_number[6]
Vector that names a child sharing each second order node.
Definition: face_tri6.h:226
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual dof_id_type key() const libmesh_override
Definition: face_tri.C:73
virtual ElemType type() const libmesh_override
Definition: face_tri6.h:63
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
static const unsigned short int _second_order_adjacent_vertices[3][2]
Matrix that tells which vertices define the location of mid-side (or second-order) nodes...
Definition: face_tri6.h:221
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const libmesh_override
Definition: face_tri6.C:432
static const unsigned int side_nodes_map[3][3]
This maps the node of the side to element node numbers.
Definition: face_tri6.h:172
static const unsigned short int _second_order_vertex_child_index[6]
Vector that names the child vertex index for each second order node.
Definition: face_tri6.h:231
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual Real volume() const libmesh_override
An optimized method for approximating the area of a TRI6 using quadrature.
Definition: face_tri6.C:361
static const float _embedding_matrix[4][6][6]
Matrix that computes new nodal locations/solution values from current nodes/solution.
Definition: face_tri6.h:209
virtual float embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const libmesh_override
Matrix used to create the elements children.
Definition: face_tri6.h:200
virtual Order default_order() const libmesh_override
Definition: face_tri6.h:114
virtual bool is_vertex(const unsigned int i) const libmesh_override
Definition: face_tri6.C:97
uint8_t dof_id_type
Definition: id_types.h:64