edge_inf_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_INF_EDGE2_H 00021 #define LIBMESH_EDGE_INF_EDGE2_H 00022 00023 #include "libmesh/libmesh_common.h" 00024 00025 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00026 00027 // Local includes 00028 #include "libmesh/edge.h" 00029 00030 // C++ includes 00031 #include <cstddef> 00032 00033 namespace libMesh 00034 { 00035 00036 00053 // ------------------------------------------------------------ 00054 // InfEdge2 class definition 00055 class InfEdge2 : public Edge 00056 { 00057 public: 00058 00062 explicit 00063 InfEdge2 (Elem* p=NULL) : 00064 Edge(InfEdge2::n_nodes(), p, _nodelinks_data) {} 00065 00069 unsigned int n_sub_elem() const { return 1; } 00070 00074 virtual bool is_vertex(const unsigned int i) const; 00075 00079 virtual bool is_edge(const unsigned int i) const; 00080 00084 virtual bool is_face(const unsigned int i) const; 00085 00086 /* 00087 * @returns true iff the specified (local) node number is on the 00088 * specified side 00089 */ 00090 virtual bool is_node_on_side(const unsigned int n, 00091 const unsigned int s) const; 00092 00093 /* 00094 * @returns true iff the specified (local) node number is on the 00095 * specified edge (i.e. "returns true" in 1D) 00096 */ 00097 virtual bool is_node_on_edge(const unsigned int n, 00098 const unsigned int e) const; 00099 00103 ElemType type() const { return INFEDGE2; } 00104 00108 Order default_order() const { return FIRST; } 00109 00110 virtual void connectivity(const unsigned int se, 00111 const IOPackage iop, 00112 std::vector<dof_id_type>& conn) const; 00113 00114 // const std::vector<unsigned int> tecplot_connectivity(const unsigned int se=0) const; 00115 00116 // void vtk_connectivity(const unsigned int se, 00117 // std::vector<unsigned int>*conn = NULL) const; 00118 00119 // unsigned int vtk_element_type (const unsigned int) const 00120 // { return 3; } 00121 00122 00123 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00124 00128 bool infinite () const { return true; } 00129 00133 Point origin () const; 00134 00135 #endif 00136 00137 00138 protected: 00139 00143 Node* _nodelinks_data[2]; 00144 00145 00146 00147 #ifdef LIBMESH_ENABLE_AMR 00148 00152 float embedding_matrix (const unsigned int, 00153 const unsigned int, 00154 const unsigned int) const 00155 { libmesh_error(); return 0.; } 00156 00157 #endif 00158 }; 00159 00160 00161 00162 00163 // ------------------------------------------------------------ 00164 // InfEdge2 class member functions 00165 inline 00166 Point InfEdge2::origin () const 00167 { 00168 return ( this->point(0)*2 - this->point(1) ); 00169 } 00170 00171 00172 } // namespace libMesh 00173 00174 #endif 00175 00176 #endif // LIBMESH_EDGE_INF_EDGE2_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: