$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 // Local includes 00021 #include "libmesh/libmesh_config.h" 00022 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00023 00024 #include "libmesh/edge_inf_edge2.h" 00025 00026 namespace libMesh 00027 { 00028 00029 00030 // ------------------------------------------------------------ 00031 // InfEdge2 class member functions 00032 00033 bool InfEdge2::is_vertex(const unsigned int i) const 00034 { 00035 if (i) 00036 return false; 00037 return true; 00038 } 00039 00040 bool InfEdge2::is_edge(const unsigned int i) const 00041 { 00042 if (i) 00043 return true; 00044 return false; 00045 } 00046 00047 bool InfEdge2::is_face(const unsigned int) const 00048 { 00049 return false; 00050 } 00051 00052 bool InfEdge2::is_node_on_side(const unsigned int n, 00053 const unsigned int s) const 00054 { 00055 libmesh_assert_less (s, 1); 00056 return (s == n); 00057 } 00058 00059 bool InfEdge2::is_node_on_edge(const unsigned int, 00060 const unsigned int libmesh_dbg_var(e)) const 00061 { 00062 libmesh_assert_equal_to (e, 0); 00063 return true; 00064 } 00065 00066 void InfEdge2::connectivity(const unsigned int libmesh_dbg_var(se), 00067 const IOPackage iop, 00068 std::vector<dof_id_type>& conn) const 00069 { 00070 libmesh_assert_equal_to (se, 0); 00071 libmesh_assert_less (se, this->n_sub_elem()); 00072 libmesh_assert_not_equal_to (iop, INVALID_IO_PACKAGE); 00073 00074 conn.resize(2); 00075 00076 switch (iop) 00077 { 00078 case TECPLOT: 00079 { 00080 conn[0] = this->node(0)+1; 00081 conn[1] = this->node(1)+1; 00082 return; 00083 } 00084 00085 case VTK: 00086 { 00087 conn[0] = this->node(0); 00088 conn[1] = this->node(1); 00089 return; 00090 } 00091 00092 default: 00093 libmesh_error_msg("Unsupported IO package " << iop); 00094 } 00095 } 00096 00097 } // namespace libMesh 00098 00099 00100 #endif