libMesh::ElementTypes Namespace Reference

Functions

std::string basic_name (const ElemType t)
 
std::string name (const ElemType t)
 

Variables

const unsigned int num_types = 24
 

Function Documentation

std::string libMesh::ElementTypes::basic_name ( const ElemType  t)

Returns a standard string representation of the basic name for element type t. For example, a HEX27 has the basic name of "Hexahedron".

Definition at line 31 of file elem_type.C.

References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::EDGE4, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMesh::out, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID14, libMeshEnums::PYRAMID5, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.

32 {
33  std::string its_name;
34  switch (t)
35  {
36  case EDGE2:
37  case EDGE3:
38  case EDGE4:
39  {
40  its_name = "Edge";
41  break;
42  }
43 
44  case TRI3:
45  case TRI6:
46  {
47  its_name = "Triangle";
48  break;
49  }
50 
51  case QUAD4:
52  case QUAD8:
53  case QUAD9:
54  {
55  its_name = "Quadrilateral";
56  break;
57  }
58 
59  case TET4:
60  case TET10:
61  {
62  its_name = "Tetrahedron";
63  break;
64  }
65 
66  case HEX8:
67  case HEX20:
68  case HEX27:
69  {
70  its_name = "Hexahedron";
71  break;
72  }
73 
74  case PRISM6:
75  case PRISM18:
76  {
77  its_name = "Prism";
78  break;
79  }
80 
81  case PYRAMID5:
82  case PYRAMID14:
83  {
84  its_name = "Pyramid";
85  break;
86  }
87 
88 
89 
90 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
91 
92  // infinite elements
93  case INFEDGE2:
94  {
95  its_name = "Infinite Edge";
96  break;
97  }
98 
99  case INFQUAD4:
100  case INFQUAD6:
101  {
102  its_name = "Infinite Quadrilateral";
103  break;
104  }
105 
106  case INFHEX8:
107  case INFHEX16:
108  case INFHEX18:
109  {
110  its_name = "Infinite Hexahedron";
111  break;
112  }
113 
114  case INFPRISM6:
115  case INFPRISM12:
116  {
117  its_name = "Infinite Prism";
118  break;
119  }
120 
121 #endif
122 
123 
124  default:
125  {
126  libMesh::out << "Undefined element type!." << std::endl;
127  libmesh_error();
128  }
129  }
130  return its_name;
131 }
std::string libMesh::ElementTypes::name ( const ElemType  t)

Returns a standard string representation for the specific name of element type t. For example, HEX27 returns "Hex 27".

Definition at line 134 of file elem_type.C.

References libMeshEnums::EDGE2, libMeshEnums::EDGE3, libMeshEnums::EDGE4, libMesh::err, libMeshEnums::HEX20, libMeshEnums::HEX27, libMeshEnums::HEX8, libMeshEnums::INFEDGE2, libMeshEnums::INFHEX16, libMeshEnums::INFHEX18, libMeshEnums::INFHEX8, libMeshEnums::INFPRISM12, libMeshEnums::INFPRISM6, libMeshEnums::INFQUAD4, libMeshEnums::INFQUAD6, libMeshEnums::PRISM18, libMeshEnums::PRISM6, libMeshEnums::PYRAMID14, libMeshEnums::PYRAMID5, libMeshEnums::QUAD4, libMeshEnums::QUAD8, libMeshEnums::QUAD9, libMeshEnums::TET10, libMeshEnums::TET4, libMeshEnums::TRI3, and libMeshEnums::TRI6.

135 {
136  std::string its_name;
137  switch (t)
138  {
139  case EDGE2:
140  {
141  its_name = "Edge 2";
142  break;
143  }
144 
145  case EDGE3:
146  {
147  its_name = "Edge 3";
148  break;
149  }
150 
151  case EDGE4:
152  {
153  its_name = "Edge 4";
154  break;
155  }
156 
157  case TRI3:
158  {
159  its_name = "Tri 3";
160  break;
161  }
162 
163  case TRI6:
164  {
165  its_name = "Tri 6";
166  break;
167  }
168 
169  case QUAD4:
170  {
171  its_name = "Quad 4";
172  break;
173  }
174 
175  case QUAD8:
176  {
177  its_name = "Quad 8";
178  break;
179  }
180 
181  case QUAD9:
182  {
183  its_name = "Quad 9";
184  break;
185  }
186 
187  case TET4:
188  {
189  its_name = "Tet 4";
190  break;
191  }
192 
193  case TET10:
194  {
195  its_name = "Tet 10";
196  break;
197  }
198 
199  case HEX8:
200  {
201  its_name = "Hex 8";
202  break;
203  }
204 
205  case HEX20:
206  {
207  its_name = "Hex 20";
208  break;
209  }
210 
211  case HEX27:
212  {
213  its_name = "Hex 27";
214  break;
215  }
216 
217  case PRISM6:
218  {
219  its_name = "Prism 6";
220  break;
221  }
222 
223  case PRISM18:
224  {
225  its_name = "Prism 8";
226  break;
227  }
228 
229  case PYRAMID5:
230  {
231  its_name = "Pyramid 5";
232  break;
233  }
234 
235  case PYRAMID14:
236  {
237  its_name = "Pyramid 14";
238  break;
239  }
240 
241 
242 
243 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
244 
245  case INFEDGE2:
246  {
247  its_name = "Infinite Edge 2";
248  break;
249  }
250 
251  case INFQUAD4:
252  {
253  its_name = "Infinite Quad 4";
254  break;
255  }
256 
257  case INFQUAD6:
258  {
259  its_name = "Infinite Quad 6";
260  break;
261  }
262 
263  case INFHEX8:
264  {
265  its_name = "Infinite Hex 8";
266  break;
267  }
268 
269  case INFHEX16:
270  {
271  its_name = "Infinite Hex 16";
272  break;
273  }
274 
275  case INFHEX18:
276  {
277  its_name = "Infinite Hex 18";
278  break;
279  }
280 
281  case INFPRISM6:
282  {
283  its_name = "Infinite Prism 6";
284  break;
285  }
286 
287  case INFPRISM12:
288  {
289  its_name = "Infinite Prism 12";
290  break;
291  }
292 
293 #endif
294 
295 
296 
297  default:
298  {
299  libMesh::err << "Undefined element type!." << std::endl;
300  libmesh_error();
301  }
302  }
303  return its_name;
304 }

Variable Documentation

const unsigned int libMesh::ElementTypes::num_types = 24

The number of element types that are defined (INVALD_ELEM excluded). You might have to update this if you add a new one!

Definition at line 47 of file elem_type.h.


Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:33 UTC

Hosted By:
SourceForge.net Logo