escript  Revision_
ElementType.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2010-2018 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-2017 by Centre for Geoscience Computing (GeoComp)
14 * Development from 2019 by School of Earth and Environmental Sciences
15 **
16 *****************************************************************************/
17 
18 #ifndef __DUDLEY_ELEMENTTYPE_H__
19 #define __DUDLEY_ELEMENTTYPE_H__
20 
21 #include <string>
22 
23 namespace dudley {
24 
25 typedef enum {
33  Dudley_NoRef = 7 // marks end of list
35 
36 inline ElementTypeId eltTypeFromString(const std::string& s)
37 {
38  if (s == "Point1")
39  return Dudley_Point1;
40  else if (s == "Line2")
41  return Dudley_Line2;
42  else if (s == "Tri3")
43  return Dudley_Tri3;
44  else if (s == "Tet4")
45  return Dudley_Tet4;
46  else if (s == "Line2Face")
47  return Dudley_Line2Face;
48  else if (s == "Tri3Face")
49  return Dudley_Tri3Face;
50  else if (s == "Tet4Face")
51  return Dudley_Tet4Face;
52  else
53  return Dudley_NoRef;
54 }
55 
56 }
57 
58 #endif // __DUDLEY_ELEMENTTYPE_H__
59 
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:32
ElementTypeId eltTypeFromString(const std::string &s)
Definition: ElementType.h:36
ElementTypeId
Definition: ElementType.h:25
@ Dudley_Line2Face
Definition: ElementType.h:30
@ Dudley_Tet4
Definition: ElementType.h:29
@ Dudley_Line2
Definition: ElementType.h:27
@ Dudley_NoRef
Definition: ElementType.h:33
@ Dudley_Tet4Face
Definition: ElementType.h:32
@ Dudley_Point1
Definition: ElementType.h:26
@ Dudley_Tri3
Definition: ElementType.h:28
@ Dudley_Tri3Face
Definition: ElementType.h:31