libMesh
face_quad4.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_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 
49 class Quad4 : public Quad
50 {
51 public:
52 
56  explicit
59 
63  virtual ElemType type () const libmesh_override { return QUAD4; }
64 
68  virtual unsigned int n_sub_elem() const libmesh_override { return 1; }
69 
73  virtual bool is_vertex(const unsigned int i) const libmesh_override;
74 
78  virtual bool is_edge(const unsigned int i) const libmesh_override;
79 
83  virtual bool is_face(const unsigned int i) const libmesh_override;
84 
89  virtual bool is_node_on_side(const unsigned int n,
90  const unsigned int s) const libmesh_override;
91 
96  virtual bool is_node_on_edge(const unsigned int n,
97  const unsigned int e) const libmesh_override
98  { return this->is_node_on_side(n,e); }
99 
104  virtual bool has_affine_map () const libmesh_override;
105 
109  virtual Order default_order() const libmesh_override { return FIRST; }
110 
111  virtual UniquePtr<Elem> build_side_ptr (const unsigned int i,
112  bool proxy) libmesh_override;
113 
114  virtual void connectivity(const unsigned int sf,
115  const IOPackage iop,
116  std::vector<dof_id_type> & conn) const libmesh_override;
117 
122  static const unsigned int side_nodes_map[4][2];
123 
129  virtual Real volume () const libmesh_override;
130 
131 protected:
132 
137 
138 
139 
140 #ifdef LIBMESH_ENABLE_AMR
141 
145  virtual float embedding_matrix (const unsigned int i,
146  const unsigned int j,
147  const unsigned int k) const libmesh_override
148  { return _embedding_matrix[i][j][k]; }
149 
154  static const float _embedding_matrix[4][4][4];
155 
157 
158 #endif // LIBMESH_ENABLE_AMR
159 
160 };
161 
162 
163 } // namespace libMesh
164 
165 #endif // LIBMESH_FACE_QUAD4_H
virtual ElemType type() const libmesh_override
Definition: face_quad4.h:63
A Node is like a Point, but with more information.
Definition: node.h:52
virtual bool is_vertex(const unsigned int i) const libmesh_override
Definition: face_quad4.C:92
The QUAD4 is an element in 2D composed of 4 nodes.
Definition: face_quad4.h:49
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const libmesh_override
Definition: face_quad4.C:155
virtual bool has_affine_map() const libmesh_override
Definition: face_quad4.C:119
ElemType
Defines an enum for geometric element types.
static const unsigned int side_nodes_map[4][2]
This maps the node of the side to element node numbers.
Definition: face_quad4.h:122
This is the base class from which all geometric element types are derived.
Definition: elem.h:89
const class libmesh_nullptr_t libmesh_nullptr
Node * _nodelinks_data[4]
Data for links to nodes.
Definition: face_quad4.h:136
virtual Order default_order() const libmesh_override
Definition: face_quad4.h:109
LIBMESH_ENABLE_TOPOLOGY_CACHES
Definition: face_quad4.h:156
The libMesh namespace provides an interface to certain functionality in the library.
virtual UniquePtr< Elem > build_side_ptr(const unsigned int i, bool proxy) libmesh_override
Definition: face_quad4.C:127
std::unique_ptr< T > UniquePtr
Definition: auto_ptr.h:46
virtual bool is_face(const unsigned int i) const libmesh_override
Definition: face_quad4.C:102
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_quad4.h:145
static const float _embedding_matrix[4][4][4]
Matrix that computes new nodal locations/solution values from current nodes/solution.
Definition: face_quad4.h:154
virtual unsigned int n_nodes() const libmesh_override
Definition: face_quad.h:80
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const libmesh_override
Definition: face_quad4.C:107
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool is_edge(const unsigned int i) const libmesh_override
Definition: face_quad4.C:97
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 is_node_on_edge(const unsigned int n, const unsigned int e) const libmesh_override
Definition: face_quad4.h:96
virtual unsigned int n_sub_elem() const libmesh_override
Definition: face_quad4.h:68
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 computing the area of a 4-node quad with straight sides, but not necessarily ...
Definition: face_quad4.C:192
Quad4(Elem *p=libmesh_nullptr)
Constructor.
Definition: face_quad4.h:57