ExodusII 6.05
Loading...
Searching...
No Matches
exodusII_int.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
3 * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
4 * retains certain rights in this software.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 *
18 * * Neither the name of Sandia Corporation nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 */
35/*****************************************************************************
36*
37* exodusII_int.h - ExodusII header file for internal Exodus call use only
38*
39*/
40
41#ifndef EXODUS_II_INT_HDR
42#define EXODUS_II_INT_HDR
43
44#include "netcdf.h"
45
46#ifdef _WIN32
47#define PRId64 "I64d"
48#else
49#include <inttypes.h>
50#endif
51
52#ifndef __APPLE__
53#if defined __STDC__ || defined __cplusplus
54#include <stdlib.h>
55#endif
56#endif
57
58#ifdef _MSC_VER
59# pragma warning ( disable : 4127 )
60# pragma warning ( disable : 4706 )
61# pragma warning ( disable : 4701 )
62#endif
63
64#if defined(__BORLANDC__)
65#pragma warn -8004 /* "assigned a value that is never used" */
66#endif
67
68
69#include <stdio.h>
70
71/* A format string for outputting size_t ... */
72#if defined(__STDC_VERSION__)
73# if (__STDC_VERSION__ >= 199901L)
74# define ST_ZU "zu"
75# else
76# define ST_ZU "lu"
77# endif
78#else
79# define ST_ZU "lu"
80#endif
81
82#define MAX_VAR_NAME_LENGTH 32 /**< Internal use only */
83
84/* this should be defined in ANSI C and C++, but just in case ... */
85#ifndef NULL
86#define NULL 0
87#endif
88
89/* Default "filesize" for newly created files.
90 * Set to 0 for normal filesize setting.
91 * Set to 1 for EXODUS_LARGE_MODEL setting to be the default
92 */
93#define EXODUS_DEFAULT_SIZE 1
94
95/* Exodus error return codes - function return values: */
96#define EX_FATAL -1 /* fatal error flag def */
97#define EX_NOERR 0 /* no error flag def */
98#define EX_WARN 1 /* warning flag def */
99
100/* Used to map between root (file id) and group ids when using groups */
101#define EX_FILE_ID_MASK (0xffff0000) /* Must match FILE_ID_MASK in netcdf nc4internal.h */
102#define EX_GRP_ID_MASK (0x0000ffff) /* Must match GRP_ID_MASK in netcdf nc4internal.h */
103
104/*
105 * This file contains defined constants that are used internally in the
106 * EXODUS II API.
107 *
108 * The first group of constants refer to netCDF variables, attributes, or
109 * dimensions in which the EXODUS II data are stored. Using the defined
110 * constants will allow the names of the netCDF entities to be changed easily
111 * in the future if needed. The first three letters of the constant identify
112 * the netCDF entity as a variable (VAR), dimension (DIM), or attribute (ATT).
113 *
114 * NOTE: The entity name should not have any blanks in it. Blanks are
115 * technically legal but some netcdf utilities (ncgen in particular)
116 * fail when they encounter a blank in a name.
117 *
118 * DEFINED CONSTANT ENTITY NAME DATA STORED IN ENTITY
119 */
120#define ATT_FILE_TYPE "type" /* obsolete */
121#define ATT_TITLE "title" /* the database title */
122#define ATT_API_VERSION "api_version" /* the EXODUS II api vers # */
123#define ATT_API_VERSION_BLANK "api version" /* the EXODUS II api vers # */
124 /* used for db version 2.01 */
125 /* and earlier */
126#define ATT_VERSION "version" /* the EXODUS II file vers # */
127#define ATT_FILESIZE "file_size" /* 1=large, 0=normal */
128#define ATT_FLT_WORDSIZE "floating_point_word_size"
129 /* word size of floating */
130 /* point numbers in file */
131#define ATT_FLT_WORDSIZE_BLANK "floating point word size"
132 /* word size of floating */
133 /* point numbers in file */
134 /* used for db version 2.01 */
135 /* and earlier */
136#define ATT_MAX_NAME_LENGTH "maximum_name_length"
137#define ATT_INT64_STATUS "int64_status"
138
139#define DIM_NUM_NODES "num_nodes" /* # of nodes */
140#define DIM_NUM_DIM "num_dim" /* # of dimensions; 2- or 3-d*/
141#define DIM_NUM_EDGE "num_edge" /* # of edges (over all blks)*/
142#define DIM_NUM_FACE "num_face" /* # of faces (over all blks)*/
143#define DIM_NUM_ELEM "num_elem" /* # of elements */
144#define DIM_NUM_EL_BLK "num_el_blk" /* # of element blocks */
145#define DIM_NUM_ED_BLK "num_ed_blk" /* # of edge blocks */
146#define DIM_NUM_FA_BLK "num_fa_blk" /* # of face blocks */
147#define VAR_COORD "coord" /* nodal coordinates */
148#define VAR_COORD_X "coordx" /* X-dimension coordinate */
149#define VAR_COORD_Y "coordy" /* Y-dimension coordinate */
150#define VAR_COORD_Z "coordz" /* Z-dimension coordinate */
151#define VAR_NAME_COOR "coor_names" /* names of coordinates */
152#define VAR_NAME_EL_BLK "eb_names" /* names of element blocks */
153#define VAR_NAME_NS "ns_names" /* names of node sets */
154#define VAR_NAME_SS "ss_names" /* names of side sets */
155#define VAR_NAME_EM "emap_names" /* names of element maps */
156#define VAR_NAME_EDM "edmap_names" /* names of edge maps */
157#define VAR_NAME_FAM "famap_names" /* names of face maps */
158#define VAR_NAME_NM "nmap_names" /* names of node maps */
159#define VAR_NAME_ED_BLK "ed_names" /* names of edge blocks */
160#define VAR_NAME_FA_BLK "fa_names" /* names of face blocks */
161#define VAR_NAME_ES "es_names" /* names of edge sets */
162#define VAR_NAME_FS "fs_names" /* names of face sets */
163#define VAR_NAME_ELS "els_names" /* names of element sets */
164#define VAR_STAT_EL_BLK "eb_status" /* element block status */
165#define VAR_STAT_ECONN "econn_status" /* element block edge status */
166#define VAR_STAT_FCONN "fconn_status" /* element block face status */
167#define VAR_STAT_ED_BLK "ed_status" /* edge block status */
168#define VAR_STAT_FA_BLK "fa_status" /* face block status */
169#define VAR_ID_EL_BLK "eb_prop1" /* element block ids props */
170#define VAR_ID_ED_BLK "ed_prop1" /* edge block ids props */
171#define VAR_ID_FA_BLK "fa_prop1" /* face block ids props */
172#define ATT_NAME_ELB "elem_type" /* element type names for */
173 /* each element block */
174#define DIM_NUM_EL_IN_BLK(num) ex_catstr("num_el_in_blk",num)
175 /* # of elements in element */
176 /* block num */
177#define DIM_NUM_NOD_PER_EL(num) ex_catstr("num_nod_per_el",num)
178 /* # of nodes per element in */
179 /* element block num */
180#define DIM_NUM_ATT_IN_BLK(num) ex_catstr("num_att_in_blk",num)
181 /* # of attributes in element*/
182 /* block num */
183#define DIM_NUM_ED_IN_EBLK(num) ex_catstr("num_ed_in_blk",num)
184 /* # of edges in edge */
185 /* block num */
186#define DIM_NUM_NOD_PER_ED(num) ex_catstr("num_nod_per_ed",num)
187 /* # of nodes per edge in */
188 /* edge block num */
189#define DIM_NUM_EDG_PER_EL(num) ex_catstr("num_edg_per_el",num)
190 /* # of edges per element in */
191 /* element block num */
192#define DIM_NUM_ATT_IN_EBLK(num) ex_catstr("num_att_in_eblk",num)
193 /* # of attributes in edge */
194 /* block num */
195#define DIM_NUM_FA_IN_FBLK(num) ex_catstr("num_fa_in_blk",num)
196 /* # of faces in face */
197 /* block num */
198#define DIM_NUM_NOD_PER_FA(num) ex_catstr("num_nod_per_fa",num)
199 /* # of nodes per face in */
200 /* face block num */
201#define DIM_NUM_FAC_PER_EL(num) ex_catstr("num_fac_per_el",num)
202 /* # of faces per element in */
203 /* element block num */
204#define DIM_NUM_ATT_IN_FBLK(num) ex_catstr("num_att_in_fblk",num)
205 /* # of attributes in face */
206 /* block num */
207#define VAR_CONN(num) ex_catstr("connect",num)
208 /* element connectivity for */
209 /* element block num */
210#define VAR_EBEPEC(num) ex_catstr("ebepecnt",num)
211 /* array containing number of entity per */
212 /* entity for n-sided face/element blocks */
213#define VAR_ATTRIB(num) ex_catstr("attrib",num)
214 /* list of attributes for */
215 /* element block num */
216#define VAR_NAME_ATTRIB(num) ex_catstr("attrib_name",num)
217 /* list of attribute names */
218 /* for element block num */
219#define VAR_EB_PROP(num) ex_catstr("eb_prop",num)
220 /* list of the numth property*/
221 /* for all element blocks */
222#define VAR_ECONN(num) ex_catstr("edgconn",num)
223 /* edge connectivity for */
224 /* element block num */
225#define VAR_EBCONN(num) ex_catstr("ebconn",num)
226 /* edge connectivity for */
227 /* edge block num */
228#define VAR_EATTRIB(num) ex_catstr("eattrb",num)
229 /* list of attributes for */
230 /* edge block num */
231#define VAR_NAME_EATTRIB(num) ex_catstr("eattrib_name",num)
232 /* list of attribute names */
233 /* for edge block num */
234#define VAR_NATTRIB "nattrb"
235#define VAR_NAME_NATTRIB "nattrib_name"
236#define DIM_NUM_ATT_IN_NBLK "num_att_in_nblk"
237
238#define VAR_NSATTRIB(num) ex_catstr("nsattrb",num)
239#define VAR_NAME_NSATTRIB(num) ex_catstr("nsattrib_name",num)
240#define DIM_NUM_ATT_IN_NS(num) ex_catstr("num_att_in_ns",num)
241
242#define VAR_SSATTRIB(num) ex_catstr("ssattrb",num)
243#define VAR_NAME_SSATTRIB(num) ex_catstr("ssattrib_name",num)
244#define DIM_NUM_ATT_IN_SS(num) ex_catstr("num_att_in_ss",num)
245
246#define VAR_ESATTRIB(num) ex_catstr("esattrb",num)
247#define VAR_NAME_ESATTRIB(num) ex_catstr("esattrib_name",num)
248#define DIM_NUM_ATT_IN_ES(num) ex_catstr("num_att_in_es",num)
249
250#define VAR_FSATTRIB(num) ex_catstr("fsattrb",num)
251#define VAR_NAME_FSATTRIB(num) ex_catstr("fsattrib_name",num)
252#define DIM_NUM_ATT_IN_FS(num) ex_catstr("num_att_in_fs",num)
253
254#define VAR_ELSATTRIB(num) ex_catstr("elsattrb",num)
255#define VAR_NAME_ELSATTRIB(num) ex_catstr("elsattrib_name",num)
256#define DIM_NUM_ATT_IN_ELS(num) ex_catstr("num_att_in_els",num)
257
258#define VAR_ED_PROP(num) ex_catstr("ed_prop",num)
259 /* list of the numth property*/
260 /* for all edge blocks */
261#define VAR_FCONN(num) ex_catstr("facconn",num)
262 /* face connectivity for */
263 /* element block num */
264#define VAR_FBCONN(num) ex_catstr("fbconn",num)
265 /* face connectivity for */
266 /* face block num */
267#define VAR_FBEPEC(num) ex_catstr("fbepecnt",num)
268 /* array containing number of entity per */
269 /* entity for n-sided face/element blocks */
270#define VAR_FATTRIB(num) ex_catstr("fattrb",num)
271 /* list of attributes for */
272 /* face block num */
273#define VAR_NAME_FATTRIB(num) ex_catstr("fattrib_name",num)
274 /* list of attribute names */
275 /* for face block num */
276#define VAR_FA_PROP(num) ex_catstr("fa_prop",num)
277 /* list of the numth property*/
278 /* for all face blocks */
279#define ATT_PROP_NAME "name" /* name attached to element */
280 /* block, node set, side */
281 /* set, element map, or */
282 /* map properties */
283#define VAR_MAP "elem_map" /* element order map */
284 /* obsolete, replaced by */
285 /* VAR_ELEM_MAP(num) */
286#define DIM_NUM_SS "num_side_sets" /* # of side sets */
287#define VAR_SS_STAT "ss_status" /* side set status */
288#define VAR_SS_IDS "ss_prop1" /* side set id properties */
289#define DIM_NUM_SIDE_SS(num) ex_catstr("num_side_ss",num)
290 /* # of sides in side set num*/
291#define DIM_NUM_DF_SS(num) ex_catstr("num_df_ss",num)
292 /* # of distribution factors */
293 /* in side set num */
294/*#define DIM_NUM_NOD_SS(num) ex_catstr("num_nod_ss",num) *** obsolete *** */
295 /* # of nodes in side set num*/
296#define VAR_FACT_SS(num) ex_catstr("dist_fact_ss",num)
297 /* the distribution factors */
298 /* for each node in side */
299 /* set num */
300#define VAR_ELEM_SS(num) ex_catstr("elem_ss",num)
301 /* list of elements in side */
302 /* set num */
303#define VAR_SIDE_SS(num) ex_catstr("side_ss",num)
304 /* list of sides in side set */
305#define VAR_SS_PROP(num) ex_catstr("ss_prop",num)
306 /* list of the numth property*/
307 /* for all side sets */
308#define DIM_NUM_ES "num_edge_sets"/* # of edge sets */
309#define VAR_ES_STAT "es_status" /* edge set status */
310#define VAR_ES_IDS "es_prop1" /* edge set id properties */
311#define DIM_NUM_EDGE_ES(num) ex_catstr("num_edge_es",num)
312 /* # of edges in edge set num*/
313#define DIM_NUM_DF_ES(num) ex_catstr("num_df_es",num)
314 /* # of distribution factors */
315 /* in edge set num */
316/*#define DIM_NUM_NOD_ES(num) ex_catstr("num_nod_es",num) *** obsolete *** */
317 /* # of nodes in edge set num*/
318#define VAR_FACT_ES(num) ex_catstr("dist_fact_es",num)
319 /* the distribution factors */
320 /* for each node in edge */
321 /* set num */
322#define VAR_EDGE_ES(num) ex_catstr("edge_es",num)
323 /* list of edges in edge */
324 /* set num */
325#define VAR_ORNT_ES(num) ex_catstr("ornt_es",num)
326 /* list of orientations in */
327 /* the edge set. */
328#define VAR_ES_PROP(num) ex_catstr("es_prop",num)
329 /* list of the numth property*/
330 /* for all edge sets */
331#define DIM_NUM_FS "num_face_sets"/* # of face sets */
332#define VAR_FS_STAT "fs_status" /* face set status */
333#define VAR_FS_IDS "fs_prop1" /* face set id properties */
334#define DIM_NUM_FACE_FS(num) ex_catstr("num_face_fs",num)
335 /* # of faces in side set num*/
336#define DIM_NUM_DF_FS(num) ex_catstr("num_df_fs",num)
337 /* # of distribution factors */
338 /* in face set num */
339/*#define DIM_NUM_NOD_FS(num) ex_catstr("num_nod_ss",num) *** obsolete *** */
340 /* # of nodes in face set num*/
341#define VAR_FACT_FS(num) ex_catstr("dist_fact_fs",num)
342 /* the distribution factors */
343 /* for each node in face */
344 /* set num */
345#define VAR_FACE_FS(num) ex_catstr("face_fs",num)
346 /* list of elements in face */
347 /* set num */
348#define VAR_ORNT_FS(num) ex_catstr("ornt_fs",num)
349 /* list of sides in side set */
350#define VAR_FS_PROP(num) ex_catstr("fs_prop",num)
351 /* list of the numth property*/
352 /* for all face sets */
353#define DIM_NUM_ELS "num_elem_sets"/* # of elem sets */
354#define DIM_NUM_ELE_ELS(num) ex_catstr("num_ele_els",num)
355 /* # of elements in elem set */
356 /* num */
357#define DIM_NUM_DF_ELS(num) ex_catstr("num_df_els",num)
358 /* # of distribution factors */
359 /* in element set num */
360#define VAR_ELS_STAT "els_status" /* elem set status */
361#define VAR_ELS_IDS "els_prop1" /* elem set id properties */
362#define VAR_ELEM_ELS(num) ex_catstr("elem_els",num)
363 /* list of elements in elem */
364 /* set num */
365#define VAR_FACT_ELS(num) ex_catstr("dist_fact_els",num)
366 /* list of distribution */
367 /* factors in elem set num */
368#define VAR_ELS_PROP(num) ex_catstr("els_prop",num)
369 /* list of the numth property*/
370 /* for all elem sets */
371#define DIM_NUM_NS "num_node_sets"/* # of node sets */
372#define DIM_NUM_NOD_NS(num) ex_catstr("num_nod_ns",num)
373 /* # of nodes in node set */
374 /* num */
375#define DIM_NUM_DF_NS(num) ex_catstr("num_df_ns",num)
376 /* # of distribution factors */
377 /* in node set num */
378#define VAR_NS_STAT "ns_status" /* node set status */
379#define VAR_NS_IDS "ns_prop1" /* node set id properties */
380#define VAR_NODE_NS(num) ex_catstr("node_ns",num)
381 /* list of nodes in node set */
382 /* num */
383#define VAR_FACT_NS(num) ex_catstr("dist_fact_ns",num)
384 /* list of distribution */
385 /* factors in node set num */
386#define VAR_NS_PROP(num) ex_catstr("ns_prop",num)
387 /* list of the numth property*/
388 /* for all node sets */
389#define DIM_NUM_QA "num_qa_rec" /* # of QA records */
390#define VAR_QA_TITLE "qa_records" /* QA records */
391#define DIM_NUM_INFO "num_info" /* # of information records */
392#define VAR_INFO "info_records" /* information records */
393#define VAR_HIS_TIME "time_hist" /* obsolete */
394#define VAR_WHOLE_TIME "time_whole" /* simulation times for whole*/
395 /* time steps */
396#define VAR_ELEM_TAB "elem_var_tab" /* element variable truth */
397 /* table */
398#define VAR_EBLK_TAB "edge_var_tab" /* edge variable truth table */
399#define VAR_FBLK_TAB "face_var_tab" /* face variable truth table */
400#define VAR_ELSET_TAB "elset_var_tab" /* elemset variable truth */
401 /* table */
402#define VAR_SSET_TAB "sset_var_tab" /* sideset variable truth */
403 /* table */
404#define VAR_FSET_TAB "fset_var_tab" /* faceset variable truth */
405 /* table */
406#define VAR_ESET_TAB "eset_var_tab" /* edgeset variable truth */
407 /* table */
408#define VAR_NSET_TAB "nset_var_tab" /* nodeset variable truth */
409 /* table */
410#define DIM_NUM_GLO_VAR "num_glo_var" /* # of global variables */
411#define VAR_NAME_GLO_VAR "name_glo_var" /* names of global variables */
412#define VAR_GLO_VAR "vals_glo_var" /* values of global variables*/
413#define DIM_NUM_NOD_VAR "num_nod_var" /* # of nodal variables */
414#define VAR_NAME_NOD_VAR "name_nod_var" /* names of nodal variables */
415#define VAR_NOD_VAR "vals_nod_var" /* values of nodal variables */
416#define VAR_NOD_VAR_NEW(num) ex_catstr("vals_nod_var",num)
417 /* values of nodal variables */
418#define DIM_NUM_ELE_VAR "num_elem_var" /* # of element variables */
419#define VAR_NAME_ELE_VAR "name_elem_var" /* names of element variables*/
420#define VAR_ELEM_VAR(num1,num2) ex_catstr2("vals_elem_var",num1,"eb",num2)
421 /* values of element variable*/
422 /* num1 in element block */
423 /* num2 */
424#define DIM_NUM_EDG_VAR "num_edge_var" /* # of edge variables */
425#define VAR_NAME_EDG_VAR "name_edge_var" /* names of edge variables */
426#define VAR_EDGE_VAR(num1,num2) ex_catstr2("vals_edge_var",num1,"eb",num2)
427 /* values of edge variable */
428 /* num1 in edge block num2 */
429#define DIM_NUM_FAC_VAR "num_face_var" /* # of face variables */
430#define VAR_NAME_FAC_VAR "name_face_var" /* names of face variables */
431#define VAR_FACE_VAR(num1,num2) ex_catstr2("vals_face_var",num1,"fb",num2)
432 /* values of face variable */
433 /* num1 in face block num2 */
434
435#define DIM_NUM_NSET_VAR "num_nset_var" /* # of nodeset variables */
436#define VAR_NAME_NSET_VAR "name_nset_var" /* names of nodeset variables*/
437#define VAR_NS_VAR(num1,num2) ex_catstr2("vals_nset_var",num1,"ns",num2)
438 /* values of nodeset variable*/
439 /* num1 in nodeset num2 */
440#define DIM_NUM_ESET_VAR "num_eset_var" /* # of edgeset variables */
441#define VAR_NAME_ESET_VAR "name_eset_var" /* names of edgeset variables*/
442#define VAR_ES_VAR(num1,num2) ex_catstr2("vals_eset_var",num1,"es",num2)
443 /* values of edgeset variable*/
444 /* num1 in edgeset num2 */
445#define DIM_NUM_FSET_VAR "num_fset_var" /* # of faceset variables */
446#define VAR_NAME_FSET_VAR "name_fset_var" /* names of faceset variables*/
447#define VAR_FS_VAR(num1,num2) ex_catstr2("vals_fset_var",num1,"fs",num2)
448 /* values of faceset variable*/
449 /* num1 in faceset num2 */
450#define DIM_NUM_SSET_VAR "num_sset_var" /* # of sideset variables */
451#define VAR_NAME_SSET_VAR "name_sset_var" /* names of sideset variables*/
452#define VAR_SS_VAR(num1,num2) ex_catstr2("vals_sset_var",num1,"ss",num2)
453 /* values of sideset variable*/
454 /* num1 in sideset num2 */
455#define DIM_NUM_ELSET_VAR "num_elset_var" /* # of element set variables*/
456#define VAR_NAME_ELSET_VAR "name_elset_var"/* names of elemset variables*/
457#define VAR_ELS_VAR(num1,num2) ex_catstr2("vals_elset_var",num1,"es",num2)
458 /* values of elemset variable*/
459 /* num1 in elemset num2 */
460
461#define DIM_NUM_HIS_VAR "num_his_var" /* obsolete */
462#define VAR_NAME_HIS_VAR "name_his_var" /* obsolete */
463#define VAR_HIS_VAR "vals_his_var" /* obsolete */
464#define DIM_STR "len_string" /* general dimension of */
465 /* length MAX_STR_LENGTH */
466 /* used for some string lengths */
467#define DIM_STR_NAME "len_name" /* general dimension of */
468 /* length MAX_NAME_LENGTH */
469 /* used for name lengths */
470#define DIM_LIN "len_line" /* general dimension of */
471 /* length MAX_LINE_LENGTH */
472 /* used for long strings */
473#define DIM_N4 "four" /* general dimension of */
474 /* length 4 */
475#define DIM_TIME "time_step" /* unlimited (expandable) */
476 /* dimension for time steps*/
477#define DIM_HTIME "hist_time_step"/* obsolete */
478#define VAR_ELEM_NUM_MAP "elem_num_map" /* element numbering map */
479 /* obsolete, replaced by */
480 /* VAR_ELEM_MAP(num) */
481#define VAR_FACE_NUM_MAP "face_num_map" /* face numbering map */
482 /* obsolete, replaced by */
483 /* VAR_FACE_MAP(num) */
484#define VAR_EDGE_NUM_MAP "edge_num_map" /* edge numbering map */
485 /* obsolete, replaced by */
486 /* VAR_EDGE_MAP(num) */
487#define VAR_NODE_NUM_MAP "node_num_map" /* node numbering map */
488 /* obsolete, replaced by */
489 /* VAR_NODE_MAP(num) */
490#define DIM_NUM_EM "num_elem_maps" /* # of element maps */
491#define VAR_ELEM_MAP(num) ex_catstr("elem_map",num)
492 /* the numth element map */
493#define VAR_EM_PROP(num) ex_catstr("em_prop",num)
494 /* list of the numth property*/
495 /* for all element maps */
496#define DIM_NUM_EDM "num_edge_maps" /* # of edge maps */
497#define VAR_EDGE_MAP(num) ex_catstr("edge_map",num)
498 /* the numth edge map */
499#define VAR_EDM_PROP(num) ex_catstr("edm_prop",num)
500 /* list of the numth property*/
501 /* for all edge maps */
502#define DIM_NUM_FAM "num_face_maps" /* # of face maps */
503#define VAR_FACE_MAP(num) ex_catstr("face_map",num)
504 /* the numth face map */
505#define VAR_FAM_PROP(num) ex_catstr("fam_prop",num)
506 /* list of the numth property*/
507 /* for all face maps */
508#define DIM_NUM_NM "num_node_maps" /* # of node maps */
509#define VAR_NODE_MAP(num) ex_catstr("node_map",num)
510 /* the numth node map */
511#define VAR_NM_PROP(num) ex_catstr("nm_prop",num)
512 /* list of the numth property*/
513 /* for all node maps */
514
515#define DIM_NUM_CFRAMES "num_cframes"
516#define DIM_NUM_CFRAME9 "num_cframes_9"
517#define VAR_FRAME_COORDS "frame_coordinates"
518#define VAR_FRAME_IDS "frame_ids"
519#define VAR_FRAME_TAGS "frame_tags"
520
521#define VAR_ELBLK_IDS_GLOBAL "el_blk_ids_global"
522#define VAR_ELBLK_CNT_GLOBAL "el_blk_cnt_global"
523#define VAR_NS_IDS_GLOBAL "ns_ids_global"
524#define VAR_NS_NODE_CNT_GLOBAL "ns_node_cnt_global"
525#define VAR_NS_DF_CNT_GLOBAL "ns_df_cnt_global"
526#define VAR_SS_IDS_GLOBAL "ss_ids_global"
527#define VAR_SS_SIDE_CNT_GLOBAL "ss_side_cnt_global"
528#define VAR_SS_DF_CNT_GLOBAL "ss_df_cnt_global"
529#define VAR_FILE_TYPE "nem_ftype"
530#define VAR_COMM_MAP "comm_map"
531#define VAR_NODE_MAP_INT "node_mapi"
532#define VAR_NODE_MAP_INT_IDX "node_mapi_idx"
533#define VAR_NODE_MAP_BOR "node_mapb"
534#define VAR_NODE_MAP_BOR_IDX "node_mapb_idx"
535#define VAR_NODE_MAP_EXT "node_mape"
536#define VAR_NODE_MAP_EXT_IDX "node_mape_idx"
537#define VAR_ELEM_MAP_INT "elem_mapi"
538#define VAR_ELEM_MAP_INT_IDX "elem_mapi_idx"
539#define VAR_ELEM_MAP_BOR "elem_mapb"
540#define VAR_ELEM_MAP_BOR_IDX "elem_mapb_idx"
541#define VAR_INT_N_STAT "int_n_stat"
542#define VAR_BOR_N_STAT "bor_n_stat"
543#define VAR_EXT_N_STAT "ext_n_stat"
544#define VAR_INT_E_STAT "int_e_stat"
545#define VAR_BOR_E_STAT "bor_e_stat"
546#define VAR_N_COMM_IDS "n_comm_ids"
547#define VAR_N_COMM_STAT "n_comm_stat"
548#define VAR_N_COMM_INFO_IDX "n_comm_info_idx"
549#define VAR_E_COMM_IDS "e_comm_ids"
550#define VAR_E_COMM_STAT "e_comm_stat"
551#define VAR_E_COMM_INFO_IDX "e_comm_info_idx"
552#define VAR_N_COMM_NIDS "n_comm_nids"
553#define VAR_N_COMM_PROC "n_comm_proc"
554#define VAR_N_COMM_DATA_IDX "n_comm_data_idx"
555#define VAR_E_COMM_EIDS "e_comm_eids"
556#define VAR_E_COMM_SIDS "e_comm_sids"
557#define VAR_E_COMM_PROC "e_comm_proc"
558#define VAR_E_COMM_DATA_IDX "e_comm_data_idx"
559
560#define DIM_NUM_INT_NODES "num_int_node"
561#define DIM_NUM_BOR_NODES "num_bor_node"
562#define DIM_NUM_EXT_NODES "num_ext_node"
563#define DIM_NUM_INT_ELEMS "num_int_elem"
564#define DIM_NUM_BOR_ELEMS "num_bor_elem"
565#define DIM_NUM_PROCS "num_processors"
566#define DIM_NUM_PROCS_F "num_procs_file"
567#define DIM_NUM_NODES_GLOBAL "num_nodes_global"
568#define DIM_NUM_ELEMS_GLOBAL "num_elems_global"
569#define DIM_NUM_NS_GLOBAL "num_ns_global"
570#define DIM_NUM_SS_GLOBAL "num_ss_global"
571#define DIM_NUM_ELBLK_GLOBAL "num_el_blk_global"
572#define DIM_NUM_N_CMAPS "num_n_cmaps"
573#define DIM_NUM_E_CMAPS "num_e_cmaps"
574#define DIM_NCNT_CMAP "ncnt_cmap"
575#define DIM_ECNT_CMAP "ecnt_cmap"
576
578 EX_EL_UNK = -1, /**< unknown entity */
580 EX_EL_TRIANGLE = 1, /**< Triangle entity */
581 EX_EL_QUAD = 2, /**< Quad entity */
582 EX_EL_HEX = 3, /**< Hex entity */
583 EX_EL_WEDGE = 4, /**< Wedge entity */
584 EX_EL_TETRA = 5, /**< Tetra entity */
585 EX_EL_TRUSS = 6, /**< Truss entity */
586 EX_EL_BEAM = 7, /**< Beam entity */
587 EX_EL_SHELL = 8, /**< Shell entity */
588 EX_EL_SPHERE = 9, /**< Sphere entity */
589 EX_EL_CIRCLE = 10, /**< Circle entity */
590 EX_EL_TRISHELL = 11, /**< Triangular Shell entity */
591 EX_EL_PYRAMID = 12 /**< Pyramid entity */
592};
594
601
602/* Internal structure declarations */
603
609 unsigned int compression_level:4; /* 0 (disabled) to 9 (maximum) compression level; netcdf-4 only */
610 unsigned int user_compute_wordsize:1; /* 0 for 4 byte or 1 for 8 byte reals */
611 unsigned int shuffle:1; /* 1 true, 0 false */
612 unsigned int file_type:2; /* 0 - classic, 1 -- 64 bit classic, 2 --netcdf4, 3 --netcdf4 classic */
613 unsigned int is_parallel:1; /* 1 true, 0 false */
615};
616
629
630struct list_item { /* for use with ex_get_file_item */
632 int value;
634};
635
636struct obj_stats {
637 int64_t *id_vals;
639 long num;
640 int exoid;
644};
645
646void ex_iqsort(int v[], int iv[], int count );
647void ex_iqsort64(int64_t v[], int64_t iv[], int64_t count );
648
649char* ex_catstr(const char*, int);
650char* ex_catstr2(const char*, int, const char*, int);
652char* ex_dim_num_objects(ex_entity_type obj_type);
653char* ex_name_var_of_object( ex_entity_type, int, int );
654char* ex_name_of_map( ex_entity_type, int );
655
656int ex_conv_ini (int exoid, int* comp_wordsize, int* io_wordsize, int file_wordsize, int int64_status, int is_parallel);
657void ex_conv_exit (int exoid);
658
659nc_type nc_flt_code (int exoid);
660int ex_comp_ws (int exoid);
661int ex_get_cpu_ws(void);
662int ex_is_parallel(int exoid);
663
665int ex_get_file_item (int, struct list_item**);
666int ex_inc_file_item (int, struct list_item**);
667void ex_rm_file_item (int, struct list_item**);
668
669extern struct obj_stats* exoII_eb;
670extern struct obj_stats* exoII_ed;
671extern struct obj_stats* exoII_fa;
672extern struct obj_stats* exoII_ns;
673extern struct obj_stats* exoII_es;
674extern struct obj_stats* exoII_fs;
675extern struct obj_stats* exoII_ss;
676extern struct obj_stats* exoII_els;
677extern struct obj_stats* exoII_em;
678extern struct obj_stats* exoII_edm;
679extern struct obj_stats* exoII_fam;
680extern struct obj_stats* exoII_nm;
681
682
683struct ex_file_item* ex_find_file_item(int exoid);
685struct obj_stats *ex_get_stat_ptr ( int exoid, struct obj_stats** obj_ptr);
686
687void ex_rm_stat_ptr (int exoid, struct obj_stats** obj_ptr);
688
689void ex_compress_variable(int exoid, int varid, int type);
691int ex_check_file_type(const char *path, int *type);
692int ex_get_dimension(int exoid, const char *dimtype, const char *label,
693 size_t *count, int *dimid, const char *routine);
694
695int ex_get_name_internal(int exoid, int varid, size_t index, char *name, int name_size,
696 ex_entity_type type, const char *routine);
697int ex_get_names_internal(int exoid, int varid, size_t count, char**names,
698 ex_entity_type type, const char *routine);
699int ex_put_name_internal(int exoid, int varid, size_t index, const char *name,
700 ex_entity_type type, const char *subtype, const char *routine);
701int ex_put_names_internal(int exoid, int varid, size_t count, char**names,
702 ex_entity_type type, const char *subtype, const char *routine);
703void ex_trim_internal(char *name);
704void ex_update_max_name_length(int exoid, int length);
705int ex_leavedef(int neid, /* NemesisI file ID */
706 const char *func_name /* Name of calling function */
707 );
708
709int ex_get_file_type(int neid, /* NetCDF/Exodus file ID */
710 char *ftype /* Nemesis file type */
711 );
712
713int ex_put_nemesis_version(int neid); /* NetCDF/Exodus file ID */
714
715int ne_check_file_version(int neid /* NetCDF/Exodus file ID */
716 );
717
718char *ex_catstrn12(char *name, int num1, int num2);
719
720int ne_id_lkup(int neid, /* NetCDF/Exodus file ID */
721 const char *var_name, /* Nemesis variable name */
722 int64_t *idx, /* index variable for variable, length 2 */
723 ex_entity_id ne_var_id /* NetCDF variable ID */
724 );
725
726 /**
727 * For output databases, the maximum length of any entity, variable,
728 * property, attribute, or coordinate name to be written (not
729 * including the NULL terminator). If a name is longer than this
730 * value, a warning message will be output to stderr and the name
731 * will be truncated. Must be set (via call to
732 * 'ex_set_max_name_length(exoid, int len)' prior to calling ex_create.
733 *
734 * For input databases, the size of the name arrays that the client
735 * code will be passing to API routines that retrieve names (not
736 * including the NULL terminator). This defaults to 32 for
737 * compatibility with older clients. The value used at the time of
738 * creation of the database can be queried by ex_inquire with the
739 * EX_INQ_DB_MAX_NAME_LENGTH argument. The current value for this
740 * variable can be queried with EX_INQ_CUR_MAX_NAME_LENGTH argument.
741 *
742 * Note that this is a global setting for all databases. If you are
743 * accessing multiple databases, they will all use the same value.
744 */
745 extern int ex_default_max_name_length;
746
747 void *ex_safe_free(void *array);
748#endif
nc_type nc_flt_code(int exoid)
Definition ex_conv.c:264
int ex_put_name_internal(int exoid, int varid, size_t index, const char *name, ex_entity_type type, const char *subtype, const char *routine)
Definition ex_utils.c:229
char * ex_catstr(const char *, int)
Definition ex_utils.c:347
ex_element_type
Definition exodusII_int.h:577
@ EX_EL_WEDGE
Definition exodusII_int.h:583
@ EX_EL_TRIANGLE
Definition exodusII_int.h:580
@ EX_EL_SPHERE
Definition exodusII_int.h:588
@ EX_EL_TRISHELL
Definition exodusII_int.h:590
@ EX_EL_SHELL
Definition exodusII_int.h:587
@ EX_EL_PYRAMID
Definition exodusII_int.h:591
@ EX_EL_TETRA
Definition exodusII_int.h:584
@ EX_EL_NULL_ELEMENT
Definition exodusII_int.h:579
@ EX_EL_HEX
Definition exodusII_int.h:582
@ EX_EL_TRUSS
Definition exodusII_int.h:585
@ EX_EL_BEAM
Definition exodusII_int.h:586
@ EX_EL_CIRCLE
Definition exodusII_int.h:589
@ EX_EL_QUAD
Definition exodusII_int.h:581
@ EX_EL_UNK
Definition exodusII_int.h:578
struct obj_stats * exoII_fam
Definition ex_utils.c:66
int ne_id_lkup(int neid, const char *var_name, int64_t *idx, ex_entity_id ne_var_id)
Definition ex_ne_util.c:132
struct obj_stats * exoII_fa
Definition ex_utils.c:58
int ex_check_file_type(const char *path, int *type)
Definition ex_utils.c:86
int ex_leavedef(int neid, const char *func_name)
Definition ex_ne_util.c:70
int ex_get_dimension(int exoid, const char *dimtype, const char *label, size_t *count, int *dimid, const char *routine)
Definition ex_utils.c:1478
void ex_iqsort(int v[], int iv[], int count)
Definition ex_utils.c:1404
struct obj_stats * exoII_fs
Definition ex_utils.c:61
struct ex_file_item * ex_add_file_item(int exoid)
struct obj_stats * exoII_ns
Definition ex_utils.c:59
int ex_is_parallel(int exoid)
Definition ex_conv.c:428
struct obj_stats * ex_get_stat_ptr(int exoid, struct obj_stats **obj_ptr)
Definition ex_utils.c:859
void ex_rm_stat_ptr(int exoid, struct obj_stats **obj_ptr)
Definition ex_utils.c:900
int ex_conv_ini(int exoid, int *comp_wordsize, int *io_wordsize, int file_wordsize, int int64_status, int is_parallel)
Definition ex_conv.c:84
int ex_id_lkup(int exoid, ex_entity_type id_type, ex_entity_id num)
Definition ex_utils.c:565
char * ex_dim_num_objects(ex_entity_type obj_type)
Definition ex_utils.c:436
ex_coordinate_frame_type
Definition exodusII_int.h:595
@ EX_CF_SPHERICAL
Definition exodusII_int.h:598
@ EX_CF_RECTANGULAR
Definition exodusII_int.h:596
@ EX_CF_CYLINDRICAL
Definition exodusII_int.h:597
struct ex_file_item * ex_find_file_item(int exoid)
Definition ex_conv.c:72
int ne_check_file_version(int neid)
Definition ex_ne_util.c:306
void ex_trim_internal(char *name)
Definition ex_utils.c:326
struct obj_stats * exoII_em
Definition ex_utils.c:64
struct obj_stats * exoII_ed
Definition ex_utils.c:57
struct obj_stats * exoII_es
Definition ex_utils.c:60
void ex_conv_exit(int exoid)
Definition ex_conv.c:221
int ex_put_names_internal(int exoid, int varid, size_t count, char **names, ex_entity_type type, const char *subtype, const char *routine)
Definition ex_utils.c:173
int ex_get_file_item(int, struct list_item **)
Definition ex_utils.c:1066
struct obj_stats * exoII_nm
Definition ex_utils.c:67
int ex_inc_file_item(int, struct list_item **)
Definition ex_utils.c:1004
struct obj_stats * exoII_eb
Definition ex_utils.c:56
int ex_comp_ws(int exoid)
Definition ex_conv.c:405
void * ex_safe_free(void *array)
Definition ex_utils.c:1558
char * ex_name_of_map(ex_entity_type, int)
Definition ex_utils.c:531
char * ex_catstrn12(char *name, int num1, int num2)
Definition ex_ne_util.c:92
void ex_iqsort64(int64_t v[], int64_t iv[], int64_t count)
Definition ex_utils.c:1418
int ex_default_max_name_length
char * ex_catstr2(const char *, int, const char *, int)
Definition ex_utils.c:359
struct obj_stats * exoII_edm
Definition ex_utils.c:65
char * ex_dim_num_entries_in_object(ex_entity_type, int)
Definition ex_utils.c:479
void ex_rm_file_item(int, struct list_item **)
Definition ex_utils.c:1119
struct obj_stats * exoII_els
Definition ex_utils.c:63
int ex_put_nemesis_version(int neid)
Definition ex_ne_util.c:259
int ex_get_file_type(int neid, char *ftype)
Definition ex_ne_util.c:214
struct list_item ** ex_get_counter_list(ex_entity_type obj_type)
Definition ex_utils.c:944
int ex_get_cpu_ws(void)
Definition ex_utils.c:1223
int ex_get_names_internal(int exoid, int varid, size_t count, char **names, ex_entity_type type, const char *routine)
Definition ex_utils.c:278
int ex_get_name_internal(int exoid, int varid, size_t index, char *name, int name_size, ex_entity_type type, const char *routine)
Definition ex_utils.c:299
void ex_compress_variable(int exoid, int varid, int type)
Definition ex_utils.c:1526
void ex_update_max_name_length(int exoid, int length)
Definition ex_utils.c:150
struct obj_stats * exoII_ss
Definition ex_utils.c:62
char * ex_name_var_of_object(ex_entity_type, int, int)
Definition ex_utils.c:506
ex_entity_type
Definition exodusII.h:210
int64_t ex_entity_id
Definition exodusII.h:267
Definition exodusII_int.h:618
int num_sides
Definition exodusII_int.h:623
char elem_type[33]
Definition exodusII_int.h:619
int64_t elem_ctr
Definition exodusII_int.h:626
int64_t elem_blk_id
Definition exodusII_int.h:620
int num_attr
Definition exodusII_int.h:625
int64_t num_elem_in_blk
Definition exodusII_int.h:621
int num_nodes_per_elem
Definition exodusII_int.h:622
int num_nodes_per_side[6]
Definition exodusII_int.h:624
ex_element_type elem_type_val
Definition exodusII_int.h:627
Definition exodusII_int.h:604
int file_id
Definition exodusII_int.h:605
struct ex_file_item * next
Definition exodusII_int.h:614
int maximum_name_length
Definition exodusII_int.h:608
unsigned int shuffle
Definition exodusII_int.h:611
unsigned int is_parallel
Definition exodusII_int.h:613
unsigned int file_type
Definition exodusII_int.h:612
nc_type netcdf_type_code
Definition exodusII_int.h:606
unsigned int user_compute_wordsize
Definition exodusII_int.h:610
int int64_status
Definition exodusII_int.h:607
unsigned int compression_level
Definition exodusII_int.h:609
Definition exodusII_int.h:630
struct list_item * next
Definition exodusII_int.h:633
int value
Definition exodusII_int.h:632
int exo_id
Definition exodusII_int.h:631
Definition exodusII_int.h:636
long num
Definition exodusII_int.h:639
int * stat_vals
Definition exodusII_int.h:638
struct obj_stats * next
Definition exodusII_int.h:643
int exoid
Definition exodusII_int.h:640
int valid_stat
Definition exodusII_int.h:642
int valid_ids
Definition exodusII_int.h:641
int64_t * id_vals
Definition exodusII_int.h:637