initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / utilities / postProcessing / graphics / ensightFoamReader / global_extern.h
blob4e3350112959a2762f72d360bd9a9abc8b31dcbf
1 /*--------------------------------------------------------------*/
2 /* Header file for EnSight External Reader DSO Library Routines */
3 /*--------------------------------------------------------------*/
4 /* *************************************************************
5 * Copyright 1998 Computational Engineering International, Inc.
6 * All Rights Reserved.
8 * Restricted Rights Legend
10 * Use, duplication, or disclosure of this
11 * software and its documentation by the
12 * Government is subject to restrictions as
13 * set forth in subdivision [(b)(3)(ii)] of
14 * the Rights in Technical Data and Computer
15 * Software clause at 52.227-7013.
16 * *************************************************************
18 #ifndef GLOBAL_EXTERN_H
19 #define GLOBAL_EXTERN_H
21 /*--------------------------------
22 * Set the reader version define
23 * (only one can be set at a time)
24 *--------------------------------*/
25 #define USERD_API_203
27 /*----------------------------------------
28 * Set this appropriately:
29 * DO_ENSIGHT if using for EnSight itself
30 * DO_READER if using in a reader
31 *----------------------------------------*/
32 #if 1
33 #define DO_READER
34 #else
35 #define DO_ENSIGHT
36 #endif
38 /*---------------------------------------*/
39 /* True/False and Error conditions, etc. */
40 /*---------------------------------------*/
41 #define Z_ERR (-1) /*Error return value.*/
42 #define Z_OK (1) /*Success return value.*/
43 #define Z_UNDEF (2) /*Undefined return value.*/
45 #define Z_NOT_IMPLEMENTED (3) /*Routine not implemented*/
46 /*(currently only checked for */
47 /* get_var_value_at_specific routine)*/
48 #ifndef TRUE
49 # define TRUE (1)
50 # define FALSE (0)
51 #endif
53 #define Z_BUFL (80) /* Typical string length */
55 #define Z_COMPX (0) /* x component */
56 #define Z_COMPY (1) /* y component */
57 #define Z_COMPZ (2) /* z component */
59 #define Z_STATIC (0) /* static geometry */
60 #define Z_CHANGE_COORDS (1) /* coordinate changing only */
61 #define Z_CHANGE_CONN (2) /* conectivity changing */
63 #define Z_GEOM (0) /* Geometry type */
64 #define Z_VARI (1) /* Variable type */
66 #define Z_SAVE_ARCHIVE (0) /* Save archive */
67 #define Z_REST_ARCHIVE (1) /* Restore archive */
69 #define Z_MAX_USERD_NAME (20) /* max length of reader name */
71 #define Z_PER_NODE (4) /* At Nodes Variable classif. */
72 #define Z_PER_ELEM (1) /* At Elements Variable classif.*/
74 #define Z_MAX_SETS (300)
76 #ifndef GLOBALDEFS_H
77 /*-----------------------------------*/
78 /* Unstructured coordinate structure */
79 /*-----------------------------------*/
80 typedef struct {
81 float xyz[3];
82 }CRD;
83 #endif
85 /*----------------*/
86 /* Variable Types */
87 /*----------------*/
88 enum z_var_type
90 Z_CONSTANT,
91 Z_SCALAR,
92 Z_VECTOR,
93 Z_TENSOR,
94 Z_TENSOR9,
95 MAX_Z_VAR_TYPES
98 /*---------------
99 * Element Types
100 *---------------
101 * If you mess with these, you must also
102 * change the get_z_maxtype
103 * to_z_elem_type
104 * to_int_elem_type routines
105 * in userd_read.c
106 *----------------------------------------*/
107 #if (defined USERD_API_100 || defined USERD_API_200) && defined DO_READER
108 enum z_elem_types {
109 Z_POINT, /* 00: 1 node point element */
110 Z_BAR02, /* 01: 2 node bar */
111 Z_BAR03, /* 02: 3 node bar */
112 Z_TRI03, /* 03: 3 node triangle */
113 Z_TRI06, /* 04: 6 node triangle */
114 Z_QUA04, /* 05: 4 node quad */
115 Z_QUA08, /* 06: 8 node quad */
116 Z_TET04, /* 07: 4 node tetrahedron */
117 Z_TET10, /* 08: 10 node tetrahedron */
118 Z_PYR05, /* 09: 5 node pyramid */
119 Z_PYR13, /* 10: 13 node pyramid */
120 Z_PEN06, /* 11: 6 node pentahedron */
121 Z_PEN15, /* 12: 15 node pentahedron */
122 Z_HEX08, /* 13: 8 node hexahedron */
123 Z_HEX20, /* 14: 20 node hexahedron */
124 Z_MAXTYPE
127 #elif defined USERD_API_201 && defined DO_READER
128 enum z_elem_types {
129 Z_POINT, /* 00: 1 node point element */
130 Z_G_POINT, /* 01: 1 node point element (ghost call) */
131 Z_BAR02, /* 02: 2 node bar */
132 Z_G_BAR02, /* 03: 2 node bar (ghost cell) */
133 Z_BAR03, /* 04: 3 node bar */
134 Z_G_BAR03, /* 05: 3 node bar (ghost cell) */
135 Z_TRI03, /* 06: 3 node triangle */
136 Z_G_TRI03, /* 07: 3 node triangle (ghost cell) */
137 Z_TRI06, /* 08: 6 node triangle */
138 Z_G_TRI06, /* 09: 6 node triangle (ghost cell) */
139 Z_QUA04, /* 10: 4 node quad */
140 Z_G_QUA04, /* 11: 4 node quad (ghost cell) */
141 Z_QUA08, /* 12: 8 node quad */
142 Z_G_QUA08, /* 13: 8 node quad (ghost cell) */
143 Z_TET04, /* 14: 4 node tetrahedron */
144 Z_G_TET04, /* 15: 4 node tetrahedron (ghost cell) */
145 Z_TET10, /* 16: 10 node tetrahedron */
146 Z_G_TET10, /* 17: 10 node tetrahedron (ghost cell) */
147 Z_PYR05, /* 18: 5 node pyramid */
148 Z_G_PYR05, /* 19: 5 node pyramid (ghost cell) */
149 Z_PYR13, /* 20: 13 node pyramid */
150 Z_G_PYR13, /* 21: 13 node pyramid (ghost cell) */
151 Z_PEN06, /* 22: 6 node pentahedron */
152 Z_G_PEN06, /* 23: 6 node pentahedron (ghost cell) */
153 Z_PEN15, /* 24: 15 node pentahedron */
154 Z_G_PEN15, /* 25: 15 node pentahedron (ghost cell) */
155 Z_HEX08, /* 26: 8 node hexahedron */
156 Z_G_HEX08, /* 27: 8 node hexahedron (ghost cell) */
157 Z_HEX20, /* 28: 20 node hexahedron */
158 Z_G_HEX20, /* 29: 20 node hexahedron (ghost cell) */
159 Z_MAXTYPE
162 #else
163 enum z_elem_types {
164 Z_POINT, /* 00: 1 node point element */
165 Z_G_POINT, /* 01: 1 node point element (ghost call) */
166 Z_BAR02, /* 02: 2 node bar */
167 Z_G_BAR02, /* 03: 2 node bar (ghost cell) */
168 Z_BAR03, /* 04: 3 node bar */
169 Z_G_BAR03, /* 05: 3 node bar (ghost cell) */
170 Z_TRI03, /* 06: 3 node triangle */
171 Z_G_TRI03, /* 07: 3 node triangle (ghost cell) */
172 Z_TRI06, /* 08: 6 node triangle */
173 Z_G_TRI06, /* 09: 6 node triangle (ghost cell) */
174 Z_QUA04, /* 10: 4 node quad */
175 Z_G_QUA04, /* 11: 4 node quad (ghost cell) */
176 Z_QUA08, /* 12: 8 node quad */
177 Z_G_QUA08, /* 13: 8 node quad (ghost cell) */
178 Z_TET04, /* 14: 4 node tetrahedron */
179 Z_G_TET04, /* 15: 4 node tetrahedron (ghost cell) */
180 Z_TET10, /* 16: 10 node tetrahedron */
181 Z_G_TET10, /* 17: 10 node tetrahedron (ghost cell) */
182 Z_PYR05, /* 18: 5 node pyramid */
183 Z_G_PYR05, /* 19: 5 node pyramid (ghost cell) */
184 Z_PYR13, /* 20: 13 node pyramid */
185 Z_G_PYR13, /* 21: 13 node pyramid (ghost cell) */
186 Z_PEN06, /* 22: 6 node pentahedron */
187 Z_G_PEN06, /* 23: 6 node pentahedron (ghost cell) */
188 Z_PEN15, /* 24: 15 node pentahedron */
189 Z_G_PEN15, /* 25: 15 node pentahedron (ghost cell) */
190 Z_HEX08, /* 26: 8 node hexahedron */
191 Z_G_HEX08, /* 27: 8 node hexahedron (ghost cell) */
192 Z_HEX20, /* 28: 20 node hexahedron */
193 Z_G_HEX20, /* 29: 20 node hexahedron (ghost cell) */
194 Z_NSIDED, /* 30: n node polygon */
195 Z_G_NSIDED, /* 31: n node polygon (ghost cell) */
196 Z_NFACED, /* 32: n faced polyhedron */
197 Z_G_NFACED, /* 33: n faced polyhedron (ghost cell) */
198 Z_MAXTYPE
201 #endif
203 enum z_node_ids_opt
205 Z_NO_NODE_IDS,
206 Z_ASSIGN_NODE_IDS,
207 Z_GIVEN_NODE_IDS
210 enum z_element_ids_opt
212 Z_NO_ELEMENT_IDS,
213 Z_ASSIGN_ELEMENT_IDS,
214 Z_GIVEN_ELEMENT_IDS
218 /*-------------------------------*/
219 /* Unstructured/Structured types */
220 /*-------------------------------*/
221 enum z_structured_defs
223 Z_UNSTRUCTURED, /* for unstructured part */
224 Z_STRUCTURED, /* for structured (non-iblanked) part */
225 Z_IBLANKED, /* for structured iblanked part */
226 Z_MAXMESHTYPES
229 /*----------------------------*/
230 /* Structured Iblanking types */
231 /*----------------------------*/
232 enum z_iblank_domain
234 Z_EXT, /* Exterior */
235 Z_INT, /* Interior */
236 Z_BND, /* Boundary */
237 Z_INTBND, /* Internal boundary/baffle */
238 Z_SYM, /* Symmetry surface */
239 Z_NO_OF_IBLANK_DOMAIN_ITEMS
243 /*-----------------------------------*/
244 /* Dataset Query file info Structure */
245 /*-----------------------------------*/
246 #define Z_MAXFILENP 255 /* Max file name and path.*/
247 #define Z_MAXTIMLEN 40 /* Max time str length */
248 #define Z_BUFLEN 82 /* Allocated length of the f_desc strings */
249 typedef struct {
250 char name[Z_MAXFILENP];
251 long sizeb;
252 char timemod[Z_MAXTIMLEN];
253 int num_d_lines;
254 char **f_desc;
255 } Z_QFILES;
257 /*-------------------------------------------
258 * Mixed Material enum
260 * (Must be comparable to material_file_index
261 * in mat_defs.h of EnSight server)
262 *--------------------------------------------*/
263 enum z_material_file_index
265 Z_MAT_INDEX,
266 Z_MIX_INDEX,
267 Z_MIX_VALUE,
268 Z_NUM_MAT_FILES
272 /*----------------------------------------------------------
273 * For readers, we need to include the prototype header file
274 *----------------------------------------------------------*/
275 #if defined DO_READER
276 #include "global_extern_proto.h"
277 #endif
279 /*--------------------------------------------------------------------*/
280 #endif /*GLOBAL_EXTERN_H*/