edge_edge2.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_EDGE2_H 00021 #define LIBMESH_EDGE_EDGE2_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 00033 00044 // ------------------------------------------------------------ 00045 // Edge class definition 00046 class Edge2 : public Edge 00047 { 00048 public: 00049 00053 explicit 00054 Edge2 (Elem* p=NULL) : 00055 Edge(Edge2::n_nodes(), p, _nodelinks_data) {} 00056 00060 unsigned int n_sub_elem() const { return 1; } 00061 00065 virtual bool is_vertex(const unsigned int i) const; 00066 00070 virtual bool is_edge(const unsigned int i) const; 00071 00075 virtual bool is_face(const unsigned int i) const; 00076 00077 /* 00078 * @returns true iff the specified (local) node number is on the 00079 * specified side 00080 */ 00081 virtual bool is_node_on_side(const unsigned int n, 00082 const unsigned int s) const; 00083 00084 /* 00085 * @returns true iff the specified (local) node number is on the 00086 * specified edge (i.e. "returns true" in 1D) 00087 */ 00088 virtual bool is_node_on_edge(const unsigned int n, 00089 const unsigned int e) const; 00090 00091 /* 00092 * @returns true iff the element map is definitely affine within 00093 * numerical tolerances 00094 */ 00095 virtual bool has_affine_map () const { return true; } 00096 00101 virtual bool is_linear () const { return true; } 00102 00106 ElemType type() const { return EDGE2; } 00107 00111 Order default_order() const { return FIRST; } 00112 00113 virtual void connectivity(const unsigned int sc, 00114 const IOPackage iop, 00115 std::vector<dof_id_type>& conn) const; 00116 00120 virtual Real volume () const; 00121 00122 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00123 00127 bool infinite () const { return false; } 00128 00129 #endif 00130 00131 00132 protected: 00133 00137 Node* _nodelinks_data[2]; 00138 00139 00140 00141 #ifdef LIBMESH_ENABLE_AMR 00142 00146 float embedding_matrix (const unsigned int i, 00147 const unsigned int j, 00148 const unsigned int k) const 00149 { return _embedding_matrix[i][j][k]; } 00150 00155 static const float _embedding_matrix[2][2][2]; 00156 00157 #endif 00158 }; 00159 00160 } // namespace libMesh 00161 00162 00163 #endif // LIBMESH_EDGE_EDGE2_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: