edge_edge4.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_EDGE4_H
21 #define LIBMESH_EDGE_EDGE4_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 
43 // ------------------------------------------------------------
44 // Edge4 class definition
45 class Edge4 : public Edge
46 {
47  public:
48 
52  explicit
53  Edge4 (Elem* p=NULL) :
55 
59  unsigned int n_nodes() const { return 4; }
60 
64  unsigned int n_sub_elem() const { return 2; }
65 
69  virtual bool is_vertex(const unsigned int i) const;
70 
74  virtual bool is_edge(const unsigned int i) const;
75 
79  virtual bool is_face(const unsigned int i) const;
80 
81  /*
82  * @returns true iff the specified (local) node number is on the
83  * specified side
84  */
85  virtual bool is_node_on_side(const unsigned int n,
86  const unsigned int s) const;
87 
88  /*
89  * @returns true iff the specified (local) node number is on the
90  * specified edge (i.e. "returns true" in 1D)
91  */
92  virtual bool is_node_on_edge(const unsigned int n,
93  const unsigned int e) const;
94 
95  /*
96  * @returns true iff the element map is definitely affine within
97  * numerical tolerances
98  */
99  virtual bool has_affine_map () const;
100 
104  ElemType type() const { return EDGE4; }
105 
109  Order default_order() const { return THIRD; }
110 
111  virtual void connectivity(const unsigned int sc,
112  const IOPackage iop,
113  std::vector<dof_id_type>& conn) const;
114 
117  unsigned int n_second_order_adjacent_vertices (const unsigned int) const
118  { libmesh_error(); return 0; }
119 
122  unsigned short int second_order_adjacent_vertex (const unsigned int,
123  const unsigned int) const
124  { libmesh_error(); return 0; }
125 
126 
127 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
128 
132  bool infinite () const { return false; }
133 
134 #endif
135 
136 
137 protected:
138 
143 
144 
145 
146 #ifdef LIBMESH_ENABLE_AMR
147 
151  float embedding_matrix (const unsigned int i,
152  const unsigned int j,
153  const unsigned int k) const
154  { return _embedding_matrix[i][j][k]; }
155 
160  static const float _embedding_matrix[2][4][4];
161 
162 
163 #endif
164 };
165 
166 } // namespace libMesh
167 
168 
169 #endif // LIBMESH_EDGE_EDGE4_H

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

Hosted By:
SourceForge.net Logo