/[escript]/branches/trilinos_from_5897/dudley/src/ElementType.h
ViewVC logotype

Diff of /branches/trilinos_from_5897/dudley/src/ElementType.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6078 by caltinay, Fri Feb 5 03:37:49 2016 UTC revision 6079 by caltinay, Mon Mar 21 12:22:38 2016 UTC
# Line 14  Line 14 
14  *  *
15  *****************************************************************************/  *****************************************************************************/
16    
17  #ifndef DUDLEY_TYPEID_H  #ifndef __DUDLEY_ELEMENTTYPE_H__
18  #define DUDLEY_TYPEID_H  #define __DUDLEY_ELEMENTTYPE_H__
19    
20    #include <string>
21    
22    namespace dudley {
23    
24  typedef enum {  typedef enum {
25      Dudley_Point1 = 0,      Dudley_Point1 = 0,
# Line 25  typedef enum { Line 29  typedef enum {
29      Dudley_Line2Face = 4,      Dudley_Line2Face = 4,
30      Dudley_Tri3Face = 5,      Dudley_Tri3Face = 5,
31      Dudley_Tet4Face = 6,      Dudley_Tet4Face = 6,
32      Dudley_NoRef = 7            /* marks end of list */      Dudley_NoRef = 7      // marks end of list
33  } Dudley_ElementTypeId;  } ElementTypeId;
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    
 Dudley_ElementTypeId eltTypeFromString(const char *s);  
 #endif  

Legend:
Removed from v.6078  
changed lines
  Added in v.6079

  ViewVC Help
Powered by ViewVC 1.1.26