ExodusII 4.96
exodusII_int.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005 Sandia Corporation. Under the terms of Contract
00003  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Governement
00004  * retains certain rights in this software.
00005  * 
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions are
00008  * met:
00009  * 
00010  *     * Redistributions of source code must retain the above copyright
00011  *       notice, this list of conditions and the following disclaimer.
00012  * 
00013  *     * Redistributions in binary form must reproduce the above
00014  *       copyright notice, this list of conditions and the following
00015  *       disclaimer in the documentation and/or other materials provided
00016  *       with the distribution.  
00017  * 
00018  *     * Neither the name of Sandia Corporation nor the names of its
00019  *       contributors may be used to endorse or promote products derived
00020  *       from this software without specific prior written permission.
00021  * 
00022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00025  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00026  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00027  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00028  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00029  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00030  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00031  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00032  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033  * 
00034  */
00035 /*****************************************************************************
00036 *
00037 * exodusII_int.h - ExodusII header file for internal Exodus call use only
00038 *
00039 */
00040 
00041 #ifndef EXODUS_II_INT_HDR
00042 #define EXODUS_II_INT_HDR
00043 
00044 #include "netcdf.h"
00045 
00046 #ifndef __APPLE__
00047 #if defined __STDC__ || defined __cplusplus
00048 #include <stdlib.h>
00049 #endif
00050 #endif
00051 
00052 #ifdef _MSC_VER
00053 #  pragma warning ( disable : 4127 )
00054 #  pragma warning ( disable : 4706 )
00055 #  pragma warning ( disable : 4701 )
00056 #endif
00057 
00058 #if defined(__BORLANDC__)
00059 #pragma warn -8004 /* "assigned a value that is never used" */
00060 #endif
00061 
00062 
00063 #include <stdio.h>
00064 
00065 #define MAX_VAR_NAME_LENGTH     20   /**< Internal use only */
00066 
00067 /* this should be defined in ANSI C and C++, but just in case ... */
00068 #ifndef NULL
00069 #define NULL 0
00070 #endif
00071 
00072 /* Default "filesize" for newly created files.
00073  * Set to 0 for normal filesize setting.
00074  * Set to 1 for EXODUS_LARGE_MODEL setting to be the default
00075  */
00076 #define EXODUS_DEFAULT_SIZE 1
00077 
00078 /* Exodus error return codes - function return values:                      */
00079 #define EX_FATAL        -1      /* fatal error flag def                     */
00080 #define EX_NOERR         0      /* no error flag def                        */
00081 #define EX_WARN          1      /* warning flag def                         */
00082 
00083 /*
00084  * This file contains defined constants that are used internally in the
00085  * EXODUS II API.
00086  *
00087  * The first group of constants refer to netCDF variables, attributes, or 
00088  * dimensions in which the EXODUS II data are stored.  Using the defined 
00089  * constants will allow the names of the netCDF entities to be changed easily 
00090  * in the future if needed.  The first three letters of the constant identify 
00091  * the netCDF entity as a variable (VAR), dimension (DIM), or attribute (ATT).
00092  *
00093  * NOTE: The entity name should not have any blanks in it.  Blanks are
00094  *       technically legal but some netcdf utilities (ncgen in particular)
00095  *       fail when they encounter a blank in a name.
00096  *
00097  *      DEFINED CONSTANT        ENTITY NAME     DATA STORED IN ENTITY
00098  */
00099 #define ATT_FILE_TYPE           "type"          /* obsolete                  */
00100 #define ATT_TITLE               "title"         /* the database title        */
00101 #define ATT_API_VERSION         "api_version"   /* the EXODUS II api vers #   */
00102 #define ATT_API_VERSION_BLANK   "api version"   /* the EXODUS II api vers #   */
00103                                                 /*  used for db version 2.01 */
00104                                                 /*  and earlier              */
00105 #define ATT_VERSION             "version"       /* the EXODUS II file vers # */
00106 #define ATT_FILESIZE            "file_size"     /* 1=large, 0=normal */
00107 #define ATT_FLT_WORDSIZE        "floating_point_word_size"
00108                                                 /* word size of floating     */
00109                                                 /* point numbers in file     */
00110 #define ATT_FLT_WORDSIZE_BLANK  "floating point word size"
00111                                                 /* word size of floating     */
00112                                                 /* point numbers in file     */
00113                                                 /* used for db version 2.01  */
00114                                                 /* and earlier               */
00115 #define DIM_NUM_NODES           "num_nodes"     /* # of nodes                */
00116 #define DIM_NUM_DIM             "num_dim"       /* # of dimensions; 2- or 3-d*/
00117 #define DIM_NUM_EDGE            "num_edge"      /* # of edges (over all blks)*/
00118 #define DIM_NUM_FACE            "num_face"      /* # of faces (over all blks)*/
00119 #define DIM_NUM_ELEM            "num_elem"      /* # of elements             */
00120 #define DIM_NUM_EL_BLK          "num_el_blk"    /* # of element blocks       */
00121 #define DIM_NUM_ED_BLK          "num_ed_blk"    /* # of edge blocks          */
00122 #define DIM_NUM_FA_BLK          "num_fa_blk"    /* # of face blocks          */
00123 #define VAR_COORD               "coord"         /* nodal coordinates         */
00124 #define VAR_COORD_X             "coordx"        /* X-dimension coordinate    */
00125 #define VAR_COORD_Y             "coordy"        /* Y-dimension coordinate    */
00126 #define VAR_COORD_Z             "coordz"        /* Z-dimension coordinate    */
00127 #define VAR_NAME_COOR           "coor_names"    /* names of coordinates      */
00128 #define VAR_NAME_EL_BLK         "eb_names"      /* names of element blocks   */
00129 #define VAR_NAME_NS             "ns_names"      /* names of node sets        */
00130 #define VAR_NAME_SS             "ss_names"      /* names of side sets        */
00131 #define VAR_NAME_EM             "emap_names"    /* names of element maps     */
00132 #define VAR_NAME_EDM            "edmap_names"   /* names of edge    maps     */
00133 #define VAR_NAME_FAM            "famap_names"   /* names of face    maps     */
00134 #define VAR_NAME_NM             "nmap_names"    /* names of node    maps     */
00135 #define VAR_NAME_ED_BLK         "ed_names"      /* names of edge    blocks   */
00136 #define VAR_NAME_FA_BLK         "fa_names"      /* names of face    blocks   */
00137 #define VAR_NAME_ES             "es_names"      /* names of edge    sets     */
00138 #define VAR_NAME_FS             "fs_names"      /* names of face    sets     */
00139 #define VAR_NAME_ELS            "els_names"     /* names of element sets     */
00140 #define VAR_STAT_EL_BLK         "eb_status"     /* element block status      */
00141 #define VAR_STAT_ECONN          "econn_status"  /* element block edge status */
00142 #define VAR_STAT_FCONN          "fconn_status"  /* element block face status */
00143 #define VAR_STAT_ED_BLK         "ed_status"     /* edge    block status      */
00144 #define VAR_STAT_FA_BLK         "fa_status"     /* face    block status      */
00145 #define VAR_ID_EL_BLK           "eb_prop1"      /* element block ids props   */
00146 #define VAR_ID_ED_BLK           "ed_prop1"      /* edge    block ids props   */
00147 #define VAR_ID_FA_BLK           "fa_prop1"      /* face    block ids props   */
00148 #define ATT_NAME_ELB            "elem_type"     /* element type names for    */
00149                                                 /*   each element block      */
00150 #define DIM_NUM_EL_IN_BLK(num)  ex_catstr("num_el_in_blk",num)
00151                                                 /* # of elements in element  */
00152                                                 /*   block num               */
00153 #define DIM_NUM_NOD_PER_EL(num) ex_catstr("num_nod_per_el",num)
00154                                                 /* # of nodes per element in */
00155                                                 /*   element block num       */
00156 #define DIM_NUM_ATT_IN_BLK(num) ex_catstr("num_att_in_blk",num)
00157                                                 /* # of attributes in element*/
00158                                                 /*   block num               */
00159 #define DIM_NUM_ED_IN_EBLK(num) ex_catstr("num_ed_in_blk",num)
00160                                                 /* # of edges in edge        */
00161                                                 /*   block num               */
00162 #define DIM_NUM_NOD_PER_ED(num)  ex_catstr("num_nod_per_ed",num)
00163                                                 /* # of nodes per edge in    */
00164                                                 /*   edge block num          */
00165 #define DIM_NUM_EDG_PER_EL(num)  ex_catstr("num_edg_per_el",num)
00166                                                 /* # of edges per element in */
00167                                                 /*   element block num       */
00168 #define DIM_NUM_ATT_IN_EBLK(num) ex_catstr("num_att_in_eblk",num)
00169                                                 /* # of attributes in edge   */
00170                                                 /*   block num               */
00171 #define DIM_NUM_FA_IN_FBLK(num)  ex_catstr("num_fa_in_blk",num)
00172                                                 /* # of faces in face        */
00173                                                 /*   block num               */
00174 #define DIM_NUM_NOD_PER_FA(num)  ex_catstr("num_nod_per_fa",num)
00175                                                 /* # of nodes per face in    */
00176                                                 /*   face block num          */
00177 #define DIM_NUM_FAC_PER_EL(num)  ex_catstr("num_fac_per_el",num)
00178                                                 /* # of faces per element in */
00179                                                 /*   element block num       */
00180 #define DIM_NUM_ATT_IN_FBLK(num) ex_catstr("num_att_in_fblk",num)
00181                                                 /* # of attributes in face   */
00182                                                 /*   block num               */
00183 #define DIM_NUM_ATT_IN_NBLK      "num_att_in_nblk"
00184 
00185 #define VAR_CONN(num)            ex_catstr("connect",num)
00186                                                 /* element connectivity for  */
00187                                                 /*   element block num       */
00188 #define VAR_EBEPEC(num)          ex_catstr("ebepecnt",num)
00189                                                 /* array containing number of entity per */
00190                                                 /*  entity for n-sided face/element blocks */
00191 #define VAR_ATTRIB(num)         ex_catstr("attrib",num)
00192                                                 /* list of attributes for    */
00193                                                 /*   element block num       */
00194 #define VAR_NAME_ATTRIB(num)    ex_catstr("attrib_name",num)
00195                                                 /* list of attribute names   */
00196                                                 /* for element block num     */
00197 #define VAR_EB_PROP(num)        ex_catstr("eb_prop",num)
00198                                                 /* list of the numth property*/
00199                                                 /*   for all element blocks  */
00200 #define VAR_ECONN(num)            ex_catstr("edgconn",num)
00201                                                 /* edge connectivity for     */
00202                                                 /*   element block num       */
00203 #define VAR_EBCONN(num)           ex_catstr("ebconn",num)
00204                                                 /* edge connectivity for     */
00205                                                 /*   edge block num          */
00206 #define VAR_EATTRIB(num)          ex_catstr("eattrb",num)
00207                                                 /* list of attributes for    */
00208                                                 /*   edge block num          */
00209 #define VAR_NAME_EATTRIB(num)    ex_catstr("eattrib_name",num)
00210                                                 /* list of attribute names   */
00211                                                 /* for edge block num        */
00212 #define VAR_NATTRIB              "nattrb"
00213 #define VAR_NAME_NATTRIB         "nattrib_name"
00214 #define DIM_NUM_ATT_IN_NBLK      "num_att_in_nblk"
00215 
00216 #define VAR_NSATTRIB(num)        ex_catstr("nsattrb",num)
00217 #define VAR_NAME_NSATTRIB(num)   ex_catstr("nsattrib_name",num)
00218 #define DIM_NUM_ATT_IN_NS(num)   ex_catstr("num_att_in_ns",num)
00219 
00220 #define VAR_SSATTRIB(num)        ex_catstr("ssattrb",num)
00221 #define VAR_NAME_SSATTRIB(num)   ex_catstr("ssattrib_name",num)
00222 #define DIM_NUM_ATT_IN_SS(num)   ex_catstr("num_att_in_ss",num)
00223 
00224 #define VAR_ESATTRIB(num)        ex_catstr("esattrb",num)
00225 #define VAR_NAME_ESATTRIB(num)   ex_catstr("esattrib_name",num)
00226 #define DIM_NUM_ATT_IN_ES(num)   ex_catstr("num_att_in_es",num)
00227 
00228 #define VAR_FSATTRIB(num)        ex_catstr("fsattrb",num)
00229 #define VAR_NAME_FSATTRIB(num)   ex_catstr("fsattrib_name",num)
00230 #define DIM_NUM_ATT_IN_FS(num)   ex_catstr("num_att_in_fs",num)
00231 
00232 #define VAR_ELSATTRIB(num)       ex_catstr("elsattrb",num)
00233 #define VAR_NAME_ELSATTRIB(num)  ex_catstr("elsattrib_name",num)
00234 #define DIM_NUM_ATT_IN_ELS(num)  ex_catstr("num_att_in_els",num)
00235 
00236 #define VAR_ED_PROP(num)         ex_catstr("ed_prop",num)
00237                                                 /* list of the numth property*/
00238                                                 /*   for all edge blocks     */
00239 #define VAR_FCONN(num)            ex_catstr("facconn",num)
00240                                                 /* face connectivity for     */
00241                                                 /*   element block num       */
00242 #define VAR_FBCONN(num)           ex_catstr("fbconn",num)
00243                                                 /* face connectivity for     */
00244                                                 /*   face block num          */
00245 #define VAR_FBEPEC(num)           ex_catstr("fbepecnt",num)
00246                                                 /* array containing number of entity per */
00247                                                 /*  entity for n-sided face/element blocks */
00248 #define VAR_FATTRIB(num)          ex_catstr("fattrb",num)
00249                                                 /* list of attributes for    */
00250                                                 /*   face block num          */
00251 #define VAR_NAME_FATTRIB(num)    ex_catstr("fattrib_name",num)
00252                                                 /* list of attribute names   */
00253                                                 /* for face block num        */
00254 #define VAR_FA_PROP(num)         ex_catstr("fa_prop",num)
00255                                                 /* list of the numth property*/
00256                                                 /*   for all face blocks     */
00257 #define ATT_PROP_NAME           "name"          /* name attached to element  */
00258                                                 /*   block, node set, side   */
00259                                                 /*   set, element map, or    */
00260                                                 /*   map properties          */
00261 #define VAR_MAP                 "elem_map"      /* element order map         */
00262                                                 /* obsolete, replaced by     */
00263                                                 /* VAR_ELEM_MAP(num)         */
00264 #define DIM_NUM_SS              "num_side_sets" /* # of side sets            */
00265 #define VAR_SS_STAT             "ss_status"     /* side set status           */
00266 #define VAR_SS_IDS              "ss_prop1"      /* side set id properties    */
00267 #define DIM_NUM_SIDE_SS(num)    ex_catstr("num_side_ss",num)
00268                                                 /* # of sides in side set num*/
00269 #define DIM_NUM_DF_SS(num)      ex_catstr("num_df_ss",num)
00270                                                /* # of distribution factors */
00271                                                /* in side set num           */
00272 /*#define DIM_NUM_NOD_SS(num)   ex_catstr("num_nod_ss",num) *** obsolete *** */
00273                                                 /* # of nodes in side set num*/
00274 #define VAR_FACT_SS(num)        ex_catstr("dist_fact_ss",num)
00275                                                 /* the distribution factors  */
00276                                                 /*   for each node in side   */
00277                                                 /*   set num                 */
00278 #define VAR_ELEM_SS(num)        ex_catstr("elem_ss",num)
00279                                                 /* list of elements in side  */
00280                                                 /*   set num                 */
00281 #define VAR_SIDE_SS(num)        ex_catstr("side_ss",num)
00282                                                 /* list of sides in side set */
00283 #define VAR_SS_PROP(num)        ex_catstr("ss_prop",num)
00284                                                 /* list of the numth property*/
00285                                                 /*   for all side sets       */
00286 #define DIM_NUM_ES               "num_edge_sets"/* # of edge sets            */
00287 #define VAR_ES_STAT              "es_status"    /* edge set status           */
00288 #define VAR_ES_IDS               "es_prop1"     /* edge set id properties    */
00289 #define DIM_NUM_EDGE_ES(num)     ex_catstr("num_edge_es",num)
00290                                                 /* # of edges in edge set num*/
00291 #define DIM_NUM_DF_ES(num)       ex_catstr("num_df_es",num)
00292                                                 /* # of distribution factors */
00293                                                 /* in edge set num           */
00294 /*#define DIM_NUM_NOD_ES(num)    ex_catstr("num_nod_es",num) *** obsolete *** */
00295                                                 /* # of nodes in edge set num*/
00296 #define VAR_FACT_ES(num)         ex_catstr("dist_fact_es",num)
00297                                                 /* the distribution factors  */
00298                                                 /*   for each node in edge   */
00299                                                 /*   set num                 */
00300 #define VAR_EDGE_ES(num)         ex_catstr("edge_es",num)
00301                                                 /* list of edges in edge     */
00302                                                 /*   set num                 */
00303 #define VAR_ORNT_ES(num)         ex_catstr("ornt_es",num)
00304                                                 /* list of orientations in   */
00305                                                 /*  the edge set.            */
00306 #define VAR_ES_PROP(num)         ex_catstr("es_prop",num)
00307                                                 /* list of the numth property*/
00308                                                 /*   for all edge sets       */
00309 #define DIM_NUM_FS               "num_face_sets"/* # of face sets            */
00310 #define VAR_FS_STAT              "fs_status"    /* face set status           */
00311 #define VAR_FS_IDS               "fs_prop1"     /* face set id properties    */
00312 #define DIM_NUM_FACE_FS(num)     ex_catstr("num_face_fs",num)
00313                                                 /* # of faces in side set num*/
00314 #define DIM_NUM_DF_FS(num)       ex_catstr("num_df_fs",num)
00315                                                 /* # of distribution factors */
00316                                                 /* in face set num           */
00317 /*#define DIM_NUM_NOD_FS(num)    ex_catstr("num_nod_ss",num) *** obsolete *** */
00318                                                 /* # of nodes in face set num*/
00319 #define VAR_FACT_FS(num)         ex_catstr("dist_fact_fs",num)
00320                                                 /* the distribution factors  */
00321                                                 /*   for each node in face   */
00322                                                 /*   set num                 */
00323 #define VAR_FACE_FS(num)         ex_catstr("face_fs",num)
00324                                                 /* list of elements in face  */
00325                                                 /*   set num                 */
00326 #define VAR_ORNT_FS(num)         ex_catstr("ornt_fs",num)
00327                                                 /* list of sides in side set */
00328 #define VAR_FS_PROP(num)         ex_catstr("fs_prop",num)
00329                                                 /* list of the numth property*/
00330                                                 /*   for all face sets       */
00331 #define DIM_NUM_ELS              "num_elem_sets"/* # of elem sets            */
00332 #define DIM_NUM_ELE_ELS(num)     ex_catstr("num_ele_els",num)
00333                                                 /* # of elements in elem set */
00334                                                 /*   num                     */
00335 #define DIM_NUM_DF_ELS(num)     ex_catstr("num_df_els",num)
00336                                                /* # of distribution factors */
00337                                                /* in element set num        */
00338 #define VAR_ELS_STAT            "els_status"    /* elem set status           */
00339 #define VAR_ELS_IDS             "els_prop1"     /* elem set id properties    */
00340 #define VAR_ELEM_ELS(num)        ex_catstr("elem_els",num)
00341                                                 /* list of elements in elem  */
00342                                                 /*   set num                 */
00343 #define VAR_FACT_ELS(num)       ex_catstr("dist_fact_els",num)
00344                                                 /* list of distribution      */
00345                                                 /*   factors in elem set num */
00346 #define VAR_ELS_PROP(num)       ex_catstr("els_prop",num)
00347                                                 /* list of the numth property*/
00348                                                 /*   for all elem sets       */
00349 #define DIM_NUM_NS               "num_node_sets"/* # of node sets            */
00350 #define DIM_NUM_NOD_NS(num)      ex_catstr("num_nod_ns",num)
00351                                                 /* # of nodes in node set    */
00352                                                 /*   num                     */
00353 #define DIM_NUM_DF_NS(num)      ex_catstr("num_df_ns",num)
00354                                                /* # of distribution factors */
00355                                                /* in node set num           */
00356 #define VAR_NS_STAT             "ns_status"     /* node set status           */
00357 #define VAR_NS_IDS              "ns_prop1"      /* node set id properties    */
00358 #define VAR_NODE_NS(num)        ex_catstr("node_ns",num)
00359                                                 /* list of nodes in node set */
00360                                                 /*   num                     */
00361 #define VAR_FACT_NS(num)        ex_catstr("dist_fact_ns",num)
00362                                                 /* list of distribution      */
00363                                                 /*   factors in node set num */
00364 #define VAR_NS_PROP(num)        ex_catstr("ns_prop",num)
00365                                                 /* list of the numth property*/
00366                                                 /*   for all node sets       */
00367 #define DIM_NUM_QA              "num_qa_rec"    /* # of QA records           */
00368 #define VAR_QA_TITLE            "qa_records"    /* QA records                */
00369 #define DIM_NUM_INFO            "num_info"      /* # of information records  */
00370 #define VAR_INFO                "info_records"  /* information records       */
00371 #define VAR_HIS_TIME            "time_hist"     /* obsolete                  */
00372 #define VAR_WHOLE_TIME          "time_whole"    /* simulation times for whole*/
00373                                                 /*   time steps              */
00374 #define VAR_ELEM_TAB            "elem_var_tab"  /* element variable truth    */
00375                                                 /*   table                   */
00376 #define VAR_EBLK_TAB            "edge_var_tab"  /* edge variable truth table */
00377 #define VAR_FBLK_TAB            "face_var_tab"  /* face variable truth table */
00378 #define VAR_ELSET_TAB           "elset_var_tab" /* elemset variable truth    */
00379                                                 /*   table                   */
00380 #define VAR_SSET_TAB            "sset_var_tab"  /* sideset variable truth    */
00381                                                 /*   table                   */
00382 #define VAR_FSET_TAB            "fset_var_tab"  /* faceset variable truth    */
00383                                                 /*   table                   */
00384 #define VAR_ESET_TAB            "eset_var_tab"  /* edgeset variable truth    */
00385                                                 /*   table                   */
00386 #define VAR_NSET_TAB            "nset_var_tab"  /* nodeset variable truth    */
00387                                                 /*   table                   */
00388 #define DIM_NUM_GLO_VAR         "num_glo_var"   /* # of global variables     */
00389 #define VAR_NAME_GLO_VAR        "name_glo_var"  /* names of global variables */
00390 #define VAR_GLO_VAR             "vals_glo_var"  /* values of global variables*/
00391 #define DIM_NUM_NOD_VAR         "num_nod_var"   /* # of nodal variables      */
00392 #define VAR_NAME_NOD_VAR        "name_nod_var"  /* names of nodal variables  */
00393 #define VAR_NOD_VAR             "vals_nod_var"  /* values of nodal variables */
00394 #define VAR_NOD_VAR_NEW(num)    ex_catstr("vals_nod_var",num)
00395                                                 /* values of nodal variables */
00396 #define DIM_NUM_ELE_VAR         "num_elem_var"  /* # of element variables    */
00397 #define VAR_NAME_ELE_VAR        "name_elem_var" /* names of element variables*/
00398 #define VAR_ELEM_VAR(num1,num2) ex_catstr2("vals_elem_var",num1,"eb",num2)
00399                                                 /* values of element variable*/
00400                                                 /*   num1 in element block   */
00401                                                 /*   num2                    */
00402 #define DIM_NUM_EDG_VAR         "num_edge_var"  /* # of edge variables       */
00403 #define VAR_NAME_EDG_VAR        "name_edge_var" /* names of edge variables   */
00404 #define VAR_EDGE_VAR(num1,num2) ex_catstr2("vals_edge_var",num1,"eb",num2)
00405                                                 /* values of edge variable   */
00406                                                 /*   num1 in edge block num2 */
00407 #define DIM_NUM_FAC_VAR         "num_face_var"  /* # of face variables       */
00408 #define VAR_NAME_FAC_VAR        "name_face_var" /* names of face variables   */
00409 #define VAR_FACE_VAR(num1,num2) ex_catstr2("vals_face_var",num1,"fb",num2)
00410                                                 /* values of face variable   */
00411                                                 /*   num1 in face block num2 */
00412 
00413 #define DIM_NUM_NSET_VAR        "num_nset_var"  /* # of nodeset variables    */
00414 #define VAR_NAME_NSET_VAR       "name_nset_var" /* names of nodeset variables*/
00415 #define VAR_NS_VAR(num1,num2) ex_catstr2("vals_nset_var",num1,"ns",num2)
00416                                                 /* values of nodeset variable*/
00417                                                 /*   num1 in nodeset num2    */
00418 #define DIM_NUM_ESET_VAR        "num_eset_var"  /* # of edgeset variables    */
00419 #define VAR_NAME_ESET_VAR       "name_eset_var" /* names of edgeset variables*/
00420 #define VAR_ES_VAR(num1,num2) ex_catstr2("vals_eset_var",num1,"es",num2)
00421                                                 /* values of edgeset variable*/
00422                                                 /*   num1 in edgeset num2    */
00423 #define DIM_NUM_FSET_VAR        "num_fset_var"  /* # of faceset variables    */
00424 #define VAR_NAME_FSET_VAR       "name_fset_var" /* names of faceset variables*/
00425 #define VAR_FS_VAR(num1,num2) ex_catstr2("vals_fset_var",num1,"fs",num2)
00426                                                 /* values of faceset variable*/
00427                                                 /*   num1 in faceset num2    */
00428 #define DIM_NUM_SSET_VAR        "num_sset_var"  /* # of sideset variables    */
00429 #define VAR_NAME_SSET_VAR       "name_sset_var" /* names of sideset variables*/
00430 #define VAR_SS_VAR(num1,num2) ex_catstr2("vals_sset_var",num1,"ss",num2)
00431                                                 /* values of sideset variable*/
00432                                                 /*   num1 in sideset num2    */
00433 #define DIM_NUM_ELSET_VAR       "num_elset_var" /* # of element set variables*/
00434 #define VAR_NAME_ELSET_VAR      "name_elset_var"/* names of elemset variables*/
00435 #define VAR_ELS_VAR(num1,num2) ex_catstr2("vals_elset_var",num1,"es",num2)
00436                                                 /* values of elemset variable*/
00437                                                 /*   num1 in elemset num2    */
00438 
00439 #define DIM_NUM_HIS_VAR         "num_his_var"   /* obsolete                  */
00440 #define VAR_NAME_HIS_VAR        "name_his_var"  /* obsolete                  */
00441 #define VAR_HIS_VAR             "vals_his_var"  /* obsolete                  */
00442 #define DIM_STR                 "len_string"    /* general dimension of      */
00443                                                 /*   length MAX_STR_LENGTH   */
00444                                                 /*   used for name lengths   */
00445 #define DIM_LIN                 "len_line"      /* general dimension of      */
00446                                                 /*   length MAX_LINE_LENGTH  */
00447                                                 /*   used for long strings   */
00448 #define DIM_N4                  "four"          /* general dimension of      */
00449                                                 /*   length 4                */
00450 #define DIM_TIME                "time_step"     /* unlimited (expandable)    */
00451                                                 /*   dimension for time steps*/
00452 #define DIM_HTIME               "hist_time_step"/* obsolete                  */
00453 #define VAR_ELEM_NUM_MAP        "elem_num_map"  /* element numbering map     */
00454                                                 /* obsolete, replaced by     */
00455                                                 /* VAR_ELEM_MAP(num)         */
00456 #define VAR_FACE_NUM_MAP        "face_num_map"  /* face numbering map     */
00457                                                 /* obsolete, replaced by     */
00458                                                 /* VAR_FACE_MAP(num)         */
00459 #define VAR_EDGE_NUM_MAP        "edge_num_map"  /* edge numbering map     */
00460                                                 /* obsolete, replaced by     */
00461                                                 /* VAR_EDGE_MAP(num)         */
00462 #define VAR_NODE_NUM_MAP        "node_num_map"  /* node numbering map        */
00463                                                 /* obsolete, replaced by     */
00464                                                 /* VAR_NODE_MAP(num)         */
00465 #define DIM_NUM_EM              "num_elem_maps" /* # of element maps         */
00466 #define VAR_ELEM_MAP(num)       ex_catstr("elem_map",num)
00467                                                 /* the numth element map     */
00468 #define VAR_EM_PROP(num)        ex_catstr("em_prop",num)
00469                                                 /* list of the numth property*/
00470                                                 /*   for all element maps    */
00471 #define DIM_NUM_EDM             "num_edge_maps" /* # of edge maps            */
00472 #define VAR_EDGE_MAP(num)       ex_catstr("edge_map",num)
00473                                                 /* the numth edge map        */
00474 #define VAR_EDM_PROP(num)       ex_catstr("edm_prop",num)
00475                                                 /* list of the numth property*/
00476                                                 /*   for all edge maps       */
00477 #define DIM_NUM_FAM             "num_face_maps" /* # of face maps            */
00478 #define VAR_FACE_MAP(num)       ex_catstr("face_map",num)
00479                                                 /* the numth face map        */
00480 #define VAR_FAM_PROP(num)       ex_catstr("fam_prop",num)
00481                                                 /* list of the numth property*/
00482                                                 /*   for all face maps       */
00483 #define DIM_NUM_NM              "num_node_maps" /* # of node maps            */
00484 #define VAR_NODE_MAP(num)       ex_catstr("node_map",num)
00485                                                 /* the numth node map        */
00486 #define VAR_NM_PROP(num)        ex_catstr("nm_prop",num)
00487                                                 /* list of the numth property*/
00488                                                 /*   for all node maps       */
00489 
00490 #define DIM_NUM_CFRAMES  "num_cframes"
00491 #define DIM_NUM_CFRAME9  "num_cframes_9"
00492 #define VAR_FRAME_COORDS "frame_coordinates"
00493 #define VAR_FRAME_IDS    "frame_ids"
00494 #define VAR_FRAME_TAGS   "frame_tags"
00495 
00496 
00497 enum ex_element_type {
00498   EX_EL_UNK         =  -1,     /**< unknown entity */
00499   EX_EL_NULL_ELEMENT=   0,     
00500   EX_EL_TRIANGLE    =   1,     /**< Triangle entity */
00501   EX_EL_QUAD        =   2,     /**< Quad entity */
00502   EX_EL_HEX         =   3,     /**< Hex entity */
00503   EX_EL_WEDGE       =   4,     /**< Wedge entity */
00504   EX_EL_TETRA       =   5,     /**< Tetra entity */
00505   EX_EL_TRUSS       =   6,     /**< Truss entity */
00506   EX_EL_BEAM        =   7,     /**< Beam entity */
00507   EX_EL_SHELL       =   8,     /**< Shell entity */
00508   EX_EL_SPHERE      =   9,     /**< Sphere entity */
00509   EX_EL_CIRCLE      =  10,     /**< Circle entity */
00510   EX_EL_TRISHELL    =  11,     /**< Triangular Shell entity */
00511   EX_EL_PYRAMID     =  12      /**< Pyramid entity */
00512 }; 
00513 typedef enum ex_element_type ex_element_type;
00514 
00515 /* Internal structure declarations */
00516 
00517 struct elem_blk_parm
00518 {
00519   char elem_type[33];
00520   int elem_blk_id;
00521   int num_elem_in_blk;
00522   int num_nodes_per_elem;
00523   int num_sides;
00524   int num_nodes_per_side[6];
00525   int num_attr;
00526   int elem_ctr;
00527   ex_element_type elem_type_val;
00528 };
00529 
00530 struct list_item {              /* for use with ex_get_file_item */
00531 
00532   int exo_id;
00533   int value;
00534   struct list_item* next;
00535 };
00536 
00537 struct obj_stats {
00538   int *id_vals;
00539   int *stat_vals;
00540   long num;
00541   int exoid;
00542   int valid_ids;
00543   int valid_stat;
00544   struct obj_stats *next;
00545 };
00546 
00547 void  ex_iqsort(int v[], int iv[], int count );
00548 char* ex_catstr(const char*, int);
00549 char* ex_catstr2(const char*, int, const char*, int);
00550 char* ex_dim_num_entries_in_object(ex_entity_type, int);
00551 char* ex_dim_num_objects(ex_entity_type obj_type);
00552 char* ex_name_var_of_object( ex_entity_type, int, int );
00553 char* ex_name_of_map( ex_entity_type, int );
00554 
00555 int ex_conv_ini  (int exoid, int* comp_wordsize, int* io_wordsize, int file_wordsize);
00556 void ex_conv_exit  (int exoid);
00557 nc_type nc_flt_code  (int exoid);
00558 int ex_comp_ws  (int exoid);
00559 int ex_get_cpu_ws(void);
00560 
00561 struct list_item** ex_get_counter_list(ex_entity_type obj_type);
00562 int ex_get_file_item  (int, struct list_item**);
00563 int ex_inc_file_item  (int, struct list_item**);
00564 void ex_rm_file_item  (int, struct list_item**);
00565 
00566 extern struct obj_stats* exoII_eb;
00567 extern struct obj_stats* exoII_ed;
00568 extern struct obj_stats* exoII_fa;
00569 extern struct obj_stats* exoII_ns;
00570 extern struct obj_stats* exoII_es;
00571 extern struct obj_stats* exoII_fs;
00572 extern struct obj_stats* exoII_ss;
00573 extern struct obj_stats* exoII_els;
00574 extern struct obj_stats* exoII_em;
00575 extern struct obj_stats* exoII_edm;
00576 extern struct obj_stats* exoII_fam;
00577 extern struct obj_stats* exoII_nm;
00578 
00579 
00580 struct obj_stats *ex_get_stat_ptr  ( int exoid, struct obj_stats** obj_ptr);
00581 void ex_rm_stat_ptr  (int exoid, struct obj_stats** obj_ptr);
00582 
00583 int ex_id_lkup  (int exoid, ex_entity_type id_type, int num);
00584 int ex_get_dimension(int exoid, const char *dimtype, const char *label,
00585                      size_t *count, int *dimid, const char *routine);
00586 #endif