libMesh
face_quad8.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_QUAD8_H
21 #define LIBMESH_FACE_QUAD8_H
22 
23 // Local includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/face_quad.h"
26 
27 namespace libMesh
28 {
29 
49 class Quad8 : public Quad
50 {
51 public:
52 
56  explicit
59 
63  virtual ElemType type () const libmesh_override { return QUAD8; }
64 
68  virtual unsigned int n_nodes() const libmesh_override { return 8; }
69 
73  virtual unsigned int n_sub_elem() const libmesh_override { return 5; }
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[4][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][8][8];
210 
212 
213 #endif // LIBMESH_ENABLE_AMR
214 
215 };
216 
217 
218 } // namespace libMesh
219 
220 #endif // LIBMESH_FACE_QUAD8_H
A Node is like a Point, but with more information.
Definition: node.h:52
virtual unsigned int n_nodes() const libmesh_override
Definition: face_quad8.h:68
static const float _embedding_matrix[4][8][8]
Matrix that computes new nodal locations/solution values from current nodes/solution.
Definition: face_quad8.h:209
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const libmesh_override
Definition: face_quad8.C:125
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const libmesh_override
Definition: face_quad8.C:233
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const libmesh_override
Definition: face_quad8.h:148
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: face_quad8.h:211
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const libmesh_override
Definition: face_quad8.C:468
virtual dof_id_type key() const libmesh_override
Definition: face_quad.C:74
Node * _nodelinks_data[8]
Data for links to nodes.
Definition: face_quad8.h:191
UniquePtr< Elem > side(const unsigned int i) const
Definition: elem.h:2105
virtual unsigned int n_sub_elem() const libmesh_override
Definition: face_quad8.h:73
virtual Order default_order() const libmesh_override
Definition: face_quad8.h:114
ElemType
Defines an enum for geometric element types.
static const unsigned int side_nodes_map[4][3]
This maps the node of the side to element node numbers.
Definition: face_quad8.h:172
virtual bool is_vertex(const unsigned int i) const libmesh_override
Definition: face_quad8.C:106
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 QUAD8 is an element in 2D composed of 8 nodes.
Definition: face_quad8.h:49
The libMesh namespace provides an interface to certain functionality in the library.
Quad8(Elem *p=libmesh_nullptr)
Constructor.
Definition: face_quad8.h:57
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
virtual UniquePtr< Elem > build_side_ptr(const unsigned int i, bool proxy) libmesh_override
Definition: face_quad8.C:204
virtual dof_id_type key() const
Definition: elem.C:503
virtual bool is_edge(const unsigned int i) const libmesh_override
Definition: face_quad8.C:113
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const libmesh_override
Definition: face_quad8.h:101
virtual Real volume() const libmesh_override
An optimized method for approximating the area of a QUAD8 using quadrature.
Definition: face_quad8.C:409
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const libmesh_override
Definition: face_quad8.C:455
Defines a Cartesian bounding box by the two corner extremum.
Definition: bounding_box.h:40
virtual BoundingBox loose_bounding_box() const libmesh_override
Definition: face_quad8.C:379
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_quad8.h:200
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const libmesh_override
Definition: face_quad8.C:193
The QUAD is an element in 2D composed of 4 sides.
Definition: face_quad.h:48
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
virtual bool has_affine_map() const libmesh_override
Definition: face_quad8.C:137
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual ElemType type() const libmesh_override
Definition: face_quad8.h:63
uint8_t dof_id_type
Definition: id_types.h:64
virtual bool is_face(const unsigned int i) const libmesh_override
Definition: face_quad8.C:120