face_quad.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_QUAD_H
21 #define LIBMESH_FACE_QUAD_H
22 
23 
24 // Local includes
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/face.h"
27 
28 // C++ includes
29 
30 namespace libMesh
31 {
32 
33 
34 // Forward declarations
35 
36 
53 // ------------------------------------------------------------
54 // Quad class definition
55 class Quad : public Face
56 {
57 public:
58 
63  Quad (const unsigned int nn, Elem* p, Node** nodelinkdata) :
64  Face(nn, Quad::n_sides(), p, _elemlinks_data, nodelinkdata) {}
65 
70  unsigned int n_nodes() const { return 4; }
71 
75  unsigned int n_sides() const { return 4; }
76 
80  unsigned int n_vertices() const { return 4; }
81 
85  unsigned int n_edges() const { return 4; }
86 
90  unsigned int n_children() const { return 4; }
91 
92  /*
93  * @returns true iff the specified child is on the
94  * specified side
95  */
96  virtual bool is_child_on_side(const unsigned int c,
97  const unsigned int s) const;
98 
103  virtual unsigned int opposite_side(const unsigned int s) const;
104 
110  virtual unsigned int opposite_node(const unsigned int n,
111  const unsigned int s) const;
112 
118  dof_id_type key (const unsigned int s) const;
119 
124  AutoPtr<Elem> side (const unsigned int i) const;
125 
130  Real quality (const ElemQuality q) const;
131 
137  std::pair<Real, Real> qual_bounds (const ElemQuality q) const;
138 
139 protected:
140 
144  Elem* _elemlinks_data[5+(LIBMESH_DIM>2)];
145 
152  static const unsigned short int _second_order_adjacent_vertices[4][2];
153 
157  static const unsigned short int _second_order_vertex_child_number[9];
158 
162  static const unsigned short int _second_order_vertex_child_index[9];
163 };
164 
165 
166 // ------------------------------------------------------------
167 // Quad class member functions
168 
169 
170 } // namespace libMesh
171 
172 #endif // LIBMESH_FACE_QUAD_H

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

Hosted By:
SourceForge.net Logo