edge_edge3.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_EDGE_EDGE3_H
21 #define LIBMESH_EDGE_EDGE3_H
22 
23 
24 // Local includes
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/edge.h"
27 
28 // C++ includes
29 #include <cstddef>
30 
31 namespace libMesh
32 {
33 
34 
35 
46 // ------------------------------------------------------------
47 // Edge3 class definition
48 class Edge3 : public Edge
49 {
50  public:
51 
55  explicit
56  Edge3 (Elem* p=NULL) :
58 
62  unsigned int n_nodes() const { return 3; }
63 
67  unsigned int n_sub_elem() const { return 2; }
68 
72  virtual bool is_vertex(const unsigned int i) const;
73 
77  virtual bool is_edge(const unsigned int i) const;
78 
82  virtual bool is_face(const unsigned int i) const;
83 
84  /*
85  * @returns true iff the specified (local) node number is on the
86  * specified side
87  */
88  virtual bool is_node_on_side(const unsigned int n,
89  const unsigned int s) const;
90 
91  /*
92  * @returns true iff the specified (local) node number is on the
93  * specified edge (i.e. "returns true" in 1D)
94  */
95  virtual bool is_node_on_edge(const unsigned int n,
96  const unsigned int e) const;
97 
98  /*
99  * @returns true iff the element map is definitely affine within
100  * numerical tolerances
101  */
102  virtual bool has_affine_map () const;
103 
107  ElemType type() const { return EDGE3; }
108 
112  Order default_order() const { return SECOND; }
113 
114  virtual void connectivity(const unsigned int sc,
115  const IOPackage iop,
116  std::vector<dof_id_type>& conn) const;
117 
121  unsigned int n_second_order_adjacent_vertices (const unsigned int) const
122  { return 2; }
123 
128  unsigned short int second_order_adjacent_vertex (const unsigned int,
129  const unsigned int v) const
130  { return static_cast<unsigned short int>(v); }
131 
141  virtual std::pair<unsigned short int, unsigned short int>
142  second_order_child_vertex (const unsigned int n) const;
143 
147  virtual Real volume () const;
148 
149 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
150 
154  bool infinite () const { return false; }
155 
156 #endif
157 
158 
159 protected:
160 
165 
166 
167 
168 #ifdef LIBMESH_ENABLE_AMR
169 
173  float embedding_matrix (const unsigned int i,
174  const unsigned int j,
175  const unsigned int k) const
176  { return _embedding_matrix[i][j][k]; }
177 
182  static const float _embedding_matrix[2][3][3];
183 
184 #endif
185 };
186 
187 } // namespace libMesh
188 
189 
190 #endif // LIBMESH_EDGE_EDGE3_H

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

Hosted By:
SourceForge.net Logo