face_tri3.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_TRI3_H
21 #define LIBMESH_FACE_TRI3_H
22 
23 
24 // Local includes
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/face_tri.h"
27 
28 // C++ includes
29 #include <cstddef>
30 
31 namespace libMesh
32 {
33 
34 
35 // Forward declarations
36 
53 // ------------------------------------------------------------
54 // Tri3 class definition
55 class Tri3 : public Tri
56 {
57 public:
58 
62  explicit
63  Tri3 (Elem* p=NULL) :
64  Tri(Tri3::n_nodes(), p, _nodelinks_data) {}
65 
69  ElemType type () const { return TRI3; }
70 
74  unsigned int n_sub_elem() const { return 1; }
75 
79  virtual bool is_vertex(const unsigned int i) const;
80 
84  virtual bool is_edge(const unsigned int i) const;
85 
89  virtual bool is_face(const unsigned int i) const;
90 
91  /*
92  * @returns true iff the specified (local) node number is on the
93  * specified side
94  */
95  virtual bool is_node_on_side(const unsigned int n,
96  const unsigned int s) const;
97 
98  /*
99  * @returns true iff the specified (local) node number is on the
100  * specified edge (== is_node_on_side in 2D)
101  */
102  virtual bool is_node_on_edge(const unsigned int n,
103  const unsigned int e) const
104  { return this->is_node_on_side(n,e); }
105 
106  /*
107  * @returns true iff the element map is definitely affine within
108  * numerical tolerances
109  */
110  virtual bool has_affine_map () const { return true; }
111 
116  virtual bool is_linear () const { return true; }
117 
121  Order default_order() const { return FIRST; }
122 
123  AutoPtr<Elem> build_side (const unsigned int i,
124  bool proxy) const;
125 
126  virtual void connectivity(const unsigned int sf,
127  const IOPackage iop,
128  std::vector<dof_id_type>& conn) const;
129 
134  static const unsigned int side_nodes_map[3][2];
135 
136 
140  virtual Real volume () const;
141 
147  std::pair<Real, Real> min_and_max_angle() const;
148 
149 protected:
150 
155 
156 
157 
158 #ifdef LIBMESH_ENABLE_AMR
159 
163  float embedding_matrix (const unsigned int i,
164  const unsigned int j,
165  const unsigned int k) const
166  { return _embedding_matrix[i][j][k]; }
167 
172  static const float _embedding_matrix[4][3][3];
173 
174 #endif
175 
176 };
177 
178 
179 } // namespace libMesh
180 
181 #endif // LIBMESH_FACE_TRI3_H

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

Hosted By:
SourceForge.net Logo