face_tri.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_TRI_H
21 #define LIBMESH_FACE_TRI_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 
37 
38 
39 
55 // ------------------------------------------------------------
56 // Tri class definition
57 class Tri : public Face
58 {
59 public:
60 
65  Tri (const unsigned int nn,
66  Elem* p,
67  Node** nodelinkdata) :
68  Face(nn, Tri::n_sides(), p, _elemlinks_data, nodelinkdata) {}
69 
74  unsigned int n_nodes() const { return 3; }
75 
79  unsigned int n_sides() const { return 3; }
80 
84  unsigned int n_vertices() const { return 3; }
85 
89  unsigned int n_edges() const { return 3; }
90 
94  unsigned int n_children() const { return 4; }
95 
96  /*
97  * @returns true iff the specified child is on the
98  * specified side
99  */
100  virtual bool is_child_on_side(const unsigned int c,
101  const unsigned int s) const;
102 
108  dof_id_type key (const unsigned int s) const;
109 
114  AutoPtr<Elem> side (const unsigned int i) const;
115 
120  Real quality (const ElemQuality q) const;
121 
127  std::pair<Real, Real> qual_bounds (const ElemQuality q) const;
128 
129 
130 protected:
131 
135  Elem* _elemlinks_data[4+(LIBMESH_DIM>2)];
136 };
137 
138 // ------------------------------------------------------------
139 // Tri class member functions
140 
141 } // namespace libMesh
142 
143 #endif // LIBMESH_FACE_TRI_H

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

Hosted By:
SourceForge.net Logo