1 /* 2 * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract 3 * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement 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 #ifndef __APPLE__ 47 #if defined __STDC__ || defined __cplusplus 48 #include <stdlib.h> 49 #endif 50 #endif 51 52 #ifdef _MSC_VER 53 # pragma warning ( disable : 4127 ) 54 # pragma warning ( disable : 4706 ) 55 # pragma warning ( disable : 4701 ) 56 #endif 57 58 #if defined(__BORLANDC__) 59 #pragma warn -8004 /* "assigned a value that is never used" */ 60 #endif 61 62 63 #include <stdio.h> 64 65 #define MAX_VAR_NAME_LENGTH 32 /**< Internal use only */ 66 67 /* this should be defined in ANSI C and C++, but just in case ... */ 68 #ifndef NULL 69 #define NULL 0 70 #endif 71 72 /* Default "filesize" for newly created files. 73 * Set to 0 for normal filesize setting. 74 * Set to 1 for EXODUS_LARGE_MODEL setting to be the default 75 */ 76 #define EXODUS_DEFAULT_SIZE 1 77 78 /* Exodus error return codes - function return values: */ 79 #define EX_FATAL -1 /* fatal error flag def */ 80 #define EX_NOERR 0 /* no error flag def */ 81 #define EX_WARN 1 /* warning flag def */ 82 83 /* 84 * This file contains defined constants that are used internally in the 85 * EXODUS II API. 86 * 87 * The first group of constants refer to netCDF variables, attributes, or 88 * dimensions in which the EXODUS II data are stored. Using the defined 89 * constants will allow the names of the netCDF entities to be changed easily 90 * in the future if needed. The first three letters of the constant identify 91 * the netCDF entity as a variable (VAR), dimension (DIM), or attribute (ATT). 92 * 93 * NOTE: The entity name should not have any blanks in it. Blanks are 94 * technically legal but some netcdf utilities (ncgen in particular) 95 * fail when they encounter a blank in a name. 96 * 97 * DEFINED CONSTANT ENTITY NAME DATA STORED IN ENTITY 98 */ 99 #define ATT_FILE_TYPE "type" /* obsolete */ 100 #define ATT_TITLE "title" /* the database title */ 101 #define ATT_API_VERSION "api_version" /* the EXODUS II api vers # */ 102 #define ATT_API_VERSION_BLANK "api version" /* the EXODUS II api vers # */ 103 /* used for db version 2.01 */ 104 /* and earlier */ 105 #define ATT_VERSION "version" /* the EXODUS II file vers # */ 106 #define ATT_FILESIZE "file_size" /* 1=large, 0=normal */ 107 #define ATT_FLT_WORDSIZE "floating_point_word_size" 108 /* word size of floating */ 109 /* point numbers in file */ 110 #define ATT_FLT_WORDSIZE_BLANK "floating point word size" 111 /* word size of floating */ 112 /* point numbers in file */ 113 /* used for db version 2.01 */ 114 /* and earlier */ 115 #define ATT_MAX_NAME_LENGTH "maximum_name_length" 116 117 #define DIM_NUM_NODES "num_nodes" /* # of nodes */ 118 #define DIM_NUM_DIM "num_dim" /* # of dimensions; 2- or 3-d*/ 119 #define DIM_NUM_EDGE "num_edge" /* # of edges (over all blks)*/ 120 #define DIM_NUM_FACE "num_face" /* # of faces (over all blks)*/ 121 #define DIM_NUM_ELEM "num_elem" /* # of elements */ 122 #define DIM_NUM_EL_BLK "num_el_blk" /* # of element blocks */ 123 #define DIM_NUM_ED_BLK "num_ed_blk" /* # of edge blocks */ 124 #define DIM_NUM_FA_BLK "num_fa_blk" /* # of face blocks */ 125 #define VAR_COORD "coord" /* nodal coordinates */ 126 #define VAR_COORD_X "coordx" /* X-dimension coordinate */ 127 #define VAR_COORD_Y "coordy" /* Y-dimension coordinate */ 128 #define VAR_COORD_Z "coordz" /* Z-dimension coordinate */ 129 #define VAR_NAME_COOR "coor_names" /* names of coordinates */ 130 #define VAR_NAME_EL_BLK "eb_names" /* names of element blocks */ 131 #define VAR_NAME_NS "ns_names" /* names of node sets */ 132 #define VAR_NAME_SS "ss_names" /* names of side sets */ 133 #define VAR_NAME_EM "emap_names" /* names of element maps */ 134 #define VAR_NAME_EDM "edmap_names" /* names of edge maps */ 135 #define VAR_NAME_FAM "famap_names" /* names of face maps */ 136 #define VAR_NAME_NM "nmap_names" /* names of node maps */ 137 #define VAR_NAME_ED_BLK "ed_names" /* names of edge blocks */ 138 #define VAR_NAME_FA_BLK "fa_names" /* names of face blocks */ 139 #define VAR_NAME_ES "es_names" /* names of edge sets */ 140 #define VAR_NAME_FS "fs_names" /* names of face sets */ 141 #define VAR_NAME_ELS "els_names" /* names of element sets */ 142 #define VAR_STAT_EL_BLK "eb_status" /* element block status */ 143 #define VAR_STAT_ECONN "econn_status" /* element block edge status */ 144 #define VAR_STAT_FCONN "fconn_status" /* element block face status */ 145 #define VAR_STAT_ED_BLK "ed_status" /* edge block status */ 146 #define VAR_STAT_FA_BLK "fa_status" /* face block status */ 147 #define VAR_ID_EL_BLK "eb_prop1" /* element block ids props */ 148 #define VAR_ID_ED_BLK "ed_prop1" /* edge block ids props */ 149 #define VAR_ID_FA_BLK "fa_prop1" /* face block ids props */ 150 #define ATT_NAME_ELB "elem_type" /* element type names for */ 151 /* each element block */ 152 #define DIM_NUM_EL_IN_BLK(num) ex_catstr("num_el_in_blk",num) 153 /* # of elements in element */ 154 /* block num */ 155 #define DIM_NUM_NOD_PER_EL(num) ex_catstr("num_nod_per_el",num) 156 /* # of nodes per element in */ 157 /* element block num */ 158 #define DIM_NUM_ATT_IN_BLK(num) ex_catstr("num_att_in_blk",num) 159 /* # of attributes in element*/ 160 /* block num */ 161 #define DIM_NUM_ED_IN_EBLK(num) ex_catstr("num_ed_in_blk",num) 162 /* # of edges in edge */ 163 /* block num */ 164 #define DIM_NUM_NOD_PER_ED(num) ex_catstr("num_nod_per_ed",num) 165 /* # of nodes per edge in */ 166 /* edge block num */ 167 #define DIM_NUM_EDG_PER_EL(num) ex_catstr("num_edg_per_el",num) 168 /* # of edges per element in */ 169 /* element block num */ 170 #define DIM_NUM_ATT_IN_EBLK(num) ex_catstr("num_att_in_eblk",num) 171 /* # of attributes in edge */ 172 /* block num */ 173 #define DIM_NUM_FA_IN_FBLK(num) ex_catstr("num_fa_in_blk",num) 174 /* # of faces in face */ 175 /* block num */ 176 #define DIM_NUM_NOD_PER_FA(num) ex_catstr("num_nod_per_fa",num) 177 /* # of nodes per face in */ 178 /* face block num */ 179 #define DIM_NUM_FAC_PER_EL(num) ex_catstr("num_fac_per_el",num) 180 /* # of faces per element in */ 181 /* element block num */ 182 #define DIM_NUM_ATT_IN_FBLK(num) ex_catstr("num_att_in_fblk",num) 183 /* # of attributes in face */ 184 /* block num */ 185 #define DIM_NUM_ATT_IN_NBLK "num_att_in_nblk" 186 187 #define VAR_CONN(num) ex_catstr("connect",num) 188 /* element connectivity for */ 189 /* element block num */ 190 #define VAR_EBEPEC(num) ex_catstr("ebepecnt",num) 191 /* array containing number of entity per */ 192 /* entity for n-sided face/element blocks */ 193 #define VAR_ATTRIB(num) ex_catstr("attrib",num) 194 /* list of attributes for */ 195 /* element block num */ 196 #define VAR_NAME_ATTRIB(num) ex_catstr("attrib_name",num) 197 /* list of attribute names */ 198 /* for element block num */ 199 #define VAR_EB_PROP(num) ex_catstr("eb_prop",num) 200 /* list of the numth property*/ 201 /* for all element blocks */ 202 #define VAR_ECONN(num) ex_catstr("edgconn",num) 203 /* edge connectivity for */ 204 /* element block num */ 205 #define VAR_EBCONN(num) ex_catstr("ebconn",num) 206 /* edge connectivity for */ 207 /* edge block num */ 208 #define VAR_EATTRIB(num) ex_catstr("eattrb",num) 209 /* list of attributes for */ 210 /* edge block num */ 211 #define VAR_NAME_EATTRIB(num) ex_catstr("eattrib_name",num) 212 /* list of attribute names */ 213 /* for edge block num */ 214 #define VAR_NATTRIB "nattrb" 215 #define VAR_NAME_NATTRIB "nattrib_name" 216 #define DIM_NUM_ATT_IN_NBLK "num_att_in_nblk" 217 218 #define VAR_NSATTRIB(num) ex_catstr("nsattrb",num) 219 #define VAR_NAME_NSATTRIB(num) ex_catstr("nsattrib_name",num) 220 #define DIM_NUM_ATT_IN_NS(num) ex_catstr("num_att_in_ns",num) 221 222 #define VAR_SSATTRIB(num) ex_catstr("ssattrb",num) 223 #define VAR_NAME_SSATTRIB(num) ex_catstr("ssattrib_name",num) 224 #define DIM_NUM_ATT_IN_SS(num) ex_catstr("num_att_in_ss",num) 225 226 #define VAR_ESATTRIB(num) ex_catstr("esattrb",num) 227 #define VAR_NAME_ESATTRIB(num) ex_catstr("esattrib_name",num) 228 #define DIM_NUM_ATT_IN_ES(num) ex_catstr("num_att_in_es",num) 229 230 #define VAR_FSATTRIB(num) ex_catstr("fsattrb",num) 231 #define VAR_NAME_FSATTRIB(num) ex_catstr("fsattrib_name",num) 232 #define DIM_NUM_ATT_IN_FS(num) ex_catstr("num_att_in_fs",num) 233 234 #define VAR_ELSATTRIB(num) ex_catstr("elsattrb",num) 235 #define VAR_NAME_ELSATTRIB(num) ex_catstr("elsattrib_name",num) 236 #define DIM_NUM_ATT_IN_ELS(num) ex_catstr("num_att_in_els",num) 237 238 #define VAR_ED_PROP(num) ex_catstr("ed_prop",num) 239 /* list of the numth property*/ 240 /* for all edge blocks */ 241 #define VAR_FCONN(num) ex_catstr("facconn",num) 242 /* face connectivity for */ 243 /* element block num */ 244 #define VAR_FBCONN(num) ex_catstr("fbconn",num) 245 /* face connectivity for */ 246 /* face block num */ 247 #define VAR_FBEPEC(num) ex_catstr("fbepecnt",num) 248 /* array containing number of entity per */ 249 /* entity for n-sided face/element blocks */ 250 #define VAR_FATTRIB(num) ex_catstr("fattrb",num) 251 /* list of attributes for */ 252 /* face block num */ 253 #define VAR_NAME_FATTRIB(num) ex_catstr("fattrib_name",num) 254 /* list of attribute names */ 255 /* for face block num */ 256 #define VAR_FA_PROP(num) ex_catstr("fa_prop",num) 257 /* list of the numth property*/ 258 /* for all face blocks */ 259 #define ATT_PROP_NAME "name" /* name attached to element */ 260 /* block, node set, side */ 261 /* set, element map, or */ 262 /* map properties */ 263 #define VAR_MAP "elem_map" /* element order map */ 264 /* obsolete, replaced by */ 265 /* VAR_ELEM_MAP(num) */ 266 #define DIM_NUM_SS "num_side_sets" /* # of side sets */ 267 #define VAR_SS_STAT "ss_status" /* side set status */ 268 #define VAR_SS_IDS "ss_prop1" /* side set id properties */ 269 #define DIM_NUM_SIDE_SS(num) ex_catstr("num_side_ss",num) 270 /* # of sides in side set num*/ 271 #define DIM_NUM_DF_SS(num) ex_catstr("num_df_ss",num) 272 /* # of distribution factors */ 273 /* in side set num */ 274 /*#define DIM_NUM_NOD_SS(num) ex_catstr("num_nod_ss",num) *** obsolete *** */ 275 /* # of nodes in side set num*/ 276 #define VAR_FACT_SS(num) ex_catstr("dist_fact_ss",num) 277 /* the distribution factors */ 278 /* for each node in side */ 279 /* set num */ 280 #define VAR_ELEM_SS(num) ex_catstr("elem_ss",num) 281 /* list of elements in side */ 282 /* set num */ 283 #define VAR_SIDE_SS(num) ex_catstr("side_ss",num) 284 /* list of sides in side set */ 285 #define VAR_SS_PROP(num) ex_catstr("ss_prop",num) 286 /* list of the numth property*/ 287 /* for all side sets */ 288 #define DIM_NUM_ES "num_edge_sets"/* # of edge sets */ 289 #define VAR_ES_STAT "es_status" /* edge set status */ 290 #define VAR_ES_IDS "es_prop1" /* edge set id properties */ 291 #define DIM_NUM_EDGE_ES(num) ex_catstr("num_edge_es",num) 292 /* # of edges in edge set num*/ 293 #define DIM_NUM_DF_ES(num) ex_catstr("num_df_es",num) 294 /* # of distribution factors */ 295 /* in edge set num */ 296 /*#define DIM_NUM_NOD_ES(num) ex_catstr("num_nod_es",num) *** obsolete *** */ 297 /* # of nodes in edge set num*/ 298 #define VAR_FACT_ES(num) ex_catstr("dist_fact_es",num) 299 /* the distribution factors */ 300 /* for each node in edge */ 301 /* set num */ 302 #define VAR_EDGE_ES(num) ex_catstr("edge_es",num) 303 /* list of edges in edge */ 304 /* set num */ 305 #define VAR_ORNT_ES(num) ex_catstr("ornt_es",num) 306 /* list of orientations in */ 307 /* the edge set. */ 308 #define VAR_ES_PROP(num) ex_catstr("es_prop",num) 309 /* list of the numth property*/ 310 /* for all edge sets */ 311 #define DIM_NUM_FS "num_face_sets"/* # of face sets */ 312 #define VAR_FS_STAT "fs_status" /* face set status */ 313 #define VAR_FS_IDS "fs_prop1" /* face set id properties */ 314 #define DIM_NUM_FACE_FS(num) ex_catstr("num_face_fs",num) 315 /* # of faces in side set num*/ 316 #define DIM_NUM_DF_FS(num) ex_catstr("num_df_fs",num) 317 /* # of distribution factors */ 318 /* in face set num */ 319 /*#define DIM_NUM_NOD_FS(num) ex_catstr("num_nod_ss",num) *** obsolete *** */ 320 /* # of nodes in face set num*/ 321 #define VAR_FACT_FS(num) ex_catstr("dist_fact_fs",num) 322 /* the distribution factors */ 323 /* for each node in face */ 324 /* set num */ 325 #define VAR_FACE_FS(num) ex_catstr("face_fs",num) 326 /* list of elements in face */ 327 /* set num */ 328 #define VAR_ORNT_FS(num) ex_catstr("ornt_fs",num) 329 /* list of sides in side set */ 330 #define VAR_FS_PROP(num) ex_catstr("fs_prop",num) 331 /* list of the numth property*/ 332 /* for all face sets */ 333 #define DIM_NUM_ELS "num_elem_sets"/* # of elem sets */ 334 #define DIM_NUM_ELE_ELS(num) ex_catstr("num_ele_els",num) 335 /* # of elements in elem set */ 336 /* num */ 337 #define DIM_NUM_DF_ELS(num) ex_catstr("num_df_els",num) 338 /* # of distribution factors */ 339 /* in element set num */ 340 #define VAR_ELS_STAT "els_status" /* elem set status */ 341 #define VAR_ELS_IDS "els_prop1" /* elem set id properties */ 342 #define VAR_ELEM_ELS(num) ex_catstr("elem_els",num) 343 /* list of elements in elem */ 344 /* set num */ 345 #define VAR_FACT_ELS(num) ex_catstr("dist_fact_els",num) 346 /* list of distribution */ 347 /* factors in elem set num */ 348 #define VAR_ELS_PROP(num) ex_catstr("els_prop",num) 349 /* list of the numth property*/ 350 /* for all elem sets */ 351 #define DIM_NUM_NS "num_node_sets"/* # of node sets */ 352 #define DIM_NUM_NOD_NS(num) ex_catstr("num_nod_ns",num) 353 /* # of nodes in node set */ 354 /* num */ 355 #define DIM_NUM_DF_NS(num) ex_catstr("num_df_ns",num) 356 /* # of distribution factors */ 357 /* in node set num */ 358 #define VAR_NS_STAT "ns_status" /* node set status */ 359 #define VAR_NS_IDS "ns_prop1" /* node set id properties */ 360 #define VAR_NODE_NS(num) ex_catstr("node_ns",num) 361 /* list of nodes in node set */ 362 /* num */ 363 #define VAR_FACT_NS(num) ex_catstr("dist_fact_ns",num) 364 /* list of distribution */ 365 /* factors in node set num */ 366 #define VAR_NS_PROP(num) ex_catstr("ns_prop",num) 367 /* list of the numth property*/ 368 /* for all node sets */ 369 #define DIM_NUM_QA "num_qa_rec" /* # of QA records */ 370 #define VAR_QA_TITLE "qa_records" /* QA records */ 371 #define DIM_NUM_INFO "num_info" /* # of information records */ 372 #define VAR_INFO "info_records" /* information records */ 373 #define VAR_HIS_TIME "time_hist" /* obsolete */ 374 #define VAR_WHOLE_TIME "time_whole" /* simulation times for whole*/ 375 /* time steps */ 376 #define VAR_ELEM_TAB "elem_var_tab" /* element variable truth */ 377 /* table */ 378 #define VAR_EBLK_TAB "edge_var_tab" /* edge variable truth table */ 379 #define VAR_FBLK_TAB "face_var_tab" /* face variable truth table */ 380 #define VAR_ELSET_TAB "elset_var_tab" /* elemset variable truth */ 381 /* table */ 382 #define VAR_SSET_TAB "sset_var_tab" /* sideset variable truth */ 383 /* table */ 384 #define VAR_FSET_TAB "fset_var_tab" /* faceset variable truth */ 385 /* table */ 386 #define VAR_ESET_TAB "eset_var_tab" /* edgeset variable truth */ 387 /* table */ 388 #define VAR_NSET_TAB "nset_var_tab" /* nodeset variable truth */ 389 /* table */ 390 #define DIM_NUM_GLO_VAR "num_glo_var" /* # of global variables */ 391 #define VAR_NAME_GLO_VAR "name_glo_var" /* names of global variables */ 392 #define VAR_GLO_VAR "vals_glo_var" /* values of global variables*/ 393 #define DIM_NUM_NOD_VAR "num_nod_var" /* # of nodal variables */ 394 #define VAR_NAME_NOD_VAR "name_nod_var" /* names of nodal variables */ 395 #define VAR_NOD_VAR "vals_nod_var" /* values of nodal variables */ 396 #define VAR_NOD_VAR_NEW(num) ex_catstr("vals_nod_var",num) 397 /* values of nodal variables */ 398 #define DIM_NUM_ELE_VAR "num_elem_var" /* # of element variables */ 399 #define VAR_NAME_ELE_VAR "name_elem_var" /* names of element variables*/ 400 #define VAR_ELEM_VAR(num1,num2) ex_catstr2("vals_elem_var",num1,"eb",num2) 401 /* values of element variable*/ 402 /* num1 in element block */ 403 /* num2 */ 404 #define DIM_NUM_EDG_VAR "num_edge_var" /* # of edge variables */ 405 #define VAR_NAME_EDG_VAR "name_edge_var" /* names of edge variables */ 406 #define VAR_EDGE_VAR(num1,num2) ex_catstr2("vals_edge_var",num1,"eb",num2) 407 /* values of edge variable */ 408 /* num1 in edge block num2 */ 409 #define DIM_NUM_FAC_VAR "num_face_var" /* # of face variables */ 410 #define VAR_NAME_FAC_VAR "name_face_var" /* names of face variables */ 411 #define VAR_FACE_VAR(num1,num2) ex_catstr2("vals_face_var",num1,"fb",num2) 412 /* values of face variable */ 413 /* num1 in face block num2 */ 414 415 #define DIM_NUM_NSET_VAR "num_nset_var" /* # of nodeset variables */ 416 #define VAR_NAME_NSET_VAR "name_nset_var" /* names of nodeset variables*/ 417 #define VAR_NS_VAR(num1,num2) ex_catstr2("vals_nset_var",num1,"ns",num2) 418 /* values of nodeset variable*/ 419 /* num1 in nodeset num2 */ 420 #define DIM_NUM_ESET_VAR "num_eset_var" /* # of edgeset variables */ 421 #define VAR_NAME_ESET_VAR "name_eset_var" /* names of edgeset variables*/ 422 #define VAR_ES_VAR(num1,num2) ex_catstr2("vals_eset_var",num1,"es",num2) 423 /* values of edgeset variable*/ 424 /* num1 in edgeset num2 */ 425 #define DIM_NUM_FSET_VAR "num_fset_var" /* # of faceset variables */ 426 #define VAR_NAME_FSET_VAR "name_fset_var" /* names of faceset variables*/ 427 #define VAR_FS_VAR(num1,num2) ex_catstr2("vals_fset_var",num1,"fs",num2) 428 /* values of faceset variable*/ 429 /* num1 in faceset num2 */ 430 #define DIM_NUM_SSET_VAR "num_sset_var" /* # of sideset variables */ 431 #define VAR_NAME_SSET_VAR "name_sset_var" /* names of sideset variables*/ 432 #define VAR_SS_VAR(num1,num2) ex_catstr2("vals_sset_var",num1,"ss",num2) 433 /* values of sideset variable*/ 434 /* num1 in sideset num2 */ 435 #define DIM_NUM_ELSET_VAR "num_elset_var" /* # of element set variables*/ 436 #define VAR_NAME_ELSET_VAR "name_elset_var"/* names of elemset variables*/ 437 #define VAR_ELS_VAR(num1,num2) ex_catstr2("vals_elset_var",num1,"es",num2) 438 /* values of elemset variable*/ 439 /* num1 in elemset num2 */ 440 441 #define DIM_NUM_HIS_VAR "num_his_var" /* obsolete */ 442 #define VAR_NAME_HIS_VAR "name_his_var" /* obsolete */ 443 #define VAR_HIS_VAR "vals_his_var" /* obsolete */ 444 #define DIM_STR "len_string" /* general dimension of */ 445 /* length MAX_STR_LENGTH */ 446 /* used for some string lengths */ 447 #define DIM_STR_NAME "len_name" /* general dimension of */ 448 /* length MAX_NAME_LENGTH */ 449 /* used for name lengths */ 450 #define DIM_LIN "len_line" /* general dimension of */ 451 /* length MAX_LINE_LENGTH */ 452 /* used for long strings */ 453 #define DIM_N4 "four" /* general dimension of */ 454 /* length 4 */ 455 #define DIM_TIME "time_step" /* unlimited (expandable) */ 456 /* dimension for time steps*/ 457 #define DIM_HTIME "hist_time_step"/* obsolete */ 458 #define VAR_ELEM_NUM_MAP "elem_num_map" /* element numbering map */ 459 /* obsolete, replaced by */ 460 /* VAR_ELEM_MAP(num) */ 461 #define VAR_FACE_NUM_MAP "face_num_map" /* face numbering map */ 462 /* obsolete, replaced by */ 463 /* VAR_FACE_MAP(num) */ 464 #define VAR_EDGE_NUM_MAP "edge_num_map" /* edge numbering map */ 465 /* obsolete, replaced by */ 466 /* VAR_EDGE_MAP(num) */ 467 #define VAR_NODE_NUM_MAP "node_num_map" /* node numbering map */ 468 /* obsolete, replaced by */ 469 /* VAR_NODE_MAP(num) */ 470 #define DIM_NUM_EM "num_elem_maps" /* # of element maps */ 471 #define VAR_ELEM_MAP(num) ex_catstr("elem_map",num) 472 /* the numth element map */ 473 #define VAR_EM_PROP(num) ex_catstr("em_prop",num) 474 /* list of the numth property*/ 475 /* for all element maps */ 476 #define DIM_NUM_EDM "num_edge_maps" /* # of edge maps */ 477 #define VAR_EDGE_MAP(num) ex_catstr("edge_map",num) 478 /* the numth edge map */ 479 #define VAR_EDM_PROP(num) ex_catstr("edm_prop",num) 480 /* list of the numth property*/ 481 /* for all edge maps */ 482 #define DIM_NUM_FAM "num_face_maps" /* # of face maps */ 483 #define VAR_FACE_MAP(num) ex_catstr("face_map",num) 484 /* the numth face map */ 485 #define VAR_FAM_PROP(num) ex_catstr("fam_prop",num) 486 /* list of the numth property*/ 487 /* for all face maps */ 488 #define DIM_NUM_NM "num_node_maps" /* # of node maps */ 489 #define VAR_NODE_MAP(num) ex_catstr("node_map",num) 490 /* the numth node map */ 491 #define VAR_NM_PROP(num) ex_catstr("nm_prop",num) 492 /* list of the numth property*/ 493 /* for all node maps */ 494 495 #define DIM_NUM_CFRAMES "num_cframes" 496 #define DIM_NUM_CFRAME9 "num_cframes_9" 497 #define VAR_FRAME_COORDS "frame_coordinates" 498 #define VAR_FRAME_IDS "frame_ids" 499 #define VAR_FRAME_TAGS "frame_tags" 500 501 enum ex_element_type { 502 EX_EL_UNK = -1, /**< unknown entity */ 503 EX_EL_NULL_ELEMENT= 0, 504 EX_EL_TRIANGLE = 1, /**< Triangle entity */ 505 EX_EL_QUAD = 2, /**< Quad entity */ 506 EX_EL_HEX = 3, /**< Hex entity */ 507 EX_EL_WEDGE = 4, /**< Wedge entity */ 508 EX_EL_TETRA = 5, /**< Tetra entity */ 509 EX_EL_TRUSS = 6, /**< Truss entity */ 510 EX_EL_BEAM = 7, /**< Beam entity */ 511 EX_EL_SHELL = 8, /**< Shell entity */ 512 EX_EL_SPHERE = 9, /**< Sphere entity */ 513 EX_EL_CIRCLE = 10, /**< Circle entity */ 514 EX_EL_TRISHELL = 11, /**< Triangular Shell entity */ 515 EX_EL_PYRAMID = 12 /**< Pyramid entity */ 516 }; 517 typedef enum ex_element_type ex_element_type; 518 519 enum ex_coordinate_frame_type { 520 EX_CF_RECTANGULAR = 1, 521 EX_CF_CYLINDRICAL = 2, 522 EX_CF_SPHERICAL = 3 523 }; 524 typedef enum ex_coordinate_frame_type ex_coordinate_frame_type; 525 526 /* Internal structure declarations */ 527 528 struct elem_blk_parm 529 { 530 char elem_type[33]; 531 int elem_blk_id; 532 int num_elem_in_blk; 533 int num_nodes_per_elem; 534 int num_sides; 535 int num_nodes_per_side[6]; 536 int num_attr; 537 int elem_ctr; 538 ex_element_type elem_type_val; 539 }; 540 541 struct list_item { /* for use with ex_get_file_item */ 542 543 int exo_id; 544 int value; 545 struct list_item* next; 546 }; 547 548 struct obj_stats { 549 int *id_vals; 550 int *stat_vals; 551 long num; 552 int exoid; 553 int valid_ids; 554 int valid_stat; 555 struct obj_stats *next; 556 }; 557 558 void ex_iqsort(int v[], int iv[], int count ); 559 char* ex_catstr(const char*, int); 560 char* ex_catstr2(const char*, int, const char*, int); 561 char* ex_dim_num_entries_in_object(ex_entity_type, int); 562 char* ex_dim_num_objects(ex_entity_type obj_type); 563 char* ex_name_var_of_object( ex_entity_type, int, int ); 564 char* ex_name_of_map( ex_entity_type, int ); 565 566 int ex_conv_ini (int exoid, int* comp_wordsize, int* io_wordsize, int file_wordsize); 567 void ex_conv_exit (int exoid); 568 nc_type nc_flt_code (int exoid); 569 int ex_comp_ws (int exoid); 570 int ex_get_cpu_ws(void); 571 572 struct list_item** ex_get_counter_list(ex_entity_type obj_type); 573 int ex_get_file_item (int, struct list_item**); 574 int ex_inc_file_item (int, struct list_item**); 575 void ex_rm_file_item (int, struct list_item**); 576 577 extern struct obj_stats* exoII_eb; 578 extern struct obj_stats* exoII_ed; 579 extern struct obj_stats* exoII_fa; 580 extern struct obj_stats* exoII_ns; 581 extern struct obj_stats* exoII_es; 582 extern struct obj_stats* exoII_fs; 583 extern struct obj_stats* exoII_ss; 584 extern struct obj_stats* exoII_els; 585 extern struct obj_stats* exoII_em; 586 extern struct obj_stats* exoII_edm; 587 extern struct obj_stats* exoII_fam; 588 extern struct obj_stats* exoII_nm; 589 590 591 struct obj_stats *ex_get_stat_ptr ( int exoid, struct obj_stats** obj_ptr); 592 void ex_rm_stat_ptr (int exoid, struct obj_stats** obj_ptr); 593 594 int ex_id_lkup (int exoid, ex_entity_type id_type, int num); 595 int ex_get_dimension(int exoid, const char *dimtype, const char *label, 596 size_t *count, int *dimid, const char *routine); 597 598 int ex_get_name_internal(int exoid, int varid, size_t index, char *name, 599 ex_entity_type type, const char *routine); 600 int ex_get_names_internal(int exoid, int varid, size_t count, char**names, 601 ex_entity_type type, const char *routine); 602 int ex_put_name_internal(int exoid, int varid, size_t index, const char *name, 603 ex_entity_type type, const char *subtype, const char *routine); 604 int ex_put_names_internal(int exoid, int varid, size_t count, char**names, 605 ex_entity_type type, const char *subtype, const char *routine); 606 void ex_trim_internal(char *name); 607 void ex_update_max_name_length(int exoid, int length); /* BSK - 2/27/2012 */ 608 609 #endif 610