elem_type.C
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 // C++ includes 00019 #include <iostream> 00020 00021 // Local includes 00022 #include "libmesh/elem_type.h" 00023 00024 namespace libMesh 00025 { 00026 00027 // ------------------------------------------------------------ 00028 // Element type definitions 00029 00030 00031 std::string ElementTypes::basic_name (const ElemType t) 00032 { 00033 std::string its_name; 00034 switch (t) 00035 { 00036 case EDGE2: 00037 case EDGE3: 00038 case EDGE4: 00039 { 00040 its_name = "Edge"; 00041 break; 00042 } 00043 00044 case TRI3: 00045 case TRI6: 00046 { 00047 its_name = "Triangle"; 00048 break; 00049 } 00050 00051 case QUAD4: 00052 case QUAD8: 00053 case QUAD9: 00054 { 00055 its_name = "Quadrilateral"; 00056 break; 00057 } 00058 00059 case TET4: 00060 case TET10: 00061 { 00062 its_name = "Tetrahedron"; 00063 break; 00064 } 00065 00066 case HEX8: 00067 case HEX20: 00068 case HEX27: 00069 { 00070 its_name = "Hexahedron"; 00071 break; 00072 } 00073 00074 case PRISM6: 00075 case PRISM18: 00076 { 00077 its_name = "Prism"; 00078 break; 00079 } 00080 00081 case PYRAMID5: 00082 { 00083 its_name = "Pyramid"; 00084 break; 00085 } 00086 00087 00088 00089 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00090 00091 // infinite elements 00092 case INFEDGE2: 00093 { 00094 its_name = "Infinite Edge"; 00095 break; 00096 } 00097 00098 case INFQUAD4: 00099 case INFQUAD6: 00100 { 00101 its_name = "Infinite Quadrilateral"; 00102 break; 00103 } 00104 00105 case INFHEX8: 00106 case INFHEX16: 00107 case INFHEX18: 00108 { 00109 its_name = "Infinite Hexahedron"; 00110 break; 00111 } 00112 00113 case INFPRISM6: 00114 case INFPRISM12: 00115 { 00116 its_name = "Infinite Prism"; 00117 break; 00118 } 00119 00120 #endif 00121 00122 00123 default: 00124 { 00125 libMesh::out << "Undefined element type!." << std::endl; 00126 libmesh_error(); 00127 } 00128 } 00129 return its_name; 00130 } 00131 00132 00133 std::string ElementTypes::name(const ElemType t) 00134 { 00135 std::string its_name; 00136 switch (t) 00137 { 00138 case EDGE2: 00139 { 00140 its_name = "Edge 2"; 00141 break; 00142 } 00143 00144 case EDGE3: 00145 { 00146 its_name = "Edge 3"; 00147 break; 00148 } 00149 00150 case EDGE4: 00151 { 00152 its_name = "Edge 4"; 00153 break; 00154 } 00155 00156 case TRI3: 00157 { 00158 its_name = "Tri 3"; 00159 break; 00160 } 00161 00162 case TRI6: 00163 { 00164 its_name = "Tri 6"; 00165 break; 00166 } 00167 00168 case QUAD4: 00169 { 00170 its_name = "Quad 4"; 00171 break; 00172 } 00173 00174 case QUAD8: 00175 { 00176 its_name = "Quad 8"; 00177 break; 00178 } 00179 00180 case QUAD9: 00181 { 00182 its_name = "Quad 9"; 00183 break; 00184 } 00185 00186 case TET4: 00187 { 00188 its_name = "Tet 4"; 00189 break; 00190 } 00191 00192 case TET10: 00193 { 00194 its_name = "Tet 10"; 00195 break; 00196 } 00197 00198 case HEX8: 00199 { 00200 its_name = "Hex 8"; 00201 break; 00202 } 00203 00204 case HEX20: 00205 { 00206 its_name = "Hex 20"; 00207 break; 00208 } 00209 00210 case HEX27: 00211 { 00212 its_name = "Hex 27"; 00213 break; 00214 } 00215 00216 case PRISM6: 00217 { 00218 its_name = "Prism 6"; 00219 break; 00220 } 00221 00222 case PRISM18: 00223 { 00224 its_name = "Prism 8"; 00225 break; 00226 } 00227 00228 case PYRAMID5: 00229 { 00230 its_name = "Pyramid 5"; 00231 break; 00232 } 00233 00234 00235 00236 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS 00237 00238 case INFEDGE2: 00239 { 00240 its_name = "Infinite Edge 2"; 00241 break; 00242 } 00243 00244 case INFQUAD4: 00245 { 00246 its_name = "Infinite Quad 4"; 00247 break; 00248 } 00249 00250 case INFQUAD6: 00251 { 00252 its_name = "Infinite Quad 6"; 00253 break; 00254 } 00255 00256 case INFHEX8: 00257 { 00258 its_name = "Infinite Hex 8"; 00259 break; 00260 } 00261 00262 case INFHEX16: 00263 { 00264 its_name = "Infinite Hex 16"; 00265 break; 00266 } 00267 00268 case INFHEX18: 00269 { 00270 its_name = "Infinite Hex 18"; 00271 break; 00272 } 00273 00274 case INFPRISM6: 00275 { 00276 its_name = "Infinite Prism 6"; 00277 break; 00278 } 00279 00280 case INFPRISM12: 00281 { 00282 its_name = "Infinite Prism 12"; 00283 break; 00284 } 00285 00286 #endif 00287 00288 00289 00290 default: 00291 { 00292 libMesh::err << "Undefined element type!." << std::endl; 00293 libmesh_error(); 00294 } 00295 } 00296 return its_name; 00297 } 00298 00299 } // namespace libMesh
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: