$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_EDGE_EDGE4_H 00021 #define LIBMESH_EDGE_EDGE4_H 00022 00023 // Local includes 00024 #include "libmesh/libmesh_common.h" 00025 #include "libmesh/edge.h" 00026 00027 // C++ includes 00028 #include <cstddef> 00029 00030 namespace libMesh 00031 { 00032 00042 class Edge4 : public Edge 00043 { 00044 public: 00045 00049 explicit 00050 Edge4 (Elem* p=NULL) : 00051 Edge(Edge4::n_nodes(), p, _nodelinks_data) {} 00052 00056 unsigned int n_nodes() const { return 4; } 00057 00061 unsigned int n_sub_elem() const { return 2; } 00062 00066 virtual bool is_vertex(const unsigned int i) const; 00067 00071 virtual bool is_edge(const unsigned int i) const; 00072 00076 virtual bool is_face(const unsigned int i) const; 00077 00078 /* 00079 * @returns true iff the specified (local) node number is on the 00080 * specified side 00081 */ 00082 virtual bool is_node_on_side(const unsigned int n, 00083 const unsigned int s) const; 00084 00085 /* 00086 * @returns true iff the specified (local) node number is on the 00087 * specified edge (i.e. "returns true" in 1D) 00088 */ 00089 virtual bool is_node_on_edge(const unsigned int n, 00090 const unsigned int e) const; 00091 00092 /* 00093 * @returns true iff the element map is definitely affine within 00094 * numerical tolerances 00095 */ 00096 virtual bool has_affine_map () const; 00097 00101 ElemType type() const { return EDGE4; } 00102 00106 Order default_order() const { return THIRD; } 00107 00108 virtual void connectivity(const unsigned int sc, 00109 const IOPackage iop, 00110 std::vector<dof_id_type>& conn) const; 00111 00114 unsigned int n_second_order_adjacent_vertices (const unsigned int) const 00115 { libmesh_not_implemented(); return 0; } 00116 00119 unsigned short int second_order_adjacent_vertex (const unsigned int, 00120 const unsigned int) const 00121 { libmesh_not_implemented(); return 0; } 00122 00123 00124 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00125 00129 bool infinite () const { return false; } 00130 00131 #endif 00132 00133 00134 protected: 00135 00139 Node* _nodelinks_data[4]; 00140 00141 00142 00143 #ifdef LIBMESH_ENABLE_AMR 00144 00148 float embedding_matrix (const unsigned int i, 00149 const unsigned int j, 00150 const unsigned int k) const 00151 { return _embedding_matrix[i][j][k]; } 00152 00157 static const float _embedding_matrix[2][4][4]; 00158 00159 00160 #endif 00161 }; 00162 00163 } // namespace libMesh 00164 00165 00166 #endif // LIBMESH_EDGE_EDGE4_H