edge_edge3.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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_EDGE3_H 00021 #define LIBMESH_EDGE_EDGE3_H 00022 00023 00024 // Local includes 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/edge.h" 00027 00028 // C++ includes 00029 #include <cstddef> 00030 00031 namespace libMesh 00032 { 00033 00034 00035 00046 // ------------------------------------------------------------ 00047 // Edge3 class definition 00048 class Edge3 : public Edge 00049 { 00050 public: 00051 00055 explicit 00056 Edge3 (Elem* p=NULL) : 00057 Edge(Edge3::n_nodes(), p, _nodelinks_data) {} 00058 00062 unsigned int n_nodes() const { return 3; } 00063 00067 unsigned int n_sub_elem() const { return 2; } 00068 00072 virtual bool is_vertex(const unsigned int i) const; 00073 00077 virtual bool is_edge(const unsigned int i) const; 00078 00082 virtual bool is_face(const unsigned int i) const; 00083 00084 /* 00085 * @returns true iff the specified (local) node number is on the 00086 * specified side 00087 */ 00088 virtual bool is_node_on_side(const unsigned int n, 00089 const unsigned int s) const; 00090 00091 /* 00092 * @returns true iff the specified (local) node number is on the 00093 * specified edge (i.e. "returns true" in 1D) 00094 */ 00095 virtual bool is_node_on_edge(const unsigned int n, 00096 const unsigned int e) const; 00097 00098 /* 00099 * @returns true iff the element map is definitely affine within 00100 * numerical tolerances 00101 */ 00102 virtual bool has_affine_map () const; 00103 00107 ElemType type() const { return EDGE3; } 00108 00112 Order default_order() const { return SECOND; } 00113 00114 virtual void connectivity(const unsigned int sc, 00115 const IOPackage iop, 00116 std::vector<dof_id_type>& conn) const; 00117 00121 unsigned int n_second_order_adjacent_vertices (const unsigned int) const 00122 { return 2; } 00123 00128 unsigned short int second_order_adjacent_vertex (const unsigned int, 00129 const unsigned int v) const 00130 { return static_cast<unsigned short int>(v); } 00131 00141 virtual std::pair<unsigned short int, unsigned short int> 00142 second_order_child_vertex (const unsigned int n) const; 00143 00147 virtual Real volume () const; 00148 00149 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00150 00154 bool infinite () const { return false; } 00155 00156 #endif 00157 00158 00159 protected: 00160 00164 Node* _nodelinks_data[3]; 00165 00166 00167 00168 #ifdef LIBMESH_ENABLE_AMR 00169 00173 float embedding_matrix (const unsigned int i, 00174 const unsigned int j, 00175 const unsigned int k) const 00176 { return _embedding_matrix[i][j][k]; } 00177 00182 static const float _embedding_matrix[2][3][3]; 00183 00184 #endif 00185 }; 00186 00187 } // namespace libMesh 00188 00189 00190 #endif // LIBMESH_EDGE_EDGE3_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: