face_quad4.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_QUAD4_H
21 #define LIBMESH_FACE_QUAD4_H
22 
23 // Local includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/face_quad.h"
26 
27 namespace libMesh
28 {
29 
51 class Quad4 : public Quad
52 {
53 public:
54 
58  explicit
59  Quad4 (Elem * p=nullptr) :
61 
62  Quad4 (Quad4 &&) = delete;
63  Quad4 (const Quad4 &) = delete;
64  Quad4 & operator= (const Quad4 &) = delete;
65  Quad4 & operator= (Quad4 &&) = delete;
66  virtual ~Quad4() = default;
67 
71  virtual ElemType type () const override { return QUAD4; }
72 
76  virtual unsigned int n_sub_elem() const override { return 1; }
77 
81  virtual bool is_vertex(const unsigned int i) const override;
82 
86  virtual bool is_edge(const unsigned int i) const override;
87 
91  virtual bool is_face(const unsigned int i) const override;
92 
97  virtual bool is_node_on_side(const unsigned int n,
98  const unsigned int s) const override;
99 
100  virtual std::vector<unsigned int> nodes_on_side(const unsigned int s) const override;
101 
106  virtual bool is_node_on_edge(const unsigned int n,
107  const unsigned int e) const override
108  { return this->is_node_on_side(n,e); }
109 
114  virtual bool has_affine_map () const override;
115 
119  virtual Order default_order() const override;
120 
121  virtual std::unique_ptr<Elem> build_side_ptr (const unsigned int i,
122  bool proxy) override;
123 
127  virtual void build_side_ptr (std::unique_ptr<Elem> & elem,
128  const unsigned int i) override;
129 
130  virtual void connectivity(const unsigned int sf,
131  const IOPackage iop,
132  std::vector<dof_id_type> & conn) const override;
133 
137  static const int num_nodes = 4;
138  static const int num_sides = 4;
139  static const int num_children = 4;
140  static const int nodes_per_side = 2;
141 
146  static const unsigned int side_nodes_map[num_sides][nodes_per_side];
147 
153  virtual Real volume () const override;
154 
158  virtual BoundingBox loose_bounding_box () const override;
159 
160 protected:
161 
166 
167 
168 
169 #ifdef LIBMESH_ENABLE_AMR
170 
174  virtual float embedding_matrix (const unsigned int i,
175  const unsigned int j,
176  const unsigned int k) const override
177  { return _embedding_matrix[i][j][k]; }
178 
184 
186 
187 #endif // LIBMESH_ENABLE_AMR
188 
189 };
190 
191 
192 } // namespace libMesh
193 
194 #endif // LIBMESH_FACE_QUAD4_H
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition: face_quad4.C:112
Node * _nodelinks_data[num_nodes]
Definition: face_quad4.h:165
A geometric point in (x,y,z) space associated with a DOF.
Definition: node.h:52
virtual ElemType type() const override
Definition: face_quad4.h:71
A 2D quadrilateral element with 4 nodes.
Definition: face_quad4.h:51
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
Definition: face_quad4.h:146
virtual float embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const override
Definition: face_quad4.h:174
static const float _embedding_matrix[num_children][num_nodes][num_nodes]
Definition: face_quad4.h:183
The base class for all geometric element types.
Definition: elem.h:100
virtual bool has_affine_map() const override
Definition: face_quad4.C:128
virtual bool is_edge(const unsigned int i) const override
Definition: face_quad4.C:102
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: face_quad4.h:185
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition: face_quad4.h:106
virtual bool is_vertex(const unsigned int i) const override
Definition: face_quad4.C:97
virtual ~Quad4()=default
virtual Order default_order() const override
Definition: face_quad4.C:136
virtual BoundingBox loose_bounding_box() const override
Definition: face_quad4.C:259
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition: face_quad4.C:122
static const int nodes_per_side
Definition: face_quad4.h:140
static const int num_sides
Definition: face_quad4.h:138
Quad4(Elem *p=nullptr)
Definition: face_quad4.h:59
static const int num_nodes
Definition: face_quad4.h:137
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real volume() const override
Definition: face_quad4.C:221
The base class for all quadrilateral element types.
Definition: face_quad.h:48
virtual unsigned int n_nodes() const override
Definition: face_quad.h:86
virtual bool is_face(const unsigned int i) const override
Definition: face_quad4.C:107
Quad4 & operator=(const Quad4 &)=delete
static const int num_children
Definition: face_quad4.h:139
virtual unsigned int n_sub_elem() const override
Definition: face_quad4.h:76
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy) override
Definition: face_quad4.C:143
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition: face_quad4.C:184