libMesh
face_quad9.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_QUAD9_H
21 #define LIBMESH_FACE_QUAD9_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 Quad9 : public Quad
50 {
51 public:
52 
56  explicit
59 
63  virtual ElemType type () const libmesh_override { return QUAD9; }
64 
68  virtual unsigned int n_nodes() const libmesh_override { return 9; }
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 
138  virtual dof_id_type key () const libmesh_override;
139 
143  virtual unsigned int which_node_am_i(unsigned int side,
144  unsigned int side_node) const libmesh_override;
145 
146  virtual UniquePtr<Elem> build_side_ptr (const unsigned int i,
147  bool proxy) libmesh_override;
148 
149  virtual void connectivity(const unsigned int sf,
150  const IOPackage iop,
151  std::vector<dof_id_type> & conn) const libmesh_override;
152 
156  virtual unsigned int n_second_order_adjacent_vertices (const unsigned int n) const libmesh_override;
157 
164  virtual unsigned short int second_order_adjacent_vertex (const unsigned int n,
165  const unsigned int v) const libmesh_override;
166 
172  virtual std::pair<unsigned short int, unsigned short int>
173  second_order_child_vertex (const unsigned int n) const libmesh_override;
174 
179  static const unsigned int side_nodes_map[4][3];
180 
185  virtual Real volume () const libmesh_override;
186 
191  virtual BoundingBox loose_bounding_box () const libmesh_override;
192 
193 protected:
194 
199 
200 
201 
202 #ifdef LIBMESH_ENABLE_AMR
203 
207  virtual float embedding_matrix (const unsigned int i,
208  const unsigned int j,
209  const unsigned int k) const libmesh_override
210  { return _embedding_matrix[i][j][k]; }
211 
216  static const float _embedding_matrix[4][9][9];
217 
219 
220 #endif // LIBMESH_ENABLE_AMR
221 
222 };
223 
224 } // namespace libMesh
225 
226 
227 #endif // LIBMESH_FACE_QUAD9_H
virtual unsigned int n_nodes() const libmesh_override
Definition: face_quad9.h:68
A Node is like a Point, but with more information.
Definition: node.h:52
virtual dof_id_type key() const libmesh_override
Compute a unique key for this element which is suitable for hashing (not necessarily unique...
Definition: face_quad9.C:204
virtual unsigned int n_sub_elem() const libmesh_override
Definition: face_quad9.h:73
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const libmesh_override
Definition: face_quad9.C:133
virtual ElemType type() const libmesh_override
Definition: face_quad9.h:63
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_quad9.C:222
virtual Real volume() const libmesh_override
An optimized method for approximating the area of a QUAD9 using quadrature.
Definition: face_quad9.C:396
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const libmesh_override
Definition: face_quad9.h:101
ElemType
Defines an enum for geometric element types.
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
static const unsigned int side_nodes_map[4][3]
This maps the node of the side to element node numbers.
Definition: face_quad9.h:179
const class libmesh_nullptr_t libmesh_nullptr
virtual Order default_order() const libmesh_override
Definition: face_quad9.h:114
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_quad9.h:207
The libMesh namespace provides an interface to certain functionality in the library.
static const float _embedding_matrix[4][9][9]
Matrix that computes new nodal locations/solution values from current nodes/solution.
Definition: face_quad9.h:216
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
virtual dof_id_type key() const
Definition: elem.C:503
virtual BoundingBox loose_bounding_box() const libmesh_override
Definition: face_quad9.C:369
The QUAD9 is an element in 2D composed of 9 nodes.
Definition: face_quad9.h:49
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int n) const libmesh_override
Definition: face_quad9.C:441
Defines a Cartesian bounding box by the two corner extremum.
Definition: bounding_box.h:40
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const libmesh_override
Definition: face_quad9.C:490
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const libmesh_override
Definition: face_quad9.C:464
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const libmesh_override
Definition: face_quad9.C:211
The QUAD is an element in 2D composed of 4 sides.
Definition: face_quad.h:48
Node * _nodelinks_data[9]
Data for links to nodes.
Definition: face_quad9.h:198
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
Quad9(Elem *p=libmesh_nullptr)
Constructor.
Definition: face_quad9.h:57
virtual bool is_edge(const unsigned int i) const libmesh_override
Definition: face_quad9.C:117
virtual bool is_face(const unsigned int i) const libmesh_override
Definition: face_quad9.C:126
virtual bool is_vertex(const unsigned int i) const libmesh_override
Definition: face_quad9.C:110
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const libmesh_override
Definition: face_quad9.C:252
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: face_quad9.h:218
virtual bool has_affine_map() const libmesh_override
Definition: face_quad9.C:145
uint8_t dof_id_type
Definition: id_types.h:64