1 /**
2  * MOAB, a Mesh-Oriented datABase, is a software component for creating,
3  * storing and accessing finite element mesh data.
4  *
5  * Copyright 2004 Sandia Corporation.  Under the terms of Contract
6  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
7  * retains certain rights in this software.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  */
15 
16 
17 #ifndef MOAB_EXOII_INTERFACE_HPP
18 #define MOAB_EXOII_INTERFACE_HPP
19 
20 #include "moab/Types.hpp"
21 #include "moab/Compiler.hpp"
22 
23 namespace moab {
24 
25 enum ExoIIElementType
26 {
27   EXOII_SPHERE = 0,
28   EXOII_SPRING,
29   EXOII_BAR, EXOII_BAR2, EXOII_BAR3,
30   EXOII_BEAM, EXOII_BEAM2, EXOII_BEAM3,
31   EXOII_TRUSS, EXOII_TRUSS2, EXOII_TRUSS3,
32   EXOII_TRI, EXOII_TRI3, EXO_SHELL3, EXOII_TRI6, EXOII_TRI7,
33   EXOII_QUAD, EXOII_QUAD4, EXOII_QUAD5, EXOII_QUAD8, EXOII_QUAD9,
34   EXOII_SHELL, EXOII_SHELL4, EXOII_SHELL5, EXOII_SHELL8, EXOII_SHELL9,
35   EXOII_TETRA, EXOII_TETRA4, EXOII_TET4, EXOII_TETRA8, EXOII_TETRA10, EXOII_TETRA14,
36   EXOII_PYRAMID, EXOII_PYRAMID5, EXOII_PYRAMID10, EXOII_PYRAMID13, EXOII_PYRAMID18,
37   EXOII_WEDGE,
38   EXOII_KNIFE,
39   EXOII_HEX, EXOII_HEX8, EXOII_HEX9, EXOII_HEX20, EXOII_HEX27,
40   EXOII_HEXSHELL,
41   EXOII_POLYGON,
42   EXOII_POLYHEDRON,
43   EXOII_MAX_ELEM_TYPE
44 };
45 
46 
47 class ExoIIInterface
48 {
49 public:
50   enum {
51     MAX_STR_LENGTH = 33,
52     MAX_LINE_LENGTH = 80
53   };
54 
55 
ExoIIInterface()56   ExoIIInterface(){}
~ExoIIInterface()57   virtual ~ExoIIInterface(){}
58 
59   //! given the element name, return the type
60   virtual ExoIIElementType element_name_to_type(const char* name) = 0;
61 
62   //! get the element type of the entity; this entity can either be a meshset,
63   //! in which case it will be assumed to be a material set meshset, or an
64   //! individual entity.
65   virtual  ExoIIElementType get_element_type(EntityHandle entity,
66       Tag mid_nodes_tag, Tag geom_dimension_tag, EntityType indiv_entity_type = MBMAXTYPE) = 0;
67 
68   virtual int has_mid_nodes(ExoIIElementType elem_type, int dimension) = 0;
69   virtual void has_mid_nodes(ExoIIElementType elem_type, int* array) = 0;
70 
71   virtual const char* element_type_name(ExoIIElementType type) = 0;
72 
73   //! return the geometric dimension of the specified element type
74   virtual int geometric_dimension(const ExoIIElementType elem_type) = 0;
75 
76 };
77 
78 } // namespace moab
79 
80 #endif
81 
82