escript  Revision_
ElementType.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2010-2016 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 #ifndef __DUDLEY_ELEMENTTYPE_H__
18 #define __DUDLEY_ELEMENTTYPE_H__
19 
20 #include <string>
21 
22 namespace dudley {
23 
24 typedef enum {
32  Dudley_NoRef = 7 // marks end of list
34 
35 inline ElementTypeId eltTypeFromString(const std::string& s)
36 {
37  if (s == "Point1")
38  return Dudley_Point1;
39  else if (s == "Line2")
40  return Dudley_Line2;
41  else if (s == "Tri3")
42  return Dudley_Tri3;
43  else if (s == "Tet4")
44  return Dudley_Tet4;
45  else if (s == "Line2Face")
46  return Dudley_Line2Face;
47  else if (s == "Tri3Face")
48  return Dudley_Tri3Face;
49  else if (s == "Tet4Face")
50  return Dudley_Tet4Face;
51  else
52  return Dudley_NoRef;
53 }
54 
55 }
56 
57 #endif // __DUDLEY_ELEMENTTYPE_H__
58 
Definition: ElementType.h:26
Definition: ElementType.h:25
ElementTypeId eltTypeFromString(const std::string &s)
Definition: ElementType.h:35
Definition: ElementType.h:28
Definition: ElementType.h:29
ElementTypeId
Definition: ElementType.h:24
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:31
Definition: ElementType.h:31
Definition: ElementType.h:32
Definition: ElementType.h:30
Definition: ElementType.h:27