face_quad4.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 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 
24 // Local includes
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/face_quad.h"
27 
28 // C++ includes
29 #include <cstddef>
30 
31 namespace libMesh
32 {
33 
34 
35 
36 // Forward declarations
37 
38 
39 
56 // ------------------------------------------------------------
57 // Quad4 class definition
58 class Quad4 : public Quad
59 {
60 public:
61 
65  explicit
66  Quad4 (Elem* p=NULL) :
67  Quad(Quad::n_nodes(), p, _nodelinks_data) {}
68 
72  ElemType type () const { return QUAD4; }
73 
77  unsigned int n_sub_elem() const { return 1; }
78 
82  virtual bool is_vertex(const unsigned int i) const;
83 
87  virtual bool is_edge(const unsigned int i) const;
88 
92  virtual bool is_face(const unsigned int i) const;
93 
94  /*
95  * @returns true iff the specified (local) node number is on the
96  * specified side
97  */
98  virtual bool is_node_on_side(const unsigned int n,
99  const unsigned int s) const;
100 
101  /*
102  * @returns true iff the specified (local) node number is on the
103  * specified edge (== is_node_on_side in 2D)
104  */
105  virtual bool is_node_on_edge(const unsigned int n,
106  const unsigned int e) const
107  { return this->is_node_on_side(n,e); }
108 
109  /*
110  * @returns true iff the element map is definitely affine within
111  * numerical tolerances
112  */
113  virtual bool has_affine_map () const;
114 
118  Order default_order() const { return FIRST; }
119 
120  AutoPtr<Elem> build_side (const unsigned int i,
121  bool proxy) const;
122 
123  virtual void connectivity(const unsigned int sf,
124  const IOPackage iop,
125  std::vector<dof_id_type>& conn) const;
126 
131  static const unsigned int side_nodes_map[4][2];
132 
138  virtual Real volume () const;
139 
140 protected:
141 
146 
147 
148 
149 #ifdef LIBMESH_ENABLE_AMR
150 
154  float embedding_matrix (const unsigned int i,
155  const unsigned int j,
156  const unsigned int k) const
157  { return _embedding_matrix[i][j][k]; }
158 
163  static const float _embedding_matrix[4][4][4];
164 
165 #endif
166 
167 };
168 
169 
170 } // namespace libMesh
171 
172 #endif // LIBMESH_FACE_QUAD4_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:04 UTC

Hosted By:
SourceForge.net Logo