edge_edge2.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_EDGE2_H
21 #define LIBMESH_EDGE_EDGE2_H
22 
23 // Local includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/edge.h"
26 
27 // C++ includes
28 #include <cstddef>
29 
30 namespace libMesh
31 {
32 
33 
44 // ------------------------------------------------------------
45 // Edge class definition
46 class Edge2 : public Edge
47 {
48  public:
49 
53  explicit
54  Edge2 (Elem* p=NULL) :
56 
60  unsigned int n_sub_elem() const { return 1; }
61 
65  virtual bool is_vertex(const unsigned int i) const;
66 
70  virtual bool is_edge(const unsigned int i) const;
71 
75  virtual bool is_face(const unsigned int i) const;
76 
77  /*
78  * @returns true iff the specified (local) node number is on the
79  * specified side
80  */
81  virtual bool is_node_on_side(const unsigned int n,
82  const unsigned int s) const;
83 
84  /*
85  * @returns true iff the specified (local) node number is on the
86  * specified edge (i.e. "returns true" in 1D)
87  */
88  virtual bool is_node_on_edge(const unsigned int n,
89  const unsigned int e) const;
90 
91  /*
92  * @returns true iff the element map is definitely affine within
93  * numerical tolerances
94  */
95  virtual bool has_affine_map () const { return true; }
96 
101  virtual bool is_linear () const { return true; }
102 
106  ElemType type() const { return EDGE2; }
107 
111  Order default_order() const { return FIRST; }
112 
113  virtual void connectivity(const unsigned int sc,
114  const IOPackage iop,
115  std::vector<dof_id_type>& conn) const;
116 
120  virtual Real volume () const;
121 
122 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
123 
127  bool infinite () const { return false; }
128 
129 #endif
130 
131 
132 protected:
133 
138 
139 
140 
141 #ifdef LIBMESH_ENABLE_AMR
142 
146  float embedding_matrix (const unsigned int i,
147  const unsigned int j,
148  const unsigned int k) const
149  { return _embedding_matrix[i][j][k]; }
150 
155  static const float _embedding_matrix[2][2][2];
156 
157 #endif
158 };
159 
160 } // namespace libMesh
161 
162 
163 #endif // LIBMESH_EDGE_EDGE2_H

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

Hosted By:
SourceForge.net Logo